Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   ArchLinux General Discussion (http://www.linux-archive.org/archlinux-general-discussion/)
-   -   cannot set locale (systemd) (http://www.linux-archive.org/archlinux-general-discussion/699403-cannot-set-locale-systemd.html)

Thanos Zygouris 08-31-2012 09:30 AM

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?

Tom Gundersen 08-31-2012 09:39 AM

cannot set locale (systemd)
 
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

Kazó Csaba 08-31-2012 09:39 AM

cannot set locale (systemd)
 
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

Tom Gundersen 08-31-2012 09:43 AM

cannot set locale (systemd)
 
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

Thanos Zygouris 08-31-2012 09:48 AM

cannot set locale (systemd)
 
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.

Tomás Acauan Schertel 08-31-2012 12:59 PM

cannot set locale (systemd)
 
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.
>

Sébastien Luttringer 08-31-2012 02:05 PM

cannot set locale (systemd)
 
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

Tomás Acauan Schertel 08-31-2012 03:10 PM

cannot set locale (systemd)
 
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
>

Tom Gundersen 08-31-2012 03:15 PM

cannot set locale (systemd)
 
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

Tomás Acauan Schertel 08-31-2012 03:48 PM

cannot set locale (systemd)
 
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
>


All times are GMT. The time now is 04:03 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.