After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 592943 - LD_LIBRARY_PATH (etc.) in gnome-shell --replace environment
LD_LIBRARY_PATH (etc.) in gnome-shell --replace environment
Status: RESOLVED NOTABUG
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2009-08-24 19:34 UTC by Colin Walters
Modified: 2011-02-09 18:05 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Colin Walters 2009-08-24 19:34:22 UTC
This is purely a gnome-shell --replace issue that just impacts developers/testers etc using jhbuild, but one of the side effects of using gnome-shell --replace inside jhbuild is that the jhbuild environment gets propagated into programs launched from the shell.

A consequence of this is that we fail to launch firefox if it's linked against a different xulrunner.  Another one is that if you launch a shell (gnome-terminal+bash) say, it's implicitly inside "jhbuild run" which may not be what you want.

I think we should explicitly clear the jhbuild environment early in the shell startup to avoid these things, and preserve as much as possible that jhbuild is restricted to "jhbuild run".
Comment 1 Owen Taylor 2009-08-24 20:02:03 UTC
Unless you want to break late imports from JS files, I don't see how you could clear LD_LIBRARY_PATH except for doing it in the environment of the launched process.

Assuming that's possible with the gio-based launching, I guess we could pass in GNOME_SHELL_ORIGINAL_LD_LIBRARY_PATH environment variables, etc, but I'm not sure how much hackery is desirable here.
Comment 2 Colin Walters 2009-08-24 22:37:27 UTC
Arg, good point.  Could we just import the things we depend on in main.js?, and then unset LD_LIBRARY_PATH in start().
Comment 3 Dan Winship 2009-08-26 18:33:12 UTC
Why do you have a xulrunner install in your gnome-shell prefix? It seems to me like that's your bug; if you only have the stuff from the gnome-shell jhbuild moduleset installed there, then you shouldn't run into any problems.

A counter-example of why inheriting LD_LIBRARY_PATH is the Right Thing: while i was testing sidebar configuration stuff, I used gconf-editor inside gnome-shell to tweak things; this wouldn't have worked correctly if I didn't have LD_LIBRARY_PATH pointing to the new hacked-up libgconf that knew how to see the gnome-shell schemas. (I guess I could have done "jhbuild run gconf-editor", but...)
Comment 4 Owen Taylor 2009-08-26 20:17:16 UTC
I think this was very particular to the screwed up xulrunner on Ubuntu/Debian and the hacks we do to work around that in the gnome-shell start script.

When the xulrunner we are finding with our pkg-config hack is different than the one that the installed firefox wants, then bad things happen.

The solution is probably to actually dig in and investigate rpaths more and see if we can get an rpath into gnome-shell.so that will make it find the right xulrunner without setting LD_LIBRARY_PATH.... will take a brave volunteer.
Comment 5 Dan Winship 2011-02-09 18:05:22 UTC
this was never agreed to be the wrong behavior, and will soon be mostly irrelevant anyway