locale change fails (partially)

Kernels & Hardware, configuring network, installing services

locale change fails (partially)

Postby ChameleonScales » 2019-10-06 15:51

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.
ChameleonScales
 
Posts: 12
Joined: 2019-05-14 07:09

Re: locale change fails (partially)

Postby Bloom » 2019-10-06 16:02

You probably need to logoff and logon again for this to work.
User avatar
Bloom
 
Posts: 193
Joined: 2017-11-11 12:23

Re: locale change fails (partially)

Postby ChameleonScales » 2019-10-06 21:06

I did this countless times.
ChameleonScales
 
Posts: 12
Joined: 2019-05-14 07:09

Re: locale change fails (partially)

Postby Head_on_a_Stick » 2019-10-07 07:56

Is there anything set in /etc/environment?

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

Or perhaps
Code: Select all
localectl
Don't break DebianHow to report bugs

SharpBang GNU/Linux — a pre-configured Openbox/Tint2 desktop running on Debian stable
User avatar
Head_on_a_Stick
 
Posts: 10599
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: locale change fails (partially)

Postby ChameleonScales » 2019-10-10 09:29

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.
ChameleonScales
 
Posts: 12
Joined: 2019-05-14 07:09


Return to System configuration

Who is online

Users browsing this forum: No registered users and 12 guests

fashionable