maemo.org Bugzilla – Bug 657
TN inferring WMClass from Exec is prone to breakage, it should ignore quotes
Last modified: 2010-03-10 21:25:28 UTC
You need to
before you can comment on or make changes to this bug.
gpe-calendar has recently adopted the following as its Exec field in its
/bin/sh -c '. /usr/bin/connectivity_preload.sh; /usr/bin/gpe-calendar'
For reasons which I have not yet completely understood, this has caused problems
with gpe-calendar properly being register with maemo_af_desktop. Adding
StartupWMClass=gpe-calendar to the desktop file fixes the problem.
takes the basename of the exec_name key (using g_path_get_basename) as the value
of the startup_wmclass key if that key is not present. This means that it takes
gpe-calendar' (with a trailing quote) as the key name. Setting the
startup_wmclass key in the .desktop file explicitly to gpe-calendar (without the
trailing quote) appears to fix the problem.
The bug here is that given
Exec=program 'some args'
the derived wmclass is "args'" and not "program" (which means even if the bug is
fixed you'd still need to use explicit StartupWMClass in the .desktop files)
The derivation is meant to be identical to how gtk/gdk sets the WM_CLASS for its
windows, either it's derived from argv or the value given by the developer
using g_set_prgname() The implicit behavior is a bit fragile (on GNOME Desktop
this inconsistency breaks startup notification) and breaks if the executable
referred by Exec is different from the eventually executed binary, or the
application uses g_set_prgname() -- but it works well enough for the common case.
Which is why the explicit StartupWMClass exists.
Bug 3828 handles the issue of Maemo window management needing correct WMClass
for things to work, so focusing this into the issue of using Exec field and not
It would be good if Karsten could hav a look to this one.
This very old bug has the target milestone set to Fremantle but has not filed
internally. Something looks weird here. :)
True - Unsetting. Maybe Eero could explain the status here if he finds time.
Can this be reproduced in Maemo 5?
Unfortunately, without more information, as requested in one of the last
comments, we are unable to do anything more about this report. Until more
information is available, I'm resolving the report as WORKSFORME for Maemo5
(Fremantle). Note that this WONTFIX for Maemo4 (Diablo).
Please feel free to reopen this bug if you can still reproduce this in Maemo5.