Problem with Imagemagick import (import-im6.q16) jammy/gnome - gnome

I use Imagemagick's "import" (import-im6.q16) a lot for capturing screen data. And it works great on my primary workstation using the Mate desktop.
But I am trying to use it on Jammy/Gnome and it just hangs.
Nothing in any of the obvious logs (syslog,Xorg). Searched the web and the Imagemagick communities and come up empty.
Executing import tmp.png should turn the "cross-hair" cursor on and allow selection of a region of the default X display. Upon "mouse up", the selected region is written to the file specified. An existing file will be overwritten permissions permitting. The suffix should be an image file type or errors can occur (.pdf is an example).
Can anyone confirm this is broken or working with Gnome?

Related

Can i store and restore size and window position for multiple windows in Tauri?

I need to store a window size and position for multiple windows in tauri. And restore it after open. For example there was opened 3 windows and they have located in different parts of desktop. And when i'll open an application again app will restore all three windows(windows are the same) and restore their positions and size. Is it possible?
Tauri has a plugin for exactly this: https://github.com/tauri-apps/tauri-plugin-window-state (recommended solution).
You don't necessarily have to use this but its code should serve as good inspiration.
A JS-only solution is a bit tricky because there is no exit-requested event for the event loop on the JS side, only close-requested for the windows.
This wouldn't be an issue if you have a specific point in time where you want to save the windows. In that case you could just save a json file to disk containing the size/position and the window labels which you then read on app start to re-size/re-position the window.

How to create & save a tkinter.Canvas image on a server w/ no display

I've written a program that generates an image via tkinter.Canvas and saves it. Now I'm updating this project to use FastAPI to let users hit my end-point and download this image.
I'm not trying to display the image on the server, just generate it in memory, save it to storage, then return that image.
Initial proof-of-concept tests work, but I cannot get this to work in Docker because no $DISPLAY is set. Unlike other questions I've seen, I'm not trying to display the image directly, just generate the image, save it, and return a file-path.
This is not a dupe of Tkinter setup on headless server. That question boils down to "how do I not run tkinter while on a server?" I still need tkinter, I just have no intention of displaying it.
I have also seen something about X11, but it seems like I'd need to know the server's environment in order to install X11, and I do not.
Is tkinter really not able to generate an image without $DISPLAY (even if I don't intend to display it)? If so, is there an alternative to tkinter I can use that can generate an image without needing a $DISPLAY? Am I totally misunderstanding a major part of how this works? It seems like I should be able to generate an image and save the bytes without needing all the things required for actual graphical rendering...
Using Pillow.Image and Pillow.ImageDraw instead of tkinter works for my scenario. (Credit goes to #acw1668)
My project only draws lines, circles, and polygons - all things that ImageDraw can do. The process of switching from one to the other was exceptionally straightforward, and Docker returns the ImageDraw/Image file with no issues!

Pure Data freezes when trying to record

Working with Pure Data, trying to record audio output from a patch I've made, and am 1) unable to create a file within pure data to write to and 2) attempting to use the writesf~ object causes the program to freeze after about two to three seconds. I suspect the two things are related- perhaps the program is attempting to write data somewhere, somehow, but it's going in the wrong place or some such and causing the program to freeze?
I've uninstalled the latest Pure Data release (0.51-1) and installed an earlier stable release (0.5-2) and even tried an alternative called "purr data (latest release)" all with the exact same result on my windows 10 acer laptop: no file created, and program freezes after a few seconds.
I'm testing with this patch:
I first click on the message that reads "open rec.wav" then the start then the stop, and if I take longer than three or so seconds to click on "stop" the program freezes, otherwise nothing at all happens.
I have performed system wide search for the audio file, including the folder that the patch is in, all to no avail.
Any trouble shooting hints will be carefully attempted.
Are you sure you have write-permissions on the target directory?
If your example you use rec.wav which has no explicit target directory (and is just using the "current", so it's hard to tell from outside what this directory would be).
#max-n's answer suggests to use /tmp/foo.wav which is an illegal directory on Windows. Due to a known bug, using an illegal (or otherwise non-writable) path will lock up Pd.
If your "current" directory happens to be your system root (aka C:\), you might well lack the permissions to write there.
You could check by starting the Pd from the cmdline and see whether the terminal spits out any weird errors:
⊞ Win+R
type cmd and hit Enter
in the opening terminal type the full path to your Pd-executable, e.g.:
C:\Program Files\Pd\bin\pd + Enter
(ideally leave out the extension (that is: use .../pd rather than .../pd.exe)
If the problem is indeed a permission problem, you can simply work around it by specifying the full path of the output file (and make sure that it is in a writable directory).
The easiest way to do this is by using a file-selector to choose the output file:
[bang(
|
[savepanel]
|
[open $1(
|
[writesf~]
There might be a reason why the helpfile uses a [delay 1000] to schedule a stop message in a predefined time.

Unregistered Sublime Text

I downloaded Sublime Text 3 on my MacBook Air; however, the text editor continues to have UNREGISTERED on the top right hand corner of the tab. As a result, I presume, I cannot save anything in the said text editor. How do I fix this?
Sublime Text is fully functional in it's unregistered evaluation mode with the exception that:
It reminds you every few saves to purchase it if you're going to use it for an extended purpose (i.e. it's not free to use forever, despite what many web pages and users claim)
You cannot turn off update checks at startup to gently remind you that as an unlicensed user, you should be running the most recent version.
The error that you're seeing isn't Sublime telling you that you can't save because it's unregistered, it's MacOS telling you that you can't save files to the root of the file system (/).
On Unix-like systems such as MacOS and Linux, non-administrative users aren't allowed to save files anywhere but their own home directories (and a few other places, like /tmp) unless you specifically set things up to allow it, because indiscriminate creation or editing of files in the wrong place can cause problems.
As such, if you pick a different folder (somewhere under /Users/yourusername) to save in, it will work as you expect.

How to add comments to folder in linux and view them with mouse cursor

I run simulations for various choices of parameters. For each choice I store the resulting data in a folder, like
/home/me/Documents/MyProject/C=10/1.dat
/home/me/Documents/MyProject/C=10/2.dat
/home/me/Documents/MyProject/C=10/3.dat
...
and
/home/me/Documents/MyProject/C=20/1.dat
/home/me/Documents/MyProject/C=20/2.dat
/home/me/Documents/MyProject/C=20/3.dat
...and so forth.
would like to write a little text file AAA.txt which contains not just the C parameter but all the others too. Then when viewing this folder which contains the data I want to hold my cursor on the little file symbol and have a little box appear. This box should show just the content of AAA.txt, so I can quickly check which set of parameters was used in this particular run.
Anyone know how to do this? I use Ubuntu 14.04
I am not aware of ways to give you a custom "tooltip". As an alternative, you could look into creating custom thumbnails of your .dat files.
See here for how to do that with nautilus; the default file browser for Ubuntu.
Alternatively, you might look into what Gloobus can do for you.

Resources