I am running IPython Notebook on a vagrant virtual machine, and port-forwarding to my local machine so that I can view the notebook in my web browser. I run a bootstrap script that sets an an environment variable JYTHON_HOME in my /etc/environment with:
sudo echo "JYTHON_HOME=/usr/lib/jvm/jython" | sudo tee -a /etc/environment
source /etc/environment
The boot script later starts up ipython notebook. When I open up the notebook,
%%bash
cat /etc/environment
yeilds
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
JYTHON_HOME=/usr/lib/jvm/jython
but
%%bash
echo $JYTHON_HOME
prints an empty line.
I have also tried to append the export line to ~/.profile, /.profile, ~/.bashrc, and etc/profile, all with the same result. I know that the notebook is operating as root, but I can't seem to be able to get it to see my environment variable. What can I include in my boostrapping script that will remedy this?