From cebf9cfe334e0bc185179682a2bfa57836993f05 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 19 Dec 2006 16:00:50 -0500 Subject: [PATCH] Use correct DBus session bus when launching activities --- shell/sugar-activity | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/shell/sugar-activity b/shell/sugar-activity index 8a237aee..c4a14cfa 100755 --- a/shell/sugar-activity +++ b/shell/sugar-activity @@ -20,5 +20,13 @@ import sys import os from sugar.activity import ActivityFactory +from sugar import env + +ppath = env.get_profile_path() +bus_file = os.path.join(ppath, "session_bus_address") +f = open(bus_file, "r") +bus_name = f.read() +f.close() +os.environ['DBUS_SESSION_BUS_ADDRESS'] = bus_name ActivityFactory.create(sys.argv[1])