Ar Maw, 2010-06-22 am 14:38 +0100, ysgrifennodd Mick: 
> I'm also interested in this - although my question is probably simpler:
> 
> I would like to use en_GB but I do not undestand why running 'locale'
> as a plain user shows:
> 
> $ locale
> LANG=en_US.UTF-8
> LC_CTYPE="en_US.UTF-8"
> LC_NUMERIC="en_US.UTF-8"
> LC_TIME="en_US.UTF-8"
> LC_COLLATE="en_US.UTF-8"
> LC_MONETARY="en_US.UTF-8"
> LC_MESSAGES="en_US.UTF-8"
> LC_PAPER="en_US.UTF-8"
> LC_NAME="en_US.UTF-8"
> LC_ADDRESS="en_US.UTF-8"
> LC_TELEPHONE="en_US.UTF-8"
> LC_MEASUREMENT="en_US.UTF-8"
> LC_IDENTIFICATION="en_US.UTF-8"
> LC_ALL=en_US.UTF-8
> 
> why when running it as root:
> 
> # locale
> LANG=
> LC_CTYPE="POSIX"
> LC_NUMERIC="POSIX"
> LC_TIME="POSIX"
> LC_COLLATE="POSIX"
> LC_MONETARY="POSIX"
> LC_MESSAGES="POSIX"
> LC_PAPER="POSIX"
> LC_NAME="POSIX"
> LC_ADDRESS="POSIX"
> LC_TELEPHONE="POSIX"
> LC_MEASUREMENT="POSIX"
> LC_IDENTIFICATION="POSIX"
> LC_ALL=
> 
> 
> I do not have set a /etc/env.d/02locale yet, so where is my plain user
> locale being read from?
Your plain user locale is usually read from ~/.bashrc, this can be set
to en_GB by having the following lines:
export LANG="en_GB.UTF-8" 
export LC_COLLATE="C"

This will only affect that user but if you want to define a locale globally you 
have to adjust the file in /etc/env.d/02locale to have the top two lines read 
this:
LANG="en_GB.UTF-8"
LC_COLLATE="C"

After you've done that do "env-update && source /etc/profile" for the global 
settings or just source ~/.bashrc for the user's settings.

Hope this helps
-- 
Cofion

Christopher Swift (ianto) - christopher dot swift at linux dot com


Reply via email to