Red Hat Bugzilla – Bug 818265
System locale not provided to services via environment
Last modified: 2013-04-12 18:46:07 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):
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...'
4.Verify the settings are as expected by visiting the System tab again
set $(ps axf | grep [c]upsd)
cat /proc/$1/environ | xargs -0rn1 echo | grep LANG
At step 4:
"Your settings" == "System settings"
Display language: English (United Kingdom)
Input source: English (UK)
Format: United Kingdom (English)
At step 5:
At step 5:
# cat /etc/locale.conf
# cat /etc/sysconfig/i18n
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.
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.)
show the right environment?
$ systemctl show-environment
$ cat /etc/locale.conf
I guess in a way this is fixed in F18, since everything now reads/writes locale.conf and we convert on upgrade.
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.