Adding Unity to OnlyShowIn allowed values

Matthias Clasen mclasen at redhat.com
Mon Feb 21 07:59:46 PST 2011


On Sun, 2011-02-20 at 14:56 +0100, Pierre Wieser wrote:

> Thanks for the pointer, Chris.
> 
> At least, xdg-open will give me a start point for most popular
> desktops.
> 
> I must admit that I hoped that, as XDG specifies some desktops in
> its specs, it would also specify somewhere how to identify these
> desktops :(
> 
> May I suggest to the list that adding a desktop to a XDG spec 
> (e.g. Registered OnlyShowIn Environments of menu spec) requires 
> to also specify how to identify this environment ?

I think its a wrong direction to head, and xdg-open shows exactly why.
You end up with a mess of 

if (gnome)
  do foo
else if (kde 3)
  do bar
else if (kde 4)
  do bar'

Thats not how I want applications to look. In most cases it is
preferable to use the autotools approach and test for the features you
need. Eg if you want to interact with the gnome session manager, check
if the name org.gnome.SessionManager is taken on the bus, etc.



More information about the xdg mailing list