[mousetrap] desktop is not passed as environment var anymore
- From: Flavio Percoco <flaper src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mousetrap] desktop is not passed as environment var anymore
- Date: Wed, 31 Mar 2010 21:51:53 +0000 (UTC)
commit de241644b7a63ccd18f8553e6f743749e8ea5ca2
Author: Flavio Percoco Premoli <flaper87 gmail com>
Date: Wed Mar 31 23:50:24 2010 +0200
desktop is not passed as environment var anymore
src/mousetrap/app/environment.py.in | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/mousetrap/app/environment.py.in b/src/mousetrap/app/environment.py.in
index be120d4..f4078f1 100644
--- a/src/mousetrap/app/environment.py.in
+++ b/src/mousetrap/app/environment.py.in
@@ -48,8 +48,15 @@ datadirname = "%s/@DATADIRNAME@" % prefix
## Directly mouseTrap data dir
mTDataDir = "%s/mouseTrap" % datadirname
-## The actuall running desktop manager.
-desktop = os.getenv("DESKTOP_MANAGER")
+## The username
+username = os.getlogin()
+
+## The current running desktop manager.
+try:
+ dbusd.bus.get_object("org.gnome.SessionManager", "/")
+ desktop = "gnome"
+except:
+ desktop = "other"
## The name of the O.S
osName = os.name
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]