Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/sugar-shell
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2007-03-09 16:29:03 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2007-03-09 16:29:03 (GMT)
commit6c5d28ecf516cca2ad317983fade3dbf0061d6e6 (patch)
tree2bcc93351c62201baedd738c46bfceffe6fd12f6 /shell/sugar-shell
parenta5d303f9ff96cb17a4fb10e611314e7c1c440c7e (diff)
Save also the sugar session display and use it in sugar-activity.
Diffstat (limited to 'shell/sugar-shell')
-rwxr-xr-xshell/sugar-shell11
1 files changed, 9 insertions, 2 deletions
diff --git a/shell/sugar-shell b/shell/sugar-shell
index 4b67e96..277030d 100755
--- a/shell/sugar-shell
+++ b/shell/sugar-shell
@@ -18,6 +18,7 @@
import sys
import os
+from ConfigParser import ConfigParser
if len(sys.argv) == 2:
sys.path.insert(0, sys.argv[1])
@@ -55,9 +56,15 @@ if not key or not len(key):
#
# WARNING!!! this is going away at some near future point, do not rely on it
#
-dsba_file = os.path.join(env.get_profile_path(), "session_bus_address")
+dsba_file = os.path.join(env.get_profile_path(), "session.info")
f = open(dsba_file, "w")
-f.write(os.environ["DBUS_SESSION_BUS_ADDRESS"])
+
+cp = ConfigParser()
+cp.add_section('Session')
+cp.set('Session', 'dbus_address', os.environ['DBUS_SESSION_BUS_ADDRESS'])
+cp.set('Session', 'display', gtk.gdk.display_get_default().get_name())
+cp.write(f)
+
f.close()
model = ShellModel()