Why does my $LD_LIBRARY_PATH get unset when using screen with bash?

Posted by UltraNurd on Super User See other posts from Super User or by UltraNurd
Published on 2010-06-16T21:41:18Z Indexed on 2010/06/16 21:43 UTC
Read the original article Hit count: 399

Filed under:
|
|
|

This is related to http://superuser.com/questions/27376/why-does-my-ld-library-path-get-unset-launching-terminal, but a different set of symptoms.

First, /usr/bin/screen is setuid as per the other question. Second, the default shell on this system is /bin/tcsh for various historical reasons, and we're not allowed to chsh to /bin/bash, so I typically run bash manually immediately after login. Third, I almost always use screen, but I want ctrl-a ctrl-c in screen to create a new bash "tab", so I always invoke bash first.

That is:

{~} $ echo $SHELL
/bin/tcsh
{~} $ bash
[~] echo $SHELL
/bin/bash
[~] screen -U
[~]

...and when reconnecting:

{~} $ echo $SHELL
/bin/tcsh
{~} $ screen -dUr
[~] echo $SHELL
/bin/bash
[~] 

However, my $LD_LIBRARY_PATH is there in tcsh, there in bash, but empty once I run screen; it is still present if I just run screen from tcsh, but then I get new tcsh "tabs" when I use ctrl-a ctrl-c in screen.

Any ideas?

© Super User or respective owner

Related posts about linux

Related posts about bash