| Summary: | locale improperly set with localectl | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Aleksandar Kostadinov <akostadi> |
| Component: | systemd | Assignee: | systemd-maint |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | johannbg, lnykryn, msekleta, muadda, s, systemd-maint, zbyszek |
| Target Milestone: | --- | Keywords: | FutureFeature, Reopened |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-07-21 10:37:01 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Aleksandar Kostadinov
2016-09-09 19:58:46 UTC
This message is a reminder that Fedora 24 is nearing its end of life. Approximately 2 (two) weeks from now Fedora will stop maintaining and issuing updates for Fedora 24. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '24'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 24 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. localectl causes /etc/locale.conf to be updated with the new settings, and systemd will use this to set the environment of lightdm (or other login manager). But after you log in, those settings can be influenced by various other things, including at least the display manager and /etc/profile.d/lang.sh, which reads ~/.i18n. Since the settings for root match what you configured with localectl, it seems some other component resets the locale. Please do the following: - run "pstree -aps $$" to see a list of ancestors of your shell - look at each process's environment with "cat /proc/PID/environ | tr '\0' '\n'" where PID is each process number. You'll need so prefix this with 'sudo' for system processes. - you should see LANG=en_US.utf8 switch to LANG=C.utf8 at some point... This should be the place where the issue is. Sorry, this fell under my rather. This is Fedora 27 now. I'm not sure pstree is very helpful. When terminal is started, it falls to parent "1". > $ pstree -aps $$ > systemd,1 --switched-root --system --deserialize 24 > └─xfce4-terminal,2543 > └─bash,6687 > └─pstree,31427 -aps 6687 > > $ cat /proc/2543/environ | tr '\0' '\n' | grep LANG > LANG=C.utf8 > $ sudo cat /proc/1/environ | tr '\0' '\n' | grep LANG > LANG=en_US.utf8 Still `bash -l` doens't help: > $ bash -l > $ echo $LANG > C.utf8 `sudo su -` still helps though > $ sudo su - user > [sudo] password for user: > $ echo $LANG > en_US.utf8 I don't think I have any customization wrt LANG, my first attempt at setting it was with `localectl`: > $ grep LANG ~/.* > grep: /home/user/.: Is a directory > grep: /home/user/..: Is a directory > ... I don't know how is systemd supposed to set LANG but it doesn't work for all sessions. Now with Fedora 30 I do see LANG properly set under XFCE. I don't know what changed. > 🐚 localectl status > System Locale: LANG=en_US.utf8 > LC_CTYPE=C.utf8 > LC_NUMERIC=C.utf8 > LC_TIME=C.utf8 > LC_MONETARY=C.utf8 > LC_PAPER=bg_BG.utf8 > LC_NAME=C.utf8 > LC_ADDRESS=C.utf8 > LC_TELEPHONE=C.utf8 > LC_MEASUREMENT=C.utf8 > LC_IDENTIFICATION=C.utf8 Then > 🐚 set |grep LANG > LANG=en_US.utf8 OK, let's close then. |