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

 

 

 

locale change fails (partially)

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
ChameleonScales
Posts: 40
Joined: 2019-05-14 07:09

locale change fails (partially)

#1 Post by ChameleonScales »

Hi,
I'm on Debian 10.1 (upgraded from stretch) XFCE.
I'm trying to change my locale to US english but only succeded in parts of the system. The rest doesn't change after various attempts. Here's what I tried:

Code: Select all

sudo dpkg-reconfigure locales
There I activated en_US.UTF-8 and deactivated fr_FR.UTF-8, confirmed and selected the en_US as the default.
After that I rebooted the system and ran: $ locale

Code: Select all

locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=fr_FR.utf8
LANGUAGE=
LC_CTYPE="fr_FR.utf8"
LC_NUMERIC="fr_FR.utf8"
LC_TIME="fr_FR.utf8"
LC_COLLATE="fr_FR.utf8"
LC_MONETARY="fr_FR.utf8"
LC_MESSAGES="fr_FR.utf8"
LC_PAPER="fr_FR.utf8"
LC_NAME="fr_FR.utf8"
LC_ADDRESS="fr_FR.utf8"
LC_TELEPHONE="fr_FR.utf8"
LC_MEASUREMENT="fr_FR.utf8"
LC_IDENTIFICATION="fr_FR.utf8"
LC_ALL=
so clearly that didn't work.

Then I ran

Code: Select all

$ export LANGUAGE=en_US.UTF-8
$ export LANG=en_US.UTF-8
$ env | grep LANG
LANG=en_US.UTF-8
but then if I close and reopen the terminal I get this:

Code: Select all

$ env | grep LANG
LANG=fr_FR.utf8
even though /etc/default/locale looks like this:

Code: Select all

#  File generated by update-locale
LANG=en_US.UTF-8
I also tried running all the above commands as root, still to no avail.

User avatar
Bloom
df -h | grep > 90TiB
df -h | grep > 90TiB
Posts: 504
Joined: 2017-11-11 12:23
Been thanked: 26 times

Re: locale change fails (partially)

#2 Post by Bloom »

You probably need to logoff and logon again for this to work.

ChameleonScales
Posts: 40
Joined: 2019-05-14 07:09

Re: locale change fails (partially)

#3 Post by ChameleonScales »

I did this countless times.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: locale change fails (partially)

#4 Post by Head_on_a_Stick »

Is there anything set in /etc/environment?

Try editing /etc/locale.gen directly then run locale-gen afterwards.

Or perhaps

Code: Select all

localectl
deadbang

ChameleonScales
Posts: 40
Joined: 2019-05-14 07:09

Re: locale change fails (partially)

#5 Post by ChameleonScales »

I opened both files and:
- etc/environment was empty
- etc/locale.gen had en_US.UTF-8 UTF-8 commented out

so I ran :

Code: Select all

$ sudo locale-gen
Generating locales (this might take a while)...
  en_US.UTF-8... done
And then :

Code: Select all

$ localectl
   System Locale: LANG=en_US.UTF-8
       VC Keymap: n/a
      X11 Layout: fr
       X11 Model: pc105
     X11 Variant: latin9
Nothing seems to have changed (even after reboot)
I'm not sure what to do next.

Post Reply