From: Sascha Silbe <sascha-pgp@silbe.org>
Subject: [PATCH] sugar-emulator: use sugar-specific dbus-session.conf if it exists (#1857)
Tell dbus-launch to use ~/.sugar/$SUGAR_PROFILE/dbus-session.conf if it exists.
This is useful for testing/using Rainbow with Sugar.
Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
---
src/jarabe/util/emulator.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/jarabe/util/emulator.py b/src/jarabe/util/emulator.py
index 607d840..34ef88b 100644
a
|
b
|
|
15 | 15 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
16 | 16 | |
17 | 17 | import os |
| 18 | import os.path |
18 | 19 | import signal |
19 | 20 | import subprocess |
20 | 21 | import time |
… |
… |
def main(): |
140 | 141 | os.environ['SUGAR_SCALING'] = options.scaling |
141 | 142 | |
142 | 143 | command = ['dbus-launch', '--exit-with-session'] |
| 144 | dbus_config = os.path.join(env.get_profile_path(), 'dbus-session.conf') |
| 145 | if os.path.exists(dbus_config): |
| 146 | command += ['--config-file='+dbus_config] |
143 | 147 | |
144 | 148 | if not args: |
145 | 149 | command.append('sugar') |