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.)
This commit is contained in:
parent
43de15c3fc
commit
911e71542b
@ -149,9 +149,18 @@ def start_dconf_await_service():
|
|||||||
print "Starting dconf-service... ",
|
print "Starting dconf-service... ",
|
||||||
sys.stdout.flush()
|
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')
|
dconf_path = os.path.join('@libexecdir@', 'dconf-service')
|
||||||
try:
|
try:
|
||||||
subprocess.Popen([dconf_path, '--keep-alive'])
|
subprocess.Popen([dconf_path, '--keep-alive'], env=env)
|
||||||
except OSError, e:
|
except OSError, e:
|
||||||
print "\nFailed to start %s: %s" % (dconf_path, e)
|
print "\nFailed to start %s: %s" % (dconf_path, e)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user