Hello all, in my program I need to know what desktop environment the
user is running. I figured this piece of code works, but apparently not
on every Linux distro. On Ubuntu it did the trick, but then I heard of
someone who runs SLiM that he get's an error with this.

if os.environ['DESKTOP_SESSION'].startswith('kde'):
    print "Running KDE"


So, does anyone know a water-proof solution for desktop environment
checking?

Timo
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to