Bug 818265 - System locale not provided to services via environment
Summary: System locale not provided to services via environment
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 17
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-02 15:28 UTC by Tim Waugh
Modified: 2013-04-12 22:46 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-04-12 22:46:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tim Waugh 2012-05-02 15:28:02 UTC
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 15:57:46 UTC
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 20:03:40 UTC
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 14:35:38 UTC
Does

systemctl show-environment

show the right environment?

Comment 4 Tim Waugh 2012-09-17 10:55:12 UTC
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 20:54:12 UTC
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 22:46:07 UTC
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.