[Solved] Change locale in multi user Debian laptop

If none of the more specific forums is the right place to ask

[Solved] Change locale in multi user Debian laptop

Postby PsySc0rpi0n » 2019-12-28 13:40

Can I change the OS language only for a specific user? If so, how?
Last edited by PsySc0rpi0n on 2019-12-30 00:17, edited 1 time in total.
User avatar
PsySc0rpi0n
 
Posts: 138
Joined: 2012-10-24 13:54
Location: Portugal

Re: Change locale in multi user Debian laptop

Postby Head_on_a_Stick » 2019-12-28 14:37

Code: Select all
empty@E485:~ $ localectl
   System Locale: LANG=en_GB.UTF-8
                  LANGUAGE=en_GB:en
       VC Keymap: uk
      X11 Layout: gb
       X11 Model: pc105
empty@E485:~ $ localectl set-locale en_US.UTF-8                                         
empty@E485:~ $ localectl                                                                 
   System Locale: LANG=en_US.UTF-8
                  LANGUAGE=en_GB:en
       VC Keymap: uk
      X11 Layout: gb
       X11 Model: pc105+inet
     X11 Options: terminate:ctrl_alt_bksp
empty@E485:~ $
User avatar
Head_on_a_Stick
 
Posts: 11021
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Change locale in multi user Debian laptop

Postby PsySc0rpi0n » 2019-12-28 20:18

I think I have already duplicated this thread... Going to ask to delete the other one.

Anyway, I tried that in my other account and it says the same as if I issue that command under my own account, so I guess that's for the whole system and not user specific.

And the output of:
Code: Select all
localectl status


is:
Code: Select all
$ localectl status
   System Locale: LANG=pt_PT.utf8
                  LANGUAGE=en_GB:en
                  LC_MESSAGES=C
       VC Keymap: n/a
      X11 Layout: pt
       X11 Model: pc105


And I can't change the LANGUAGE variable. I tried (from my new account) with:
Code: Select all
su -c "localectl set-locale LANGUAGE=pt_PT.utf8"


but then, this setting vanished from the output of
Code: Select all
su -c "localectl status"


so I added it again using:
Code: Select all
su -c "export LANGUAGE=pt_PT.utf8"


However, it didn't assume the pt_PT.utf8. It kept the en_GB:en setting.

Why yhe hell this must be so insanely hard?
User avatar
PsySc0rpi0n
 
Posts: 138
Joined: 2012-10-24 13:54
Location: Portugal

Re: Change locale in multi user Debian laptop

Postby PsySc0rpi0n » 2019-12-28 20:20

I have also tried the 2nd section of this link but everything is still in english:

https://wiki.debian.org/ChangeLanguage

How to change the language of KDE applications

Show available languages:( DebSearch:kde-l10n )

apt-cache search kde-l10n
Change the language:

apt-get install kde-l10n-thetwoletter (of your country)
as an example (for german 'de'utschland) :

apt-get install kde-l10n-de
Now you have your language in all KDE applications!
User avatar
PsySc0rpi0n
 
Posts: 138
Joined: 2012-10-24 13:54
Location: Portugal

Re: Change locale in multi user Debian laptop

Postby PsySc0rpi0n » 2019-12-29 21:23

I have also tried to set
Code: Select all
LANG=pt_PT.uft8
LANGUAGE=pt_PT:pt

in my .profile and logout and log back in but my new user account is still in English.

Any help?
User avatar
PsySc0rpi0n
 
Posts: 138
Joined: 2012-10-24 13:54
Location: Portugal

Re: [Solved] Change locale in multi user Debian laptop

Postby Head_on_a_Stick » 2019-12-30 09:38

Use the tools available for your desktop environment. And why is this marked [SOLVED]? If you have a solution then please post it.
User avatar
Head_on_a_Stick
 
Posts: 11021
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: [Solved] Change locale in multi user Debian laptop

Postby PsySc0rpi0n » 2019-12-30 11:10

Head_on_a_Stick wrote:Use the tools available for your desktop environment. And why is this marked [SOLVED]? If you have a solution then please post it.


Using the desktop environment tools was not enough. I set everything I could to the required language bur for some reason, it didn't work.
I end up adding these lines to file .profile

Code: Select all
LANG=pt_PT.UTF-8
LANGUAGE=pt_PT.UTF-8
LC_MESSAGES=pt_PT.UTF-8


That's how I solved it.
User avatar
PsySc0rpi0n
 
Posts: 138
Joined: 2012-10-24 13:54
Location: Portugal

Re: [Solved] Change locale in multi user Debian laptop

Postby pendrachken » 2020-01-01 14:49

Arch has a pretty good writeup of how locale can be set on a per user basis:

https://wiki.archlinux.org/index.php/lo ... er_session




I haven't had to mess with Debian locales in a while, but that follows the standard conventions of $HOME/.config/application_config being read and used before the system wide setting, so should work the same way.
fortune -o
Your love life will be... interesting.
:twisted: How did it know?

The U.S. uses the metric system too, we have tenths, hundredths and thousandths of inches :-P
pendrachken
 
Posts: 1358
Joined: 2007-03-04 21:10
Location: U.S.A. - WI.


Return to General Questions

Who is online

Users browsing this forum: No registered users and 9 guests

fashionable