Bug 818265 - System locale not provided to services via environment
System locale not provided to services via environment
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
17
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-02 11:28 EDT by Tim Waugh
Modified: 2013-04-12 18:46 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-04-12 18:46:07 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tim Waugh 2012-05-02 11:28:02 EDT
Description of problem:
Even though I have set my system locale to English (UK) using the System Settings 'Region and Language' panel, running services have LANG=en_US.UTF-8 in their environment settings.

Version-Release number of selected component (if applicable):
systemd-44-7.fc17.x86_64

How reproducible:
100%

Steps to Reproduce:
1.In Region and Language, set Language to British English, formats region to Unitied Kingdom (English), and set the only keyboard layout to English (UK)
2.In the System tab, click 'Copy Settings...'
3.Reboot
4.Verify the settings are as expected by visiting the System tab again
5.
set $(ps axf | grep [c]upsd)
cat /proc/$1/environ | xargs -0rn1 echo | grep LANG

Actual results:
At step 4:
"Your settings" == "System settings"
Display language: English (United Kingdom)
Input source: English (UK)
Format: United Kingdom (English)

At step 5:

LANG=en_US.UTF-8

Expected results:
At step 5:

LANG=en_GB.UTF-8

Additional info:
# cat /etc/locale.conf 
LANG=en_GB.utf8
# cat /etc/sysconfig/i18n 
LANG="en_US.UTF-8"
SYSFONT="True"
Comment 1 Bill Nottingham 2012-05-02 11:57:46 EDT
Obviously, the problem is that the two files are out of sync, and we should try to avoid getting into that situation.

But /etc/locale.conf is supposed to override /etc/sysconfig/i18n, so needs investigation where that's getting lost.
Comment 2 Bill Nottingham 2012-05-02 16:03:40 EDT
This is systemd - its fallback code for /etc/sysconfig/i18n reads that after /etc/locale.conf... it should arguably be the other way around (certainly as long as its implementation daemon is writing the new location and expecting that to work.)
Comment 3 Lennart Poettering 2012-09-14 10:35:38 EDT
Does

systemctl show-environment

show the right environment?
Comment 4 Tim Waugh 2012-09-17 06:55:12 EDT
No:

$ systemctl show-environment
SYSFONT=True
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
LANG=en_US.UTF-8
KEYTABLE=uk
BOOT_IMAGE=/vmlinuz-3.5.3-1.fc17.x86_64
$ cat /etc/locale.conf 
LANG=en_GB.utf8
Comment 5 Lennart Poettering 2013-01-14 15:54:12 EST
I guess in a way this is fixed in F18, since everything now reads/writes locale.conf and we convert on upgrade.
Comment 6 Michal Schmidt 2013-04-12 18:46:07 EDT
F18 should not suffer from this problem. At this point not much effort will be spent on systemd in F17. Only fixes for severe bugs can be expected.

Note You need to log in before you can comment on or make changes to this bug.