[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: global environment variables?



dman wrote:

> I could try /etc/environment for myself, but I don't think it will
> work.  Also I wanted to do this for just my user and let others stick
> with the default $LANG.

Then the right thing to do is probably put code at the end of
/etc/environment (which is sourced by the Gnome session script, so it
can contain any Bourne-style shell code you want) like this:

  if [ -f $HOME/.environment ]; then
      . $HOME/.environment
  fi

This way, any user who wants to customize his login environment can
simply create a file in his home directory called .environment, and put
any shell code that he wants (probably mostly environment variable
settings, hence the filename) in there. Users who don't care can simply
not have the file.

Craig



Reply to: