XDG_CURRENT_DESKTOP

Matthias Clasen mclasen at redhat.com
Tue Jul 19 06:12:58 PDT 2011


On Thu, 2011-07-14 at 11:36 -0400, Michael Terry wrote:
> Hello!  I've seen the idea of a XDG_CURRENT_DESKTOP environment variable 
> tossed around a few times on this mailing list, but I don't see it in 
> any spec.
> 
> Historically, most desktop file parsing libraries were tightly tied to a 
> desktop and were able to assume which XDG desktop they were in (e.g. 
> libgmenu assumes 'GNOME').
> 
> However in Unity, it uses most of the same libraries but still wants the 
> ability to respect OnlyShowIn=Unity.  So there's a need for those 
> libraries to detect which desktop is running.  The easiest/quickest way 
> is to use an environment variable like XDG_CURRENT_DESKTOP.
> 

I have said this repeatedly, I will say it again:

I don't think such 'desktop marking' is making anything better, really. 

It only makes the mess bigger by proliferating wierd and unmaintainable
desktop-specific workarounds in many places.

Applications should ideally not change their behavior depending on such
markers. If they need to use services which may or may not be present,
check for the proper dbus service names on the bus.





More information about the xdg mailing list