Re: /etc/environment
On Tue, Feb 24, 1998 at 10:24:42AM -0500, Adam P. Harris wrote:
> >already exists: /etc/environment. It's used by login and ssh
> >already.
>
> Christian, you ought to bring this up as a new policy topic on the
> debian-policy list. Unless it's policy, it's not really meaningful,
> since it will be inconsistently implemented.
>
> Also, it's not that simple: remember csh users?
Yes, it is that simple. It isn't read by the user's shell. It's read by
login or ssh, and is inherited by the user's shell and therefore all their
other programs.
In the case of xdm logins, it can be read in the Xsession[1] which is always
a sh script, and will then be inherited by their window manager, and so by
any shells etc that are in xterms they open.
[1] Since I mentioned that I do this, a couple of people have emailed me
asking for my script. It doesn't actually work properly (it doesn't ignore
comments, and it should) but if anyone wants a play with it, what I have at
the moment is the following:
#!/bin/sh
#
# Script to read environment from /etc/environment
#
exec 9</etc/environment
while read line <&9; do
case "${line-}" in
'') continue;;
'#*') continue;;
esac
export ${line-}
done
exec 9<&-
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: