11

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.

12

~/.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.

  • See this answer and this one for more information. – Dennis Williamson Mar 1 '11 at 20:07
  • Yeah, looks like LXTerminal does not work with ~/.profile. – Botond Béres Mar 1 '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 1 '11 at 20:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.