After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 685005 - .desktop files with "AutostartCondition=GNOME3" fail validation with desktop-file-utils-0.20
.desktop files with "AutostartCondition=GNOME3" fail validation with desktop-...
Status: RESOLVED NOTGNOME
Product: gnome-session
Classification: Core
Component: gnome-session
3.6.x
Other Linux
: Normal normal
: ---
Assigned To: Session Maintainers
Session Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-09-27 22:01 UTC by Alexandre Rostovtsev
Modified: 2012-10-03 14:08 UTC
See Also:
GNOME target: ---
GNOME version: 3.5/3.6



Description Alexandre Rostovtsev 2012-09-27 22:01:30 UTC
Running desktop-file-utils from desktop-file-utils-0.20 on .desktop files with "AutostartCondition=GNOME3" results in an error:

$ desktop-file-validate /etc/xdg/autostart/bluetooth-applet.desktop
/etc/xdg/autostart/bluetooth-applet.desktop: error: value "GNOME3 if-session gnome-fallback" for key "AutostartCondition" in group "Desktop Entry" contains an unregistered value "GNOME3" for the condition; values extending the format should start with "X-"

This is because according to the autostart spec, the condition needs to start with a desktop environment name registered for use in "OnlyShowIn" - e.g. "GNOME", "KDE", "Unity", etc.; and "GNOME3" is not on the list.

Possible solutions:
1. Use "X-GNOME3" instead of "GNOME3"; or
2. Add "GNOME3" to the list of desktop environments registered for "OnlyShowIn"; or
3. Amend the autostart spec to use a separate lists of registered desktop environments for "AutostartCondition" and "OnlyShowIn".
Comment 1 Matthias Clasen 2012-09-29 21:33:38 UTC
Do you have a link to the autostart spec that specifies AutostartCondition ?
Comment 2 Alexandre Rostovtsev 2012-09-29 21:57:28 UTC
Original spec proposal, before it was renamed from Autostart-Condition to AutostartCondition:
http://lists.freedesktop.org/archives/xdg/2007-January/007436.html

Implementation in desktop-file-utils ("Autostart spec, currently proposed; adopted by GNOME"):
http://cgit.freedesktop.org/xdg/desktop-file-utils/commit/?id=31585ac26ff458159b01c6bcfcf1405e164d6448
Comment 3 Matthias Clasen 2012-09-30 23:41:36 UTC
Right, so as that commit says, it never really made it to the actual spec here: 
http://standards.freedesktop.org/autostart-spec/autostart-spec-latest.html
The implementation has evolved over time; I would say it is best to simply accept the fact that GNOME3 is now in use as a condition.
Comment 4 Alexandre Rostovtsev 2012-10-01 00:56:43 UTC
(In reply to comment #3)
Fair enough; I've filed a bug with desktop-file-utils maintainers, let's see what they think of it:
https://bugs.freedesktop.org/show_bug.cgi?id=55483
Comment 5 Alexandre Rostovtsev 2012-10-03 14:08:37 UTC
Fixed in desktop-file-utils: http://cgit.freedesktop.org/xdg/desktop-file-utils/commit/?id=38b319d92525d1b1f887b1b5f094d416b51bd74c