Page MenuHomePureOS Tracker

Cannot set language with GDM
Open, Needs TriagePublic

Description

Hi,

I've tried to set my system to use en_GB.UTF-8 as the default locale but unfortunately GDM seems to have its own idea about what the locale should be and sets some variables to en_US.UTF-8 instead. When logging in over SSH, the locale is fine. When logging in through GDM, I get the following:

rah@lichen:~$ env | grep en_ | sort
GDM_LANG=en_US.UTF-8
LANG=en_US.UTF-8
LC_ADDRESS=en_GB.UTF-8
LC_IDENTIFICATION=en_GB.UTF-8
LC_MEASUREMENT=en_GB.UTF-8
LC_MONETARY=en_GB.UTF-8
LC_NAME=en_GB.UTF-8
LC_NUMERIC=en_GB.UTF-8
LC_PAPER=en_GB.UTF-8
LC_TELEPHONE=en_GB.UTF-8
LC_TIME=en_GB.UTF-8
rah@lichen:~$ cat /etc/default/locale
LANG=en_GB.UTF-8
LC_ADDRESS=en_GB.UTF-8
LC_IDENTIFICATION=en_GB.UTF-8
LC_MEASUREMENT=en_GB.UTF-8
LC_MONETARY=en_GB.UTF-8
LC_NAME=en_GB.UTF-8
LC_NUMERIC=en_GB.UTF-8
LC_PAPER=en_GB.UTF-8
LC_TELEPHONE=en_GB.UTF-8
LC_TIME=en_GB.UTF-8
rah@lichen:~$ ls /var/cache/gdm
rah@lichen:~$

I've tried searching the web for possible solutions but couldn't find anything helpful. I've tried to find something I can change in GNOME's settings UI but again, nothing seems helpful.

Under the "Region & Language" section of GNOME Settings, there is a Language option which is set to "English" which I suspect may be the issue. If I click on this to change it, I'm presented with a dialog box containing an entry with the label "English" and a search box. If I put anything into the search box, including "English" or "German", the label changes from "English" to read "No languages found".

Event Timeline

rah renamed this task from Cannot set language to Cannot set language with GDM.Nov 26 2018, 03:14
rah created this task.
rah added a comment.EditedNov 26 2018, 06:11

There is a file, /var/lib/AccountsService/users/rah, that contains the following:

[User]
Language=en_US.UTF-8
XSession=
SystemAccount=false

After removing the "Language=..." line from this file, logging out, killing /usr/lib/accountsservice/accounts-daemon and logging back in again, the locale environment variables are as they should be.