OMG, thank you so much Subbu, that did it! :-D
The xprop command did already return that exact output, but it wasn't until adding that line you said to my .desktop file that it worked.
99%, anyway. I'd hoped I'd be able to have a .desktop file for a specific image (so it can have its own icon, instead of the Squeak icon).
# standard Squeak icon for launching any image Name=Squeak Exec=/usr/local/bin/spur %f Icon=/home/cmm/my/icons/Squeak-logo-white-background-68x51.png StartupWMClass=squeak ...
the other, for MyApp,
# for launching MyApp's image. Name=MyApp Exec=/path/for/apps/vm/squeak.sh /path/for/apps/image/app.image Icon=/home/cmm/my/icons/My-App-logo.png StartupWMClass=squeak ...
I put both of the above into separate .desktop files at ~/.local/share/applications. After an afternoon of tinkering, what I found was a little strange -- for the icon, Ubuntu 18.04 seems to use whichever desktop file was launched first. However, even though it gets the icon wrong, it at least uses the right Exec= vm specification. I tried changing the StartupWMClass on one of them, but it didn't work. But, I can at least work again.. :)
Thanks, Chris
On Sat, Jul 4, 2020 at 2:37 AM K K Subbu kksubbu.ml@gmail.com wrote:
On 04/07/20 2:34 am, Chris Muller wrote:
But the problem is not actually Gnome's window manager -- it works beautifully with _every other app_ *except* Squeak.
Perhaps those apps come with properly configured .desktop file. Squeak does not ship with one.
Could you please report Squeak app window has the right class?
$ xprop WM_CLASS WM_CLASS(STRING) = "squeak", "Squeak"
If this does not appear, then you will have to add one to your .desktop launcher file:
StartupWMClass=squeak
HTH .. Subbu
On 05/07/20 5:19 am, Chris Muller wrote:
I put both of the above into separate .desktop files at ~/.local/share/applications. After an afternoon of tinkering, what I found was a little strange -- for the icon, Ubuntu 18.04 seems to use whichever desktop file was launched first. However, even though it gets the icon wrong, it at least uses the right Exec= vm specification. I tried changing the StartupWMClass on one of them, but it didn't work. But, I can at least work again.. :)
Chris,
XDG uses lazy binding for resource paths using many env variables, so it is best to use xdg-utils to get/set them and avoid hard-coded paths. An easily overlooked aspect is that env variables for GUI launched programs come via .xsessionrc and not .bashrc or its relatives. So if your app works from command line but not from GUI launch, you know where to look ;-). Getting everything right in 18.04 is a chore!
If you are developing your own launcher for your app, it is easier to use the gnome-desktop-icon-edit utility to create the .desktop launcher file.
For icons, it is better to create a theme with icons of different resolutions (start with one) and install them using xdg-icon-resource command (part of xdg-utils package).
HTH .. Subbu
squeak-dev@lists.squeakfoundation.org