Hi all. I'm having a problem with a python script that is supposed to find out the users desktop environment and act accordingly. To keep it simple I reduced it to this:
It should (in my case) print 'Gnome'! but it doesn't. Any ideas on this? Thanks in advance. Btw, I have python 2.6 and 3.0 on Jaunty.Code:#!/usr/bin/env python import sys, os desktoptype = os.environ.get('DESKTOP_SESSION') if 'gnome' in desktoptype: print 'Gnome!' if 'kde' in desktoptype: print 'KDE!' else: print 'Failed!'
Bookmarks