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

Re: Default language for system



Marek Habersack <grendel@vip.net.pl> writes:

> [1  <text/plain; us-ascii (quoted-printable)>]
> * 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 :))

Scrollbar on a text console? A "F20 more" might be the best one can do 
there. But I think a system where more than 3 languages will be
installed should be rarely needed.

> > 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?

Why use ~/.lang? That should use ~/.enviroment.
I want to set the bash to 8 Bit but keep the english error
messages. So ~/.lang wouldn´t help there.

As to the precautions what gets inserted, no matter what gets inserted 
shouldn´t be a security problem. The only thing the user could do is
getting himself logged out immediatly or screw otherwise screw his
account.

To do the same you can just modify .login.

May the Source be with you.
			Goswin


Reply to: