OS: Ubuntu 24.04.1, Desktop: GNOME Shell 46.0, Window manager: Wayland
Long story short: multiple instances (different installations) of Eclipse IDE gets gnome-shell dash confused, and shows wrong icons and names during running 1 instance or multiple at a time, even after specifying StartupWMClass=Eclipse inside .desktop files.
So, what and where to specify unique identifier to avoid this confusion by gnome-shell dash? or is there anyway we can specify a unique StartupWMClass for every installation?
============================
Details: I'm using multiple instance of Eclipse IDE (JSE, JEE, PyDev and CDT), and they are all installed manually in different paths.
Every .desktop file is has unique entries, except StartupWMClass=Eclipse, which i got from Looking class lg command.
e.g: the .desktop of JSE
[Desktop Entry]
Version=1.1
Type=Application
Name=JSE
Icon=/home/user/.local/bin/eclipse/jse/icon.png
Exec=/home/user/.local/bin/eclipse/jse/default/eclipse
Path=/home/user/.local/bin/eclipse/jse/workspace
Categories=Development;IDE;
StartupNotify=true
StartupWMClass=Eclipse
When I run any one of (JSE, JEE, PyDev or CDT), I got only CDT icon and name in gnome dash, but the application running is correctly launched (only name and icon wrong).
Any other launching of other instances (JSE, JEE, PyDev and CDT) will group the icon and name to the currently launched instance on gnome dash (with wrong name and icons)
please see image for JSE and JEE instances running
I've installed Eclipse from snap store, and it was working perfectly with no problems (not grouped with previous CDT icon and name in dash)
please see this image for Eclipse from snap
I checked the .desktop file of snap's Eclipse, and I found:
[Desktop Entry]
X-SnapInstanceName=eclipse
Version=1.0
Type=Application
Name=Eclipse
Icon=/snap/eclipse/124/usr/lib/eclipse/icon.xpm
X-SnapAppName=eclipse
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/eclipse_eclipse.desktop /snap/bin/eclipse %f
Comment=Eclipse IDE
Categories=Development;IDE;
Terminal=false
StartupWMClass=eclipse
I noticed that snapStartupWMClass=eclipse with small e, while lg command shows wmclass=Eclipse with capital E
please see lg command window image
So I think this is the key, by specifying unique StartupWMClass value, for every .desktop file of each installation, I'm I right?
Can someone tells me how to specify a unique StartupWMClass value for every different instance of Eclipse, or any other application.
============================
Update 1:
After reading a lot of threads, and Refer to answer in this thread and this manual link, Exec option --class does not work.