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

Re: Default language for system



* Goswin Brederlow said:
> Tomohiro KUBOTA <kubota@surfchem0.riken.go.jp> writes:
> 
> > Marek Habersack wrote:
> > > The only universal solution
> > > to all that I can see is to have a self-destroying script that would ask the
> > > user when s/he logins first what language to set up for him and then modify
> > > the appriopriate shell startup file. Sure, it's a dirty solution, but I
> > > can't think of any other at that moment :((
> 
> In what language should the question be given? English, italian,
> dutch, chinese?
> getty and display a set of possible languages somewhere on screen in
> their native writeing. Something like this:
> 
> F1 English  F2 Deutsch  F3 Italiano  F4 <some japanese characters saying japanese>
Something like that, but it's better to use a scrollable menu, because you
might find yourself out of function keys :))
 
> > (2) the admin is very sure all of the users of the machine are Polish 
> >     speaker and they prefer Polish to English, and 
> > (3) no one use Polish-disabled console environment,
> 
> Then he can set LANG in /etc/enviroment and unset it for any new user
> not wanting polish.
Too much trouble.
 
> > then you can set LANG in /etc/environment, while I prefer to set it in 
> > dot-files in the home directories for all users.  If the admin prefer
> > English or s/he knows there are non-Polish-speaker user, the admin can
> > select not to set LANG.  To force is bad but to offer selections is good.
> 
> Hmm, does the pam modules check for ~/.enviroment? That should be done 
> if enabled in the config. That way new users would get the
> /etc/skel/.enviroment file and have the default language set.
No, I guess not. But I have an idea floating in my mind of modifying the env
module to check for the presence of the .lang file in the user's directory
and set the LANG variable to its contents. Of course, it would have take
some precautions NOT to insert anythig dangerous. Also, pam_env could be
extended to support a separate config file interpreted after the user is
already authenticated but before invoking his shell. This file would allow
for setting per-user environment variables, per-group ones etc. This would
allow for creating a system-level set of envvars and then fine-tuning it for
every single user without messing with his homedir:

1. Read /etc/environment
2. Read /etc/security/pam_env.conf
3. Authenticate user
4. Parse /etc/security/pam_user_env.conf
5. Read ~/.lang and set LANG appropriately.

Comments?

marek

Attachment: pgpqGi2lsj66F.pgp
Description: PGP signature


Reply to: