proper place to set environment variables?
John Gabriele
jgabriele at fastmail.fm
Tue May 13 02:26:02 CEST 2014
On Mon, May 12, 2014, at 11:34 AM, Chris Green wrote:
> On Mon, May 12, 2014 at 11:09:40AM -0700, John Gabriele wrote:
> > Hi,
> >
> > I'm running as my desktop a stock Debian "Testing" (which is currently
> > aliased to "jessie") system with Xfce 4.10, and log in graphically via
> > LightDM.
> >
> > Where is the proper location to set environment variables? That is, I
> > tried doing so in ~/.profile, but that file does not appear to be
> > sourced when logging into the desktop (I think it may when logging in
> > via text console though).
> >
> Things put into .profile *should* be there when you run the desktop.
>
> You need to export them though,
I did export them, though it still fails. Did another quick test; in my
~/.profile, added:
export FOOBAR="hello"
then logged out, logged in, and tried
echo $FOOBAR
and get nothing. So, it doesn't look like ~/.profile is getting sourced.
I then tried something else, which I found after more searching around:
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". (?!)
-- John
More information about the Xfce
mailing list