proper place to set environment variables?

Ralf Mardorf ralf.mardorf at alice-dsl.net
Tue May 13 06:18:44 CEST 2014


On Mon, 2014-05-12 at 17:26 -0700, John Gabriele wrote:
> I tried creating a ~/.xsessionrc, then put this in it:
> 
>     export PATH=$HOME/bin:$HOME/.cabal/bin:$PATH
>     export TERM=xterm-256color
> 
> logout, login, and then found that `echo $PATH` shows the expected
> PATH (with ~/bin and ~/.cabal/bin in it), but `echo $TERM` returns
> just "xterm". (?!)

So seemingly after ~/.xsessionrc is processed, something else does set
TERM too. Perhaps something else does it always, or it's a race
condition. IOW there's no universal "proper place" to set variables.
What's the right place depends on how you set up your install, or what
distro specific defaults you're using and especially what variable you
want to set, for what usage.



More information about the Xfce mailing list