You are not logged in.

#1 2013-03-25 03:52:49

pablox
Member
From: /home/chile/curico/
Registered: 2008-05-14
Posts: 169
Website

Cannot set locale (ignored from /etc/locale.conf)

I just installed Arch on my new machine and I wrote:

==> /etc/locale.conf
LANG=es_CL.utf-8
# LANG=es_CL.UTF-8 (I've tried with both).

after uncommenting it on /etc/locale.gen and running # locale-gen

(I basically followed every step in the wiki).

No matter what I do when I start any terminal, I found the locale commands output:

$ ~ locale
LANG=
LC_CTYPE="POSIX
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

I found that if I open a tty, the /etc/profile.d/locale.sh is ran so, the locales are correct and locale shows the correct output.

The weirdest thing is that my old machine doesn't load locale.sh, and still the locale it's right.

I've search a lot through the wiki and bbs and even when there are couple of articles, none of them help me to solve this issue :(.

I'm running my session through systemd --user (in case it means anything).

EDIT: Add more info.
EDIT2: Fix typo

Last edited by pablox (2013-03-25 13:19:42)


Geeks & Linux Atelier
An eye for an eye ... ends in making everybody blind -- Mahatma Gandhi
dotfiles

Offline

#2 2013-03-25 06:35:51

jib2
Member
From: Paris, France
Registered: 2009-08-13
Posts: 88

Re: Cannot set locale (ignored from /etc/locale.conf)

Try es_CL.UTF-8  (utf-8 is case sensitive).

Offline

#3 2013-03-25 11:39:08

pablox
Member
From: /home/chile/curico/
Registered: 2008-05-14
Posts: 169
Website

Re: Cannot set locale (ignored from /etc/locale.conf)

I should have specified that I tried with both without success.


Geeks & Linux Atelier
An eye for an eye ... ends in making everybody blind -- Mahatma Gandhi
dotfiles

Offline

#4 2013-03-25 12:48:19

mah0
Member
Registered: 2011-04-21
Posts: 47

Re: Cannot set locale (ignored from /etc/locale.conf)

pablox,
In /etc/locale.conf it should be:

LANG=es_CL.UTF-8

not

LANG=es_CL.UTF.8

Offline

#5 2013-03-25 13:19:08

pablox
Member
From: /home/chile/curico/
Registered: 2008-05-14
Posts: 169
Website

Re: Cannot set locale (ignored from /etc/locale.conf)

Sorry, that was a typo writing it here D:, I actually tried with:

LANG=es_CL.utf-8

and

LANG=es_CL.UTF-8

I modified (again) the post to reflect this.


Geeks & Linux Atelier
An eye for an eye ... ends in making everybody blind -- Mahatma Gandhi
dotfiles

Offline

#6 2013-03-25 14:11:40

mah0
Member
Registered: 2011-04-21
Posts: 47

Re: Cannot set locale (ignored from /etc/locale.conf)

Just tested:

% su -
# vim /etc/locale.gen
# egrep -v '^#|^$' /etc/locale.gen
es_CL.UTF-8 UTF-8  
# echo LANG=es_CL.UTF-8 > /etc/locale.conf
# locale-gen
Generating locales...
  es_CL.UTF-8... done
Generation complete.

and after reboot:

% locale
LANG=es_CL.UTF-8
LC_CTYPE="es_CL.UTF-8"
LC_NUMERIC="es_CL.UTF-8"
LC_TIME="es_CL.UTF-8"
LC_COLLATE="es_CL.UTF-8"
LC_MONETARY="es_CL.UTF-8"
LC_MESSAGES="es_CL.UTF-8"
LC_PAPER="es_CL.UTF-8"
LC_NAME="es_CL.UTF-8"
LC_ADDRESS="es_CL.UTF-8"
LC_TELEPHONE="es_CL.UTF-8"
LC_MEASUREMENT="es_CL.UTF-8"
LC_IDENTIFICATION="es_CL.UTF-8"
LC_ALL=

Offline

#7 2013-03-25 14:17:45

pablox
Member
From: /home/chile/curico/
Registered: 2008-05-14
Posts: 169
Website

Re: Cannot set locale (ignored from /etc/locale.conf)

Well, I did that but doesn't work =/. I'm using zsh, so I don't know if has something to do.


Geeks & Linux Atelier
An eye for an eye ... ends in making everybody blind -- Mahatma Gandhi
dotfiles

Offline

#8 2013-03-25 14:25:52

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 5,919
Website

Re: Cannot set locale (ignored from /etc/locale.conf)

Try adding

source /etc/profile

to your .zshrc


Sakura:-
Mobo: ASUS P8Z77-V PRO // Processor: Intel Core i7-3770K 3.4GHz // GFX: nVidia GeForce GTX 970 Ti // RAM: 32GB (4x 8GB) Corsair DDR3 (@ 2133MHz) // Storage: 1x 3TB Seagate SATAII 5x 1TB Samsung SATAII, 2x 120GB Corsair SSD

Making lemonade from lemons since 2015.

Offline

#9 2013-03-25 15:22:17

pablox
Member
From: /home/chile/curico/
Registered: 2008-05-14
Posts: 169
Website

Re: Cannot set locale (ignored from /etc/locale.conf)

According to the wiki:

/etc/profile is not a part of the regular list of startup files run for Zsh, but is sourced from /etc/zsh/zprofile in the zsh package.

So, in theory, it should be loaded right?

@mah0

Are you using bash or zsh? Can you tell me if you are sourcing .zprofile or forcing /etc/profile?

Last edited by pablox (2013-03-25 15:33:23)


Geeks & Linux Atelier
An eye for an eye ... ends in making everybody blind -- Mahatma Gandhi
dotfiles

Offline

#10 2013-03-25 15:34:33

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 5,919
Website

Re: Cannot set locale (ignored from /etc/locale.conf)

Looks like it is, I removed it from my .zshrc and nothing changed.

Could you check whether es_CL.UTF-8 is actually listed as an available locale?

localectl list-locales

And if so, whether it's correctly set

localectl status

Sakura:-
Mobo: ASUS P8Z77-V PRO // Processor: Intel Core i7-3770K 3.4GHz // GFX: nVidia GeForce GTX 970 Ti // RAM: 32GB (4x 8GB) Corsair DDR3 (@ 2133MHz) // Storage: 1x 3TB Seagate SATAII 5x 1TB Samsung SATAII, 2x 120GB Corsair SSD

Making lemonade from lemons since 2015.

Offline

#11 2013-03-25 15:58:11

mah0
Member
Registered: 2011-04-21
Posts: 47

Re: Cannot set locale (ignored from /etc/locale.conf)

pablox,
I'm using zsh. I just followed steps in the "Beginners' Guide" and I didn't add anything to ".zprofile" or "/etc/profile".

Offline

#12 2013-03-26 23:53:03

pablox
Member
From: /home/chile/curico/
Registered: 2008-05-14
Posts: 169
Website

Re: Cannot set locale (ignored from /etc/locale.conf)

WorMzy wrote:

Looks like it is, I removed it from my .zshrc and nothing changed.

Could you check whether es_CL.UTF-8 is actually listed as an available locale?

localectl list-locales

And if so, whether it's correctly set

localectl status
 $ localectl list-locales
en_US.utf8
es_CL.utf8

$ localectl status
   System Locale: LANG=es_CL.UTF-8
                  LC_COLLATE=C
                  LC_MESSAGES=C
       VC Keymap: la-latin1
      X11 Layout: n/a

$ locale
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
$

Ô_o

I have removed an empty ~/.zprofile just in case but the issue persist. Running an empty zsh shell (with zsh -f) doesn't work either.

Last edited by pablox (2013-03-26 23:59:45)


Geeks & Linux Atelier
An eye for an eye ... ends in making everybody blind -- Mahatma Gandhi
dotfiles

Offline

#13 2013-03-27 01:08:20

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: Cannot set locale (ignored from /etc/locale.conf)

Have you tried actually setting the locale with localectl?

Offline

#14 2013-03-28 00:54:32

pablox
Member
From: /home/chile/curico/
Registered: 2008-05-14
Posts: 169
Website

Re: Cannot set locale (ignored from /etc/locale.conf)

`localectl` just add the locale to the /etc/locale.conf file, nothing else. Besides, localectl point the status is ok. On my old computer I have the same settings, so I don't understand why is changing it here =/.


Geeks & Linux Atelier
An eye for an eye ... ends in making everybody blind -- Mahatma Gandhi
dotfiles

Offline

#15 2013-04-01 23:42:07

pablox
Member
From: /home/chile/curico/
Registered: 2008-05-14
Posts: 169
Website

Re: Cannot set locale (ignored from /etc/locale.conf)

I managed to find the issue. It's just about the zsh wiki page incorrectly states:

/etc/zsh/zprofile it's ONLY loaded if you ran it through a login shell, so just opening a terminal in the DE/WM doesn't work sad.

The only difference from my old laptop is that its running xfce + xmonad, while this one it's only running xmonad so I guess xfce was actually making sure and fixing the locale. The other alternative it's that it's systemd (I'm opening my session trough systemd --user).


Geeks & Linux Atelier
An eye for an eye ... ends in making everybody blind -- Mahatma Gandhi
dotfiles

Offline

Board footer

Powered by FluxBB