proper place to set environment variables?

Chris Green cl at
Mon May 12 20:34:58 CEST 2014

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, e.g. I have in my .profile :-

    export CDPATH=.:$HOME:$HOME/src
    export LC_COLLATE=C
    export LC_CTYPE=en_GB.utf8
    export MPD_HOST=revo
    export NNTPSERVER=localhost
    export PGDATA=/var/lib/postgresql/data
    export PYTHONPATH=/home/chris/bin:/home/chris/bin/python
    export TERM=xterm

The above works with bash, if you're using a less 'clever' shell then
you need to set and export separately, e.g. :-

    export CDPATH

Chris Green

More information about the Xfce mailing list