Since the default /bin/sh is dash nowadays, note that our Xsession cannot safely source .bash_profile. Since .bash_profile sources .bashrc, you can put everything there instead, and that will be sourced by terminals started within X.
.pam_environment is also useful for simple unconditional setting of environment variables that will be used in all login sessions. -- .bash_profile is not sources when X session starts https://launchpad.net/bugs/66004 -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs