From 911e71542beb26c0139f9b6249e73ee4d87837e4 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Wed, 28 Jul 2010 15:26:15 -0400 Subject: [PATCH] Set LD_LIBRARY_PATH before running dconf When we are manually starting dconf in the case where it can't be activated via D-Bus, we need to set LD_LIBRARY_PATH in its environment, since dconf is no longer linked with a rpath. (Unlike the rest of GNOME, it doesn't use libtool.) --- src/gnome-shell.in | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/gnome-shell.in b/src/gnome-shell.in index 493c0b4f9..794e811d9 100755 --- a/src/gnome-shell.in +++ b/src/gnome-shell.in @@ -149,9 +149,18 @@ def start_dconf_await_service(): print "Starting dconf-service... ", sys.stdout.flush() + # dconf is linked without libtool, so unlike other GNOME modules, + # won't have an embedded rpath for its library directory. + env = dict(os.environ) + if 'LD_LIBRARY_PATH' in env: + ld_library_path = '@libdir@:' + env['LD_LIBRARY_PATH'] + else: + ld_library_path = '@libdir@' + env['LD_LIBRARY_PATH'] = ld_library_path + dconf_path = os.path.join('@libexecdir@', 'dconf-service') try: - subprocess.Popen([dconf_path, '--keep-alive']) + subprocess.Popen([dconf_path, '--keep-alive'], env=env) except OSError, e: print "\nFailed to start %s: %s" % (dconf_path, e) sys.exit(1)