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:
/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 gdm-password: session) : user env path: /home/ubuntu/ .pam_environmen t gdm-password: session) : parsing config file gdm-password: session) : remove variable "LANGUAGE= fr_FR:en_ GB:en" gdm-password: session) : remove variable "LANG=fr_FR.UTF-8"
pam_env(
pam_env(
pam_env(
pam_env(
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") gdm-password: session) : pam_putenv( "LANG=fr_ FR.UTF- 8")
pam_env(
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.