[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Default locale policy



On Sun, Nov 12, 2006 at 06:36:37PM +0900, Osamu Aoki wrote:
> I think this is what we should expect under UTF-8 encoding:

> Console and daemon should run under:
>  --> For en_* and all non-latain character countrues:
>        en_US.UTF-8
>  --> For non-english latain character countries may choose:
>        *.UTF-8 (Fr, De, It,...) but I think en_US.UTF-8 is OK too.

> Then X applications should run under locale:
>        *.UTF-8

> I see 2 critical files:
>   /etc/environment
>   /etc/default/locale

> I think changing as following will help:

> | atd:auth           required pam_env.so
> | cron:auth          required pam_env.so
> | gdm:auth           required pam_env.so read_env=1
> | gdm:auth           required pam_env.so read_env=1 envfile=/etc/default/locale
> | gdm-autologin:auth required pam_env.so read_env=1
> | gdm-autologin:auth required pam_env.so read_env=1 envfile=/etc/default/locale
> | login:session      required pam_env.so readenv=1
> | ssh:auth           required pam_env.so # [1]
> | ssh:# auth           required pam_env.so envfile=/etc/default/locale
> | su:session         required pam_env.so readenv=1

>   /etc/environment      LANG=en_US.UTF-8
>   /etc/default/locale   LANG=ja_JP.UTF-8

> This way we use /etc/default/locale for GDM while others use default
> /etc/environment.  (Thanks to recent bug #361090 fix which some people
> oppose and reopened bug.)  

No, this is inappropriate.  The reason /etc/default/locale was split from
/etc/environment is because /etc/environment is always intended to be used
by (and owned by) PAM, but /etc/default/locale is intended as a
general-purpose file, guaranteed to be parseable as a simple shell
assignment, that tells applications what the "system" locale is.

If there is a need for a different "system" locale between the console and
X, then some other method would need to be devised.  Please do not attempt
to overload the existing files for this.

Thanks,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
vorlon@debian.org                                   http://www.debian.org/



Reply to: