Re: /etc/environment
>>>>> Frank Barknecht writes:
> I would like to add that ssh also reads /etc/environment and expects
> name=value pairs there only. So if you have lines like:
> PAGER=less
> export PAGER
> in /etc/environment, ssh complains about a bad syntax with this:
> Bad line in /etc/environment: export PAGER
> So even though I only use bash on my system, I can't easiliy keep
> environment-vars in /etc/environment without getting ugly warnings by ssh.
However, it appears that lines like:
export PAGER=less
will at least be accepted without error messages by ssh; you just end
up with "export PAGER=less" in your environment, which seems to be
harmless. After a very superficial test, it appears that you can have
an /etc/environment that contains BOTH forms, and get the best of both
worlds with only minor side effects:
export PAGER=less
PAGER=less
This is as close as I have come to getting /etc/environment to work as
advertised as a single location for global environment settings.
--
Gilbert Laycock email: gtl1@mcs.le.ac.uk
Maths and Computer Science, http://www.mcs.le.ac.uk/~glaycock
Leicester University phone: (+44) 116 252 3902
Reply to: