environment variables in terminal

17 views
Skip to first unread message

Gideon Simpson

unread,
Dec 26, 2017, 3:44:28 PM12/26/17
to Project Jupyter
I'm running a jupyter notebook server and occasionally I also make use of the terminals on the server.  I noticed that when I open one of these web based terminals, it does not appear to source my .profile which sets an LD_LIBRARY_PATH variable needed for some libraries.  Is there a way I can either get jupyter to source the .profile or otherwise get those environment variables in, by default?

Lawrence D’Oliveiro

unread,
Dec 26, 2017, 3:57:22 PM12/26/17
to Project Jupyter
On Wednesday, December 27, 2017 at 9:44:28 AM UTC+13, Gideon Simpson wrote:
... when I open one of these web based terminals, it does not appear to source my .profile which sets an LD_LIBRARY_PATH variable needed for some libraries.

From the docs:

When Bash is invoked as an interactive login shell ... it looks for ... ~/.profile ...

When an interactive shell that is not a login shell is started, Bash reads and executes commands from ~/.bashrc, if that file exists.

So this is expected behaviour for a non-login shell.

Roland Weber

unread,
Dec 27, 2017, 1:53:05 AM12/27/17
to Project Jupyter
As explained by Lawrence: set your LD_LIBRARY_PATH in .bashrc instead of .profile.
Reply all
Reply to author
Forward
0 new messages