Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#4476 - locale in rc.conf overrides user's own definition
Attached to Project:
Arch Linux
Opened by 甘露(Lu Gan) (ganlu) - Tuesday, 18 April 2006, 05:56 GMT
Last edited by Tobias Powalowski (tpowa) - Friday, 21 April 2006, 05:36 GMT
Opened by 甘露(Lu Gan) (ganlu) - Tuesday, 18 April 2006, 05:56 GMT
Last edited by Tobias Powalowski (tpowa) - Friday, 21 April 2006, 05:36 GMT
|
DetailsIf I have set "LOCALE=" in the rc.conf, all users have to take it, I don't think it's a good way. System should make user's own locale definition as the first choice if there are any in user's .bashrc, .profile or .xinitrc
|
This task depends upon
Closed by Roman Kyrylych (Romashka)
Wednesday, 03 January 2007, 22:40 GMT
Reason for closing: Not a bug
Wednesday, 03 January 2007, 22:40 GMT
Reason for closing: Not a bug
I just set LANG=en_US in my .bashrc, relogin and
$ locale
LANG=en_US
LC_CTYPE=en_US
LC_NUMERIC=en_US
...
I will try if problem remains without using gdm or using .bashrc.
Locale is set in /etc/profile.d/locale.sh
All files from /etc/profile.d/ get executed by /etc/profile
Maybe for some strange reason gdm does this again?
Oh, and yet another - did you generated your locale with locale-gen properly?
.profile is not even read by bash. From bash manpage:
/etc/profile - The systemwide initialization file, executed for login shells
.bash_profile - The personal initialization file, executed for login shells
.bashrc - The individual per-interactive-shell startup file
In Arch Linux default .bash_profile contains only one line: . $HOME/.bashrc
1) I set my locale in rc.conf: LOCALE=uk_UA.KOI8-U
2) rc.sysinit reads $LOCALE and writes export LANG=uk_UA.KOI8-U to /etc/profile.d/lang.sh
3) /etc/profile is executed on user login
4) commands in /etc/profile execudes all /etc/profile.d/*.sh which have execute bit set, so lang.sh will get executed and LANG will be reset according to LOCALE in rc.conf
So, if LOCALE is set LANG from /etc/profile will be overwritten by LANG in /etc/profile.d/lang.sh, which is generated from LOCALE in rc.sysinit!
5) .bash_profile is executed
6) .bashrc is executed
.xinitrc is executed when loading X
.profile is execuded by gdm
Why don't you want to set different locale for each user in .bashrc? You can set it in .bash_profile, if that will make difference.
.profile is execuded by gdm but rc.conf set locale through /etc/profile.d/lang.sh, then gdm ignores the locale setting in .profile, if I don't set locale in her .bashrc or .bash_profile, otherwise my wife will complain why there's English again.
The other way I can avoid such problem is that I don't use rc.conf to set my global LANG environment (this option is nonsense then, the default locale of Arch is C, but I like utf8 anyway), instead I have to set one by one manually, which _I do think_ is quite annoying if users are over 3.