FS#42162 - [filesystem] locale.sh: don't overwrite LANG

Attached to Project: Arch Linux
Opened by Balló György (City-busz) - Sunday, 28 September 2014, 18:10 GMT
Last edited by Dave Reisner (falconindy) - Saturday, 25 October 2014, 17:05 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Dave Reisner (falconindy)
Tom Gundersen (tomegun)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Currently it's not possible to select language for a user session with X display managers, because our /etc/profile.d/locale.sh script overwrites the LANG environment variable on every login. So the display manager sets the selected LANG, then the locale.sh script resets it to a different value immediately after.

The following display managers support language selection:

- GDM: uses AccountsService (stored in /var/lib/AccountsService/users/[username]). Cannot be changed on login, but can be configured in GNOME Control Center.

- LightDM: uses AccountsService, and falls back to ~/.dmrc if no AccountsService is available. Can be changed from the GUI (a bit buggy, change is not always applied immediately).

- LXDM: uses ~/.dmrc, can be overwritten from the GUI for each login.

AFAIK KDM, Slim and XDM don't support language selection.

I attached a fixed locale.sh script, which preserve the existing LANG variable. See also the similar script used by Fedora:
https://git.fedorahosted.org/cgit/initscripts.git/tree/lang.sh
This task depends upon

Closed by  Dave Reisner (falconindy)
Saturday, 25 October 2014, 17:05 GMT
Reason for closing:  Fixed
Additional comments about closing:  filesystem-2014.10-1
Comment by Dave Reisner (falconindy) - Sunday, 28 September 2014, 19:28 GMT
I suspect that your solution means that every user who logs in at a getty will end up with the system-wide locale set in /etc/locale.conf (and not necessarily their own). The fedora script seems to understand this.
Comment by Balló György (City-busz) - Sunday, 28 September 2014, 19:57 GMT
getty does not set the LANG variable. Fedora keeps the existing LANG variable, but supports fallbacks of each LC_* variables.

Loading...