13

I've recently installed virtualenv + virtualenvwrapper on Linux Mint 10 LXDE. For convenience I've added the standard WORKON_HOME settings to my ~/.profile

export WORKON_HOME=$HOME/Envs
source /usr/local/bin/virtualenvwrapper.sh

Then I've noticed that workon does not work after login, which means the above commands were not run. If I source ~/.profile then it works. I'm really not sure what could cause .profile not being run? I've checked and I don't have .bash_profile or .bashrc.

Raystafarian
  • 21,583
  • 11
  • 60
  • 89
Botond Béres
  • 265
  • 2
  • 3
  • 9

1 Answers1

13

~/.profile is only sourced for interactive login shells. If you're starting a shell that's interactive but it's not a login shell, then ~/.bashrc is sourced.

Dennis Williamson
  • 106,229
  • 19
  • 167
  • 187
  • See [this answer](http://superuser.com/questions/183870/difference-between-bashrc-and-bash-profile/183980#183980) and [this one](http://superuser.com/questions/205394/init-scripts-per-user/205972#205972) for more information. – Dennis Williamson Mar 01 '11 at 20:07
  • Yeah, looks like LXTerminal does not work with `~/.profile`. – Botond Béres Mar 01 '11 at 20:33
  • @Beres Botond: You originally wrote that your setting didn't work when you *logged in*. Now you're saying that it doesn't work when you *run LXTerminal*. If you're launching an LXTerminal from your window manager, you're not logging in. Generally speaking, ~/.profile *is* the place to set environment variables so that they affect the environment of all programs run after login, but you have to log out entirely and back in for those settings to have that effect. – garyjohn Mar 01 '11 at 20:58