/etc/environment, variables aren't expanded

Florian Diesch diesch at spamfence.net
Sat May 17 11:25:41 UTC 2008

TomasN <nechtom at gmail.com> wrote:

> Dne Saturday 17 May 2008 04:47:26 Cameron Hutchison napsal(a):
>> I personally think /etc/environment is rather useless for the reasons
>> you've just found. It is too simplistic to just have KEY=VAL lines is a
>> lot of cases.
> Me too.
> I was just wondering why so many people recommend to put variables there.

* /etc/environment works with every shell, not just with sh-like shell 
  like /etc/profile does

* /etc/profile only gets read by login shells. For graphical logins
  you don't get a login shell so it's up to the X session
  configuration to read /etc/profile. It seems that gdm and kdm are
  doing this with most Linux distributions, but others may not.

**  Hi! I'm a signature virus! Copy me into your signature, please!  **

More information about the ubuntu-users mailing list