[arch-general] cannot set locale (systemd)
After upgrading systemd (189-3) and filesystem (2012.8-1) my locale isn't en_US.UTF-8 anymore. Instead, it defaults to C. # cat /etc/locale.conf: LOCALE=en_US.UTF-8 LC_COLLATE=C # locale LANG=C LC_CTYPE="C" LC_NUMERIC="C" LC_TIME="C" LC_COLLATE=C LC_MONETARY="C" LC_MESSAGES="C" LC_PAPER="C" LC_NAME="C" LC_ADDRESS="C" LC_TELEPHONE="C" LC_MEASUREMENT="C" LC_IDENTIFICATION="C" LC_ALL= I tried to run /etc/profile.d/locale.sh manually, but nothing changed. If i manually export LANG="en_US.UTF-8", it works, but i suspect it's not the "correct" way. So, is there a bug, or i am just missing something?
On Fri, Aug 31, 2012 at 11:30 AM, Thanos Zygouris <athanasios.zygouris@gmail.com> wrote:
After upgrading systemd (189-3) and filesystem (2012.8-1) my locale isn't en_US.UTF-8 anymore. Instead, it defaults to C.
# cat /etc/locale.conf: LOCALE=en_US.UTF-8 LC_COLLATE=C
# locale LANG=C LC_CTYPE="C" LC_NUMERIC="C" LC_TIME="C" LC_COLLATE=C LC_MONETARY="C" LC_MESSAGES="C" LC_PAPER="C" LC_NAME="C" LC_ADDRESS="C" LC_TELEPHONE="C" LC_MEASUREMENT="C" LC_IDENTIFICATION="C" LC_ALL=
Do you have a $HOME/.config/locale.conf? What does it contain?
I tried to run /etc/profile.d/locale.sh manually, but nothing changed. If i manually export LANG="en_US.UTF-8", it works, but i suspect it's not the "correct" way.
Could you put some debug output in the if/else block to figure out what is happening? E.g., if [ -n "$XDG_CONFIG_HOME" ] && [ -r "$XDG_CONFIG_HOME/locale.conf" ]; then echo "using XDG_CONFIG_HOME" . "$XDG_CONFIG_HOME/locale.conf" elif [ -n $HOME ] && [ -r $HOME/.config/locale.conf ]; then echo "using HOME" . "$HOME/.config/locale.conf" elif [ -r /etc/locale.conf ]; then echo "using system-wide" . /etc/locale.conf elif [ -r /etc/rc.conf ]; then echo "using rc.conf" LANG=$(. /etc/rc.conf 2>/dev/null; echo "$LOCALE") fi And then run it manually to see what is happening. Cheers, Tom
2012/8/31 Thanos Zygouris <athanasios.zygouris@gmail.com>
After upgrading systemd (189-3) and filesystem (2012.8-1) my locale isn't en_US.UTF-8 anymore. Instead, it defaults to C.
# cat /etc/locale.conf: LOCALE=en_US.UTF-8 LC_COLLATE=C
# locale LANG=C LC_CTYPE="C" LC_NUMERIC="C" LC_TIME="C" LC_COLLATE=C LC_MONETARY="C" LC_MESSAGES="C" LC_PAPER="C" LC_NAME="C" LC_ADDRESS="C" LC_TELEPHONE="C" LC_MEASUREMENT="C" LC_IDENTIFICATION="C" LC_ALL=
I tried to run /etc/profile.d/locale.sh manually, but nothing changed. If i manually export LANG="en_US.UTF-8", it works, but i suspect it's not the "correct" way.
So, is there a bug, or i am just missing something?
Hello, LANG is the variable you should set in locale.conf. See https://wiki.archlinux.org/index.php/Locale#Setting_system-wide_locale Csaba
2012/8/31 Thanos Zygouris <athanasios.zygouris@gmail.com>
# cat /etc/locale.conf: LOCALE=en_US.UTF-8
On Fri, Aug 31, 2012 at 11:39 AM, Kazó Csaba <kazocsaba@gmail.com> wrote:
LANG is the variable you should set in locale.conf. See https://wiki.archlinux.org/index.php/Locale#Setting_system-wide_locale
This is it, ignore my message. Can't believe I missed that :) -t
On Fri 31 Aug 11:39, Kazó Csaba wrote:
2012/8/31 Thanos Zygouris <athanasios.zygouris@gmail.com>
After upgrading systemd (189-3) and filesystem (2012.8-1) my locale isn't en_US.UTF-8 anymore. Instead, it defaults to C.
# cat /etc/locale.conf: LOCALE=en_US.UTF-8 LC_COLLATE=C
# locale LANG=C LC_CTYPE="C" LC_NUMERIC="C" LC_TIME="C" LC_COLLATE=C LC_MONETARY="C" LC_MESSAGES="C" LC_PAPER="C" LC_NAME="C" LC_ADDRESS="C" LC_TELEPHONE="C" LC_MEASUREMENT="C" LC_IDENTIFICATION="C" LC_ALL=
I tried to run /etc/profile.d/locale.sh manually, but nothing changed. If i manually export LANG="en_US.UTF-8", it works, but i suspect it's not the "correct" way.
So, is there a bug, or i am just missing something?
Hello,
LANG is the variable you should set in locale.conf. See https://wiki.archlinux.org/index.php/Locale#Setting_system-wide_locale
Csaba
Thanks, it's working now. I gave the wiki a quick look, but this information skipped my attention. Sorry for the noise and thanks again.
My system was already properly configured, but after last update, everything is en_US. -- Tomás Schertel ---------------------------------------------- Linux Registered User #304838 Arch Linux User http://www.archlinux.org/ ---------------------------------------------- On Fri, Aug 31, 2012 at 6:48 AM, Thanos Zygouris < athanasios.zygouris@gmail.com> wrote:
On Fri 31 Aug 11:39, Kazó Csaba wrote:
2012/8/31 Thanos Zygouris <athanasios.zygouris@gmail.com>
After upgrading systemd (189-3) and filesystem (2012.8-1) my locale isn't en_US.UTF-8 anymore. Instead, it defaults to C.
# cat /etc/locale.conf: LOCALE=en_US.UTF-8 LC_COLLATE=C
# locale LANG=C LC_CTYPE="C" LC_NUMERIC="C" LC_TIME="C" LC_COLLATE=C LC_MONETARY="C" LC_MESSAGES="C" LC_PAPER="C" LC_NAME="C" LC_ADDRESS="C" LC_TELEPHONE="C" LC_MEASUREMENT="C" LC_IDENTIFICATION="C" LC_ALL=
I tried to run /etc/profile.d/locale.sh manually, but nothing changed. If i manually export LANG="en_US.UTF-8", it works, but i suspect it's not the "correct" way.
So, is there a bug, or i am just missing something?
Hello,
LANG is the variable you should set in locale.conf. See https://wiki.archlinux.org/index.php/Locale#Setting_system-wide_locale
Csaba
Thanks, it's working now. I gave the wiki a quick look, but this information skipped my attention. Sorry for the noise and thanks again.
On Fri, Aug 31, 2012 at 2:59 PM, Tomás Acauan Schertel <tschertel@gmail.com> wrote:
My system was already properly configured, but after last update, everything is en_US. You can put your local in /etc/environment or in ~/.pam_environment.
-- Sébastien "Seblu" Luttringer www.seblu.net
Both /etc/locale.conf and /etc/environment have this lines: LANG=pt_BR.UTF-8 LC_MESSAGES=C And my system (LXDM + XFCE) keeps en_US. -- Tomás Schertel ---------------------------------------------- Linux Registered User #304838 Arch Linux User http://www.archlinux.org/ ---------------------------------------------- On Fri, Aug 31, 2012 at 11:05 AM, Sébastien Luttringer <seblu@seblu.net>wrote:
On Fri, Aug 31, 2012 at 2:59 PM, Tomás Acauan Schertel <tschertel@gmail.com> wrote:
My system was already properly configured, but after last update, everything is en_US. You can put your local in /etc/environment or in ~/.pam_environment.
-- Sébastien "Seblu" Luttringer www.seblu.net
On Aug 31, 2012 5:10 PM, "Tomás Acauan Schertel" <tschertel@gmail.com> wrote:
Both /etc/locale.conf and /etc/environment have this lines:
LANG=pt_BR.UTF-8 LC_MESSAGES=C
And my system (LXDM + XFCE) keeps en_US.
If you log in on the terminal (i.e. without starting X), do you get g the correct locale? Cheers, Tom
Typing locale, I get this: [tomas@archbook ~]$ locale LANG=pt_BR.UTF-8 LC_CTYPE="pt_BR.UTF-8" LC_NUMERIC="pt_BR.UTF-8" LC_TIME="pt_BR.UTF-8" LC_COLLATE="pt_BR.UTF-8" LC_MONETARY="pt_BR.UTF-8" LC_MESSAGES=C LC_PAPER="pt_BR.UTF-8" LC_NAME="pt_BR.UTF-8" LC_ADDRESS="pt_BR.UTF-8" LC_TELEPHONE="pt_BR.UTF-8" LC_MEASUREMENT="pt_BR.UTF-8" LC_IDENTIFICATION="pt_BR.UTF-8" LC_ALL= If i call date, get this: [tomas@archbook ~]$ date Sex Ago 31 12:46:31 BRT 2012 Date says it's Sexta (Friday) in Agosto (August). So I think my locale configuration is partially correct. Isn't it? -- Tomás Schertel ---------------------------------------------- Linux Registered User #304838 Arch Linux User http://www.archlinux.org/ ---------------------------------------------- On Fri, Aug 31, 2012 at 12:15 PM, Tom Gundersen <teg@jklm.no> wrote:
On Aug 31, 2012 5:10 PM, "Tomás Acauan Schertel" <tschertel@gmail.com> wrote:
Both /etc/locale.conf and /etc/environment have this lines:
LANG=pt_BR.UTF-8 LC_MESSAGES=C
And my system (LXDM + XFCE) keeps en_US.
If you log in on the terminal (i.e. without starting X), do you get g the correct locale?
Cheers,
Tom
On Aug 31, 2012 5:48 PM, "Tomás Acauan Schertel" <tschertel@gmail.com> wrote:
Typing locale, I get this:
[tomas@archbook ~]$ locale LANG=pt_BR.UTF-8 LC_CTYPE="pt_BR.UTF-8" LC_NUMERIC="pt_BR.UTF-8" LC_TIME="pt_BR.UTF-8" LC_COLLATE="pt_BR.UTF-8" LC_MONETARY="pt_BR.UTF-8" LC_MESSAGES=C LC_PAPER="pt_BR.UTF-8" LC_NAME="pt_BR.UTF-8" LC_ADDRESS="pt_BR.UTF-8" LC_TELEPHONE="pt_BR.UTF-8" LC_MEASUREMENT="pt_BR.UTF-8" LC_IDENTIFICATION="pt_BR.UTF-8" LC_ALL=
If i call date, get this:
[tomas@archbook ~]$ date Sex Ago 31 12:46:31 BRT 2012
Date says it's Sexta (Friday) in Agosto (August). So I think my locale configuration is partially correct. Isn't it?
Looks like locale.sh works as intended. Your desktop environment might override the locale settings though. Tom
On 8/31/2012 11:10 AM, Tomás Acauan Schertel wrote:
Both /etc/locale.conf and /etc/environment have this lines:
LANG=pt_BR.UTF-8 LC_MESSAGES=C
And my system (LXDM + XFCE) keeps en_US.
-- Tomás Schertel ---------------------------------------------- Linux Registered User #304838 Arch Linux User http://www.archlinux.org/ ----------------------------------------------
On Fri, Aug 31, 2012 at 11:05 AM, Sébastien Luttringer <seblu@seblu.net>wrote:
On Fri, Aug 31, 2012 at 2:59 PM, Tomás Acauan Schertel <tschertel@gmail.com> wrote:
My system was already properly configured, but after last update, everything is en_US. You can put your local in /etc/environment or in ~/.pam_environment.
-- Sébastien "Seblu" Luttringer www.seblu.net
I believe XFCE uses LC_MESSAGES to set its language.
On Fri, Aug 31, 2012 at 12:55 PM, arielp <ariel@drakkn.net> wrote:
On 8/31/2012 11:10 AM, Tomás Acauan Schertel wrote:
Both /etc/locale.conf and /etc/environment have this lines:
LANG=pt_BR.UTF-8 LC_MESSAGES=C
And my system (LXDM + XFCE) keeps en_US.
-- Tomás Schertel ------------------------------**---------------- Linux Registered User #304838 Arch Linux User http://www.archlinux.org/ ------------------------------**----------------
On Fri, Aug 31, 2012 at 11:05 AM, Sébastien Luttringer <seblu@seblu.net
wrote:
On Fri, Aug 31, 2012 at 2:59 PM, Tomás Acauan Schertel
<tschertel@gmail.com> wrote:
My system was already properly configured, but after last update, everything is en_US.
You can put your local in /etc/environment or in ~/.pam_environment.
-- Sébastien "Seblu" Luttringer www.seblu.net
I believe XFCE uses LC_MESSAGES to set its language.
It was working right before last update. What changed?
Am Fri, 31 Aug 2012 13:14:24 -0300 schrieb Tomás Acauan Schertel <tschertel@gmail.com>:
It was working right before last update. What changed?
Nothing, unless you haven't changed your locale configuration or a package changed it, but then you would have had at least a *.pacnew file. Heiko
Maybe it's GTK related? I'm using Opera to write this email and it's OK, using pt_BR.... Google Chrome and LibreOffice are OK also. -- Tomás Schertel ---------------------------------------------- Linux Registered User #304838 Arch Linux User http://www.archlinux.org/ ---------------------------------------------- On Fri, Aug 31, 2012 at 1:32 PM, Heiko Baums <lists@baums-on-web.de> wrote:
Am Fri, 31 Aug 2012 13:14:24 -0300 schrieb Tomás Acauan Schertel <tschertel@gmail.com>:
It was working right before last update. What changed?
Nothing, unless you haven't changed your locale configuration or a package changed it, but then you would have had at least a *.pacnew file.
Heiko
Am Fri, 31 Aug 2012 12:10:01 -0300 schrieb Tomás Acauan Schertel <tschertel@gmail.com>:
Both /etc/locale.conf and /etc/environment have this lines:
LANG=pt_BR.UTF-8 LC_MESSAGES=C
And my system (LXDM + XFCE) keeps en_US.
No, it uses C, because Xfce unfortunately uses LC_MESSAGES, not LANG, to set its locale. To get pt_BR.UTF-8 in Xfce you need to remove LC_MESSAGES=C. If you need the messages in the terminal with the locale C for filing bug reports e.g., I'd suggest you to always prefix the command with LC_MESSAGES=C or set an alias for those commands. This issue has nothing to do with systemd, btw. Heiko
participants (7)
-
arielp
-
Heiko Baums
-
Kazó Csaba
-
Sébastien Luttringer
-
Thanos Zygouris
-
Tom Gundersen
-
Tomás Acauan Schertel