Improved XFCE/MATE detection

This commit is contained in:
Clement Lefebvre 2012-06-28 13:26:15 +01:00
parent 2449e217e8
commit 854de8452c

View File

@ -217,6 +217,11 @@ class MainWindow( object ):
de = os.environ["DESKTOP_SESSION"] de = os.environ["DESKTOP_SESSION"]
if de in ["gnome", "gnome-shell", "mate", "kde", "xfce"]: if de in ["gnome", "gnome-shell", "mate", "kde", "xfce"]:
self.de = de self.de = de
else:
if os.path.exists("/usr/bin/caja"):
self.de = "mate"
elif os.path.exists("/usr/bin/thunar"):
self.de = "xfce"
except Exception, detail: except Exception, detail:
print detail print detail