1

I have two different Eclipse installs in my Ubuntu 18.04 with different plugins I create two .desktop files:

Install A

[Desktop Entry]
Name=Eclipse Java    
Type=Application
StartupNotify=true
Terminal=false
Exec=/opt/eclipse/jee-2018-09/eclipse_java/eclipse --class=Eclipse-Java
Terminal=false
Icon=/opt/eclipse/jee-2018-09/eclipse_java/icon_java.xpm
Comment=Integrated Development Environment for Java
NoDisplay=false
Categories=Development;IDE;Java;
StartupWMClass=Eclipse-Java

Install B

[Desktop Entry]
Name=Eclipse Python    
Type=Application
StartupNotify=true
Terminal=false
Exec=/opt/eclipse/jee-2018-09/eclipse_python/eclipse --class=Eclipse-Python
Terminal=false
Icon=/opt/eclipse/jee-2018-09/eclipse_python/icon_python.xpm
Comment=Integrated Development Environment for Python
NoDisplay=false
Categories=Development;IDE;Python;
StartupWMClass=Eclipse-Python

Both installs work fine, but I couldn't group the applications correctly.

Sidebar print

I know the problem resides with StartupWMClass, however, adding --class to the Exec= line won't change it.

The applications WMClass stays as "Eclipse", # xprop WM_CLASS returns M_CLASS(STRING) = "Eclipse", "Eclipse" after clicking on the running instance, even after using the class argument to run it.

Is there a way to fix that, letting me group the applications under the correct icon instead of having two Java EE new Icons?

  • Just to make sure, are the added --class and StartupWMClass= entry the same in your .desktop file (i.e. --class CustomClassName in the Exec= line and StartupWMClass=CustomClassName)? – pomsky Dec 5 '18 at 19:54
  • Yes. Just Triple checked. – Gustavo Marques Lupatelli Dec 10 '18 at 17:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.