Comment 28 for bug 635223

Revision history for this message
Damjan Jovanovic (damjan-jov) wrote :

In Wine the general policy is only freedesktop specifications are supported, no desktop-specific hacks.

There isn't any cross-desktop spec for matching windows -> .desktop files, but http://live.gnome.org/GnomeShell/ApplicationBased seems like a good place to start:

"To ensure the GNOME 3 Shell will track your application, you can also set the WM_CLASS X window property to be the same as your application's .desktop file name, without the .desktop extension. The easiest way to achieve this is to have your application's process name match the .desktop file name, and ensure you use g_option_context_parse."

But:
1. The executable name trick is unusable by Wine, Java, Mono, Python and other frameworks. In a later section, "Binding interpreters", the document explains those applications should manually set the WM_CLASS from a-priori knowledge of the .desktop file name, which is still just as unobtainable.
2. *nix vendors have used WM_CLASS for custom purposes for years, it will be difficult to get them all to change now:
eg. $ xprop | grep WM_CLASS (on a Java application)
WM_CLASS(STRING) = "sun-awt-X11-XFramePeer", "java-lang-Thread"

Is Unity using the Gnome 3 spec or doing something else?