Current desktop detection / app access

George jirka at 5z.com
Thu Aug 12 23:25:07 EEST 2004


On Wed, Aug 11, 2004 at 05:27:33PM +0100, Michael Meeks wrote:
> 	The 'standard' variable on SUSE that people are using to do this is
> 'WINDOWMANAGER' (a misleading, and junk name of course); which includes
> some path junk, and then either gnome or kde.

Instead of whining about lack of a clean solution, why not just resort to a
not-so-evil hack such as checking if GNOME_DESKTOP_SESSION_ID exists in the
environment.  That works with older GNOME's as well and is always set by
gnome-session if I'm reading the code right.  I'm sure there is some similar
thing in KDE.

You could also fall back on other things such as checking DESKTOP_SESSION
env or the WINDOWMANAGER env.  10 more lines of code won't make any app load
any slower and least of all OpenOffice.

> 	I guess we're going to have to support that going forward instead of
> something far more structured, pleasant and standardised.

Yeah well, in the end who cares, it's just some code that will work 99% of
the time, who cares it's ugly or whatnot, it will be fairly isolated piece of
code (a single self contained function).  As long as it works good enough.

George

-- 
George <jirka at 5z.com>
   I killed the cat.   -- Sid Vicious



More information about the xdg mailing list