Can't set LD_LIBRARY_PATH in .gnomerc
ZIYAD A. M. AL-BATLY
zamb at spymac.com
Sun Apr 24 17:07:36 UTC 2005
On Sun, 2005-04-24 at 09:30 -0400, James Carroll wrote:
> Here's what I put in .gnomrc. the PYTHONPATH does show up in a shell
> later, but LD_LIBRARY_PATH doesn't which makes me think something else
> is unsetting it.
>
> export PATH=/opt/wx/2.5/bin:/opt/jdk/bin:$PATH
> export LD_LIBRARY_PATH=/opt/wx/2.5/lib:$LD_LIBRARY_PATH
> export WXDIR=/home/jimc/wxPython-src-2.5.5.1
> export PYTHONPATH=$WXDIR/wxPython:$PYTHONPATH
>
> -Jim
(If anyone have more info on the subject, please enlighten us!)
Okay. It seem that it's an intended behaviour for security reasons.
Quote from ld.so man page:
The necessary shared libraries needed by the program are
searched for in the following order
* Using the environment variable LD_LIBRARY_PATH. Except
if the executable is a setuid/setgid binary, in which
case it is ignored.
The file ~/.gnomerc is actually sourced *before* GNOME is loaded, and
it's done by X, and because X is a setuid executable, will,
LD_LIBRARY_PATH is ignored! (By the way, ~/.gnomerc is sourced from the
file:
/etc/X11/Xsession.d/55gnome-session_gnomerc
in case you wanted to know that.)
The best solution for you (in my not-so-experienced opinion) is to put
the LD_LIBRARY_PATH setting in /etc/profile. Be warned that *all* users
will be affected by that.
Ziyad.
More information about the ubuntu-users
mailing list