/etc/pam.d/gdm-launch-environment is run as user gdm, so it's not what we're interested in.
/etc/pam.d/gdm-password appears to be what sets the environment upon user login. When adding some logging to that module, I'm seeing the following: pam_env(gdm-password:session): username=ubuntu pam_env(gdm-password:session): user env path: /home/ubuntu/.pam_environment pam_env(gdm-password:session): parsing config file pam_env(gdm-password:session): remove variable "LANGUAGE=fr_FR:en_GB:en" pam_env(gdm-password:session): remove variable "LANG=fr_FR.UTF-8" It turns out, "VARIABLE=value" is not the correct syntax for ~/.pam_environment. The expected syntax is "VARIABLE [DEFAULT=[value]] [OVERRIDE=[value]]" (man pam_env.conf). And indeed if I modify ~/.pam_environment to conform to that syntax, I'm seeing this instead: pam_env(gdm-password:session): pam_putenv("LANGUAGE=fr_FR:en_GB:en") pam_env(gdm-password:session): pam_putenv("LANG=fr_FR.UTF-8") That doesn't seem to fix the overall issue though, as the values of LANGUAGE and LANG are still those from /etc/default/locale after logging in. -- You received this bug notification because you are a member of DX Packages, which is subscribed to accountsservice in Ubuntu. Matching subscriptions: dx-packages https://bugs.launchpad.net/bugs/1662031 Title: Switching language and format broken Status in Ubuntu GNOME: New Status in accountsservice package in Ubuntu: New Status in gdm3 package in Ubuntu: Confirmed Status in gnome-control-center package in Ubuntu: New Status in accountsservice source package in Artful: New Status in gdm3 source package in Artful: Confirmed Status in gnome-control-center source package in Artful: New Bug description: In Ubuntu GNOME 16.10 it doesn't matter what display language I select - the effective language is still the one stated in /etc/default/locale. ~/.pam_environment is changed as expected, but the variables set in /etc/default/locale override ~/.pam_environment. In Ubuntu GNOME 16.04 language switching takes effect, but the reason for that seems to be that /etc/default/locale is changed as well, so when a user changes the display language (or format), it changes it for all users on the system. The overriding by /etc/default/locale is probably caused by some other package(s) but g-c-c. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu-gnome/+bug/1662031/+subscriptions -- Mailing list: https://launchpad.net/~dx-packages Post to : dx-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~dx-packages More help : https://help.launchpad.net/ListHelp