Why I can't store LD_LIBRARY_PATH in profile ?
Hi,
I can't store LD_LIBRARY_PATH in /etc/profile. After restart the variable is empty. All OK with any other variable, for example INFORMIXDIR, but not with LD_LIBRARY_PATH. If I use EXPORT command in the console all OK. I'm using Ubuntu 10.04. What's wrong? |
Are you sure you add:
Code:
export LD_LIBRARY_PATH=/some/path:/some/other/path |
yes, I'm sure. It looks like something unset this variable. I also tried to set in .profile, the same result. Any other variable works fine.
|
Just tested on an Ubuntu server (no X) and it works. In fact I can set it either through /etc/profile, /etc/bash.bashrc or in a file /etc/profile.d/ld_library.sh
Reading this, looks like it's unset when gdm starts. There are 2 workarounds (posts #17 and #21) there, so try any of them and see if you manage to keep the variable set. |
Dear bathory, thank you for your prompt and quick response. Post 17 from your link resolved my problem.
|
LD_LIBRARY_PATH is still empty in xterm. How to store the variable for xterm too?
PATH is OK in xterm but not LD_LIBRARY_PATH. |
Does this happen only for xterm, or for other terminals too? I don't get it. If the variable is set globally, how can it be unset per application.
Anyway you can create an alias Code:
alias xterm='LD_LIBRARY_PATH=/some/path:/other/path /usr/bin/xtern' |
where can I type it? in the console or store in some file? I checked only xterm and terminal. terminal is OK.
|
If you want to set it only for you, you can put it in ~/.bashrc. In general in /etc/bash.bashrc, but you should check if it works
|
thanks for the idea, but it doesn't work for me
I've added alias xterm='LD_LIBRARY_PATH=/mypath1:/mypath2 /usr/bin/xterm' to ~/.bashrc LD_LIBRARY_PATH still empty in xterm. Any other variables are OK - PATH, ORACLE_HOME, etc. |
Another ubuntu "bug"! Solution on post #3 (remove suid/sgid)
|
thanks for the link, how can I remove the s-flags from xterm?
|
Run either one:
Code:
chmod -s /usr/bin/xterm |
BIG THANKS!!!
it works!!! |
All times are GMT -5. The time now is 02:48 PM. |