I have a shell script to set up some environment variables and launch whatever program I send in as an argument:
export PATH=$HOME/local/bin:$PATH
export LD_LIBRARY_PATH=$HOME/local/lib:$LD_LIBRARY_PATH
export TESTER="MY TEST VAR"
$@
When I use this to call bash
for example it works:
kjfletch@flatbed:~$ envrun.sh bash
kjfletch@flatbed:~$ echo $LD_LIBRARY_PATH
/home/kjfletch/local/lib:
kjfletch@flatbed:~$ echo $TESTER
MY TEST VAR
When I use it to call a terminal (xterm
, aterm
, ...) my LD_LIBRARY_PATH
gets unset:
kjfletch@flatbed:~$ echo $LD_LIBRARY_PATH
kjfletch@flatbed:~$ echo $TESTER
MY TEST VAR
Why does this happen? How can I stop this? (I am running Debian 5.0)
Update
My terminal is not calling bash as a login:
kjfletch@flatbed:~$ echo $0
bash
My LD_LIBRARY_PATH
does not show up in any of the bash startup files (apart from .bash_history and ~/.profile does not exist.):
kjfletch@flatbed:~$ grep "LD" ~/.bash*
kjfletch@flatbed:~$ grep "LD" /etc/bash.bashrc
kjfletch@flatbed:~$ grep "LD" /etc/profile
No comments:
Post a Comment