Ticket #1857: 1857.patch

File 1857.patch, 1.2 KB (added by sascha_silbe, 13 years ago)

sugar-emulator: use sugar-specific dbus-session.conf if it exists

  • src/jarabe/util/emulator.py

    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  
    1515# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    1616
    1717import os
     18import os.path
    1819import signal
    1920import subprocess
    2021import time
    def main(): 
    140141        os.environ['SUGAR_SCALING'] = options.scaling
    141142
    142143    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]
    143147
    144148    if not args:
    145149        command.append('sugar')