[gnome-shell] Set LD_LIBRARY_PATH before running dconf



commit 911e71542beb26c0139f9b6249e73ee4d87837e4
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Wed Jul 28 15:26:15 2010 -0400

    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 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/gnome-shell.in b/src/gnome-shell.in
index 493c0b4..794e811 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)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]