Comment 8 for bug 757991

Revision history for this message
Richard J. Turner (richard-zygous) wrote :

Various resources on the web point to the use of a customised java agent to resolve this - one that allows WM_CLASS to be modified. The idea being that if the app is launched using this agent WM_CLASS can be set the same as a StartupWMClass setting in the .desktop file and Unity will match the two strings and thus associate the running app with the correct icon.

I've tested this in GNOME Shell (shortly before the final release, so a little while ago now) and it did the trick. However, it doesn't appear to work in Unity.

Using xprop I can see that WM_CLASS is set appropriately, e.g. 'WM_CLASS(STRING) = "sun-awt-X11-XFramePeer", "DbWrench"'. This corresponds with the line 'StartupWMClass=DbWrench' in my .desktop file.

Granted, for people who tend to use only stock applications this isn't a big deal I'm sure. Three of the applications I use every day are Java apps affected by this issue though: six icons for these three is an irritation and it's even more irritating that for apps based upon the Netbeans Platform the icon displayed for the running app is different to the launcher. Not user-friendly.