Re: $LANG and su seems strange
On 11 Jun 2003 solo turn <firstname.lastname@example.org> wrote:
> logging in gives as any user:
> # echo $LANG
> but if you do "su - myuser", the user does not have this language set.
> where does this come from?
You do not tell if the 'logging in as any user' takes place on a virtual
console or through a graphical login manager. If the latter, an explanation
could be that the graphical login manager sets LANG but the startup scripts
of the login shell of 'myuser' do not. With su -, myuser does not inherit
the environment of the user doing the su.
To understand what currently happens, find out where LANG is set.
Assuming the use of xdm and bash, it could be in:
To ensure the locale is always set as you like, put the statement
export LANG=en_US.ISO-8859-15 LC_ALL=en_US.ISO-8859-15
preferably in, I think:
/etc/X11/Xsession system wide setting for X sessions
~/.xsession user preference for X sessions
/etc/profile system wide setting for shells
~/.bash_profile user preference for shells
Anjelierstraat 1, 2014 TC Haarlem, Netherlands
tel +31 23 5324909, email@example.com