Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Solved] Change locale in multi user Debian laptop

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
User avatar
PsySc0rpi0n
Posts: 322
Joined: 2012-10-24 13:54
Location: Bitcoin World
Has thanked: 8 times
Been thanked: 1 time

[Solved] Change locale in multi user Debian laptop

#1 Post by PsySc0rpi0n »

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
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Change locale in multi user Debian laptop

#2 Post by Head_on_a_Stick »

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:~ $
deadbang

User avatar
PsySc0rpi0n
Posts: 322
Joined: 2012-10-24 13:54
Location: Bitcoin World
Has thanked: 8 times
Been thanked: 1 time

Re: Change locale in multi user Debian laptop

#3 Post by PsySc0rpi0n »

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: 322
Joined: 2012-10-24 13:54
Location: Bitcoin World
Has thanked: 8 times
Been thanked: 1 time

Re: Change locale in multi user Debian laptop

#4 Post by PsySc0rpi0n »

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: 322
Joined: 2012-10-24 13:54
Location: Bitcoin World
Has thanked: 8 times
Been thanked: 1 time

Re: Change locale in multi user Debian laptop

#5 Post by PsySc0rpi0n »

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
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

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

#6 Post by Head_on_a_Stick »

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

User avatar
PsySc0rpi0n
Posts: 322
Joined: 2012-10-24 13:54
Location: Bitcoin World
Has thanked: 8 times
Been thanked: 1 time

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

#7 Post by PsySc0rpi0n »

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.

pendrachken
Posts: 1394
Joined: 2007-03-04 21:10
Location: U.S.A. - WI.

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

#8 Post by pendrachken »

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

Post Reply