Community
Participate
Working Groups
Hello. Currently, all Eclipse versions (running in Linux) have the same WM_CLASS. This prevents Gnome (and any XDG-compliant application based DE) to correctly group windows if different Eclipse versions are executed at the same time. Until Luna, I found a workaround [1], but from Mars on (installed with Oomph) I don't know how to solve the problem (and I'm no more willing to...). It would be great if each Eclipse version had a specific WM_CLASS (i.e. "Eclipse Neon"). And it would be even better if the WM_CLASS were specific to Oomph created instance! That way one could have a .desktop shortcut for each installation (and Oomph could even create the shortcut by itself...). Thank you for your amazing work. [1] I shared it here: http://askubuntu.com/a/741940/293463
After upgrading to Ubuntu 18.04 with Gnome3 Dash it is also a problem for me. I have two installations of Eclipse: CDT and PDT, each with nice looking icons on the dash. But when executed they both registers as WM_Class "Eclipse" and show a new ugly icon on the dash. I tried adding "StartupWMClass=Eclipse" to the eclipse .desktop files, but then they both registers under the first icon on the dash. Fine solution if I only had one instance. So I also would like if the WM_Class would reflect both the Eclipse release (Oxygen, Photon...) and if it has a CDT or PDT packages installed. Because of the flexible nature of Eclipse perhaps a manual entry of the WM_CLASS would be preferable. A Simple config entry or support for the --class runtime parameter.
SWT is separate from things like PDT/CDT or Eclipse versions, as it's a toolkit that can be used to write GUI applications completely unrelated to Eclipse. This makes it difficult to introduce such Eclipse IDE specific functionality into SWT.
Well it must be possible since "xprop WM_CLASS" reports "Eclipse", "Eclipse". Somehow I damaged my Eclipse Photon PDT installation yesterday, like it forgot its product name, and then suddenly its WM_CLASS was reported as "SWT". A reinstall fixed it though. I read some hints about changing the AppName property in a plugin.xml file, but there were several files with that name. So I tried to change "Eclipse" to "EclipsePDT" in several places and somehow I damaged it completely. That is why I think it should be possible to override the WM_CLASS value via a configuration setting or in the ini file.
see Bug 494735
Some time ago my changes to the appName property in the plugin.xml files was suddenly reported via the xprop lookup. I guess something was fixed during an update. So here is a summary of my solution: I have two eclipse installations (simple downloads) in separate directories, eclipse-cpp (cdt) and eclipse-php (pdt). In both installations I changed to appName property in the respective plugin.xml files: plugins/org.eclipse.epp.package.cpp_4.8.0.20180619-1200/plugin.xml value=EclipseCDT plugins/org.eclipse.epp.package.php_4.8.0.20180619-1200/plugin.xml value=EclipsePDT The add the two desktop files: In /usr/share/applications/eclipse-php.desktop: [Desktop Entry] Version=1.0 Name=Eclipse PHP Comment=Eclipse with PDT Exec=/opt/eclipse-php/eclipse Icon=/opt/eclipse-install/eclipse-php.svg StartupNotify=true Terminal=false Type=Application Categories=TextEditor;IDE;Development; StartupWMClass=EclipsePDT In /usr/share/applications/eclipse-cpp.desktop: [Desktop Entry] Version=1.0 Name=Eclipse C++ Comment=Eclipse with CDT Exec=/opt/eclipse-cpp/eclipse Icon=/opt/eclipse-install/eclipse-cpp.svg StartupNotify=true Terminal=false Type=Application Categories=TextEditor;IDE;Development; StartupWMClass=EclipseCDT This gives me two nice icons on the gnome3 toolbar, with correctly placed indicators when the applications is started.
(In reply to Steffen Brummer from comment #5) Great discover Steffen! thanks ! I did something similar for my IDEs installed with Eclipse Installer. Since I have only one IDE for each profile it worked well. But it only worked for new installations. I need to delete the old ones and reinstall them. So I changed the files at: /home/user/.p2/pool/plugins/org.eclipse.epp.package.java_4.11.0.20190117-1900/plugin.xml /home/use/.p2/pool/plugins/org.eclipse.epp.package.cpp_4.11.0.20190117-1900/plugin.xml and all others.
If Eclipse has already been started then it is necessary to delete configuration/org.eclipse.core.runtime/.mainData.1 to load the new appName value.
It seems as of version 2023-03 (4.27.0) the above appName change is no longer working to set the WM_CLASS identifier. It could be because I'm using Wayland, but I think I would have experienced problems sooner. The Wayland looking glass (Alt+F2 -> lg<enter> -> windows) shows wmclass: eclipse If anybody know of a solution or why it no longer works please add a comment here.