Hi Olivier / Sebastien, Olivier's conclusion when debugging bug #1662031 (comment #13), that the simple VARIABLE=value syntax is incorrect for ~/.pam_environment, surprised me.
My belief is that it is correct. PAM ignores syntactically incorrect lines, and simple VARIABLE=value statements are not ignored. One of the most used sources for user guidance is this wiki page: https://help.ubuntu.com/community/EnvironmentVariables#Session- wide_environment_variables It tells us that the more complex syntax is required for variable expansion to work, but the entries written to ~/.pam_environment by accountsservice don't involve variable expansion. Can it possibly be that messages like 'remove variable "LANG=fr_FR.UTF-8"', which were written when debugging, simply are informational messages which let you know the previous environment variable - set previously somehow, e.g. from /etc/default/locale - and which is replaced by a new one? I admit, however, that I don't find support for my belief in the PAM man pages. -- 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/1722151 Title: Incorrect syntax when writing to ~/.pam_environment Status in accountsservice package in Ubuntu: Confirmed Bug description: While investigating bug #1662031, I found out that /usr/share /language-tools/save-to-pam-env writes to ~/.pam_environment using an incorrect syntax: "VARIABLE=value" on each line. The expected syntax is "VARIABLE [DEFAULT=[value]] [OVERRIDE=[value]]" (man pam_env.conf). ProblemType: Bug DistroRelease: Ubuntu 17.10 Package: accountsservice 0.6.42-0ubuntu2 ProcVersionSignature: Ubuntu 4.13.0-12.13-generic 4.13.3 Uname: Linux 4.13.0-12-generic x86_64 NonfreeKernelModules: zfs zunicode zavl zcommon znvpair ApportVersion: 2.20.7-0ubuntu2 Architecture: amd64 CurrentDesktop: ubuntu:GNOME Date: Mon Oct 9 06:57:17 2017 EcryptfsInUse: Yes InstallationDate: Installed on 2016-07-02 (463 days ago) InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1) SourcePackage: accountsservice UpgradeStatus: Upgraded to artful on 2017-06-04 (126 days ago) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/accountsservice/+bug/1722151/+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