You are not logged in.
I don't think this is due to some trivial mistake (but then again, I've been wrong before). Anyway, I moved my system to systemd, and in /etc/locale.conf I have the following:
LANG=en_US.UTF-8
LC_TIME=en_US.UTF-8
LC_COLLATE=C
In /etc/locale.gen I have the following locales selected:
en_US.UTF-8 UTF-8
en_US ISO-8859-1
pt_PT.UTF-8 UTF-8
pt_PT ISO-8859-1
pt_PT@euro ISO-8859-15
When running locale-gen, I get the following output:
Generating locales...
en_US.UTF-8... done
en_US.ISO-8859-1... done
pt_PT.UTF-8... done
pt_PT.ISO-8859-1... done
pt_PT.ISO-8859-15@euro... done
Generation complete.
However, after rebooting (I boot to console, no display manager), and logging in console, the locale that is set is POSIX! I start X with the following command (aliased in .bashrc):
. /etc/locale.conf ; export LANG ; exec nohup startx > /dev/null &vlock
And after doing that, the locale, both in X and in console, is set to the correct one! (en_US.UTF-8)
Am I making a newbie mistake somewhere?
Last edited by gauthma (2013-05-16 19:31:28)
Offline
# pacman -Ql systemd-sysvcompat
...
systemd-sysvcompat /etc/profile.d/locale.sh
...
I guess locale.sh does what you want, but you do not have installed systemd-sysvcompat ?
Offline
# pacman -Ql systemd-sysvcompat ... systemd-sysvcompat /etc/profile.d/locale.sh ...
I guess locale.sh does what you want, but you do not have installed systemd-sysvcompat ?
Actually I do have systemd-sysvcompat installed, but it does NOT have locale.sh. I do have that file, but it is owned by filesystem!
(sorry for the delay in replying, I was AFK)
EDIT: OK I just realized what happened. I'm using testing, and so my version of systemd-sysvcompat is 189-3, and this version no longer contains locale.sh (unlike the non testing version, 188). Now, at least according to https://wiki.archlinux.org/index.php/Systemd#Locale, it says that " /etc/profile.d/locale.sh from systemd-sysvcompat or initscripts is necessary to be able to set users' locale correctly", so I'm confused as to what to do next...
Last edited by gauthma (2012-08-29 20:40:01)
Offline
Maybe locale.sh is not executed at boot. You can test that by executing it on your own.
The fact that you are using testing is important here, maybe ask an admin to move this thread to the testing forum.
Offline
Maybe locale.sh is not executed at boot. You can test that by executing it on your own.
The fact that you are using testing is important here, maybe ask an admin to move this thread to the testing forum.
I didn't ask this in testing because I thought the issue was caused by some misconfiguration on my side... if an admin sees this thread as belonging in testing, well then he knows what to do
Anyway, I asked on irc, and it seems that the locale.sh script has been moved to the filesystem package. I'll do some more tests tomorrow, and post the results.
Offline
Logging in to bash, and executing /etc/profile.d/locale.sh yields no result. After running, I launched another bash process, but got the same change---i.e. nothing, the locale remains "POSIX"
Offline
. /etc/locale.conf ; export LANG ; exec nohup startx > /dev/null &vlock
And after doing that, the locale, both in X and in console, is set to the correct one! (en_US.UTF-8)
Am I making a newbie mistake somewhere?
Try:
. /etc/locale.conf; export LANG=en_US.UTF-8; exec nohup startx > /dev/null &vlock
I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).
Offline
gauthma wrote:. /etc/locale.conf ; export LANG ; exec nohup startx > /dev/null &vlock
And after doing that, the locale, both in X and in console, is set to the correct one! (en_US.UTF-8)
Am I making a newbie mistake somewhere?
Try:
. /etc/locale.conf; export LANG=en_US.UTF-8; exec nohup startx > /dev/null &vlock
Maybe I've not explained myself correctly: "And after doing that, the locale, both in X and in console, is set to the correct one! (en_US.UTF-8)"
My problem is that, *before* running that command, in console (no GUI), the locale is set to POSIX, for reasons thus far unknown to me...
Offline
Read https://plus.google.com/114015603831160 … zKCcnTWDpa and try setting $HOME/.config/locale.conf.
Offline
I had already read that. Quoting (emphasis added):
Therefore, we have refactored our locale handling, and this is now available in [testing]. In this new scheme: /etc/locale.conf (or optionally rc.conf) sets the system locale, which applies to all daemons. This is also the fall-back locale which applies to user-sessions if nothing else is defined. Each user can now configure his/hers own locale in $HOME/.config/locale.conf, which applies only to their user session.
So $HOME/.config/locale.conf should not be needed in my case...
Offline
Hmmmm:
$ cat /etc/locale.conf
LANG=en_US.UTF-8
$ cat .config/locale.conf
#LANG="pl_PL.UTF-8"
$ 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=
If I set $HOME/.config/locale.conf (uncomment LANG="pl_PL.UTF-8") things are working as expected, otherwise I get only the default C locales.
Last edited by karol (2012-08-30 12:42:04)
Offline
bug?
Offline
What if you delete/move/rename "~/.config/locale.conf" since you're not using it anyway (it's commented out) ?
Because I think it may have priority (even if it's blank).
I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).
Offline
What if you delete/move/rename "~/.config/locale.conf" since you're not using it anyway (it's commented out) ?
Because I think it may have priority (even if it's blank).
You're right: if ~/.config/locale.conf exists but is "unset", locales defaults to 'C' (not sure why it's POSIX for OP; I don't use systemd)
If ~/.config/locale.conf doesn't exist, locales are set to what's in /etc/locale.conf - en_US.UTF-8 in my case.
Offline
DSpider wrote:What if you delete/move/rename "~/.config/locale.conf" since you're not using it anyway (it's commented out) ?
Because I think it may have priority (even if it's blank).
You're right: if ~/.config/locale.conf exists but is "unset", locales defaults to 'C' (not sure why it's POSIX for OP; I don't use systemd)
If ~/.config/locale.conf doesn't exist, locales are set to what's in /etc/locale.conf - en_US.UTF-8 in my case.
FWIW, this is intentional. Maybe some more/better documentation is needed...
Offline
FYI, I do *not* have the file ~/.config/locale.conf
Offline
I think I have the same problem and I am not using testing (locale.sh is owned by filesystem 2012.8-1). After the last update the locale is always set to "C" no matter what I put in /etc/locale.conf. And I do not have ~/.config/locale.conf as well.
Offline
$ cat /etc/locale.conf
LANG=en_US.UTF-8
Do you get the same?
I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).
Offline
$ cat /etc/locale.conf LANG=en_US.UTF-8
Do you get the same?
Oh, silly me. I have moved the configuration from rc.conf to the various new conf files and I have used LOCALE=... instead of LANG=.... Seems to be working ok now. Sorry for polluting the thread.
Offline
Is your /etc/locale.conf readable by group and others (644)?
Keyboard error or no keyboard present
Press F1 to continue, DEL to enter SETUP
Offline
Is your /etc/locale.conf readable by group and others (644)?
Yes.
Offline
Just a 2 cent coin from me -- maybe it helps someone...
After the filesystem upgrade, the /etc/profile.d/locale.sh file disappeared from my hdd (nothing fishy here: sometimes odd things happen and it's enough to re-run update to fix them). Before I realized that, I lost my default locales (en_US.UTF-8) and after issuing 'locale', I got the same output as the OP ("POSIX" from top to bottom). I was trying to use $HOME/.config/locale.conf file, but nothing expected ever happened, and the only way to make things work my way was to export LANG="en_US.UTF-8" in good old $HOME/.profile. When I eventually updated the filesystem correctly and /etc/profile.d/locale.sh was brought back, I realized that $HOME/.config/locale.conf won't work without it as this is where the relevant variable is set:
if [ -n "$XDG_CONFIG_HOME" ] && [ -r "$XDG_CONFIG_HOME/locale.conf" ]; then
. "$XDG_CONFIG_HOME/locale.conf"
elif [ -n $HOME ] && [ -r $HOME/.config/locale.conf ]; then
. "$HOME/.config/locale.conf"
elif [ -r /etc/locale.conf ]; then
. /etc/locale.conf
elif [ -r /etc/rc.conf ]; then
LANG=$(. /etc/rc.conf 2>/dev/null; echo "$LOCALE")
fi
Ergo: if your system hasn't been informed to use $HOME/.config/locale.conf anywhere in a system-wide context, the local file won't work. Simple and logical.
Last edited by bohoomil (2012-08-31 13:04:37)
:: Registered Linux User No. 223384
:: github
:: infinality-bundle+fonts: good looking fonts made easy
Offline
After the latest update all is set to LANG=C to me too, but worked fine before, and i've had a pure systemd when it was working.
I have /etc/locale.conf with my locales set right and i have /etc/profile.d/locale.sh too.
# cat /etc/locale.conf
LOCALE="it_IT.UTF-8"
LC_COLLATE=C
# cat /etc/environment
#
# This file is parsed by pam_env module
#
# Syntax: simple "KEY=VAL" pairs on separate lines
#
QT_GRAPHICSSYSTEM=raster
LANG="it_IT.utf8"
LC_COLLATE=C
# ls ~/.config/locale.conf
ls: cannot access /home/koko/.config/locale.conf: No such file or directory
# file /etc/profile.d/locale.sh
/etc/profile.d/locale.sh: POSIX shell script, ASCII text executable
# 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=
# pacman -Q|grep systemd
systemd 189-3
systemd-arch-units 20120704-5
systemd-sysvcompat 189-3
systemd-sysvinit 2.88-5
systemd-ui-git 20120828-1
Last edited by kokoko3k (2012-08-31 12:48:43)
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
kokoko3k, would you mind checking out if setting your local $HOME/.config/locale.conf with the content from your /etc/environment, i.e.
LANG="it_IT.utf8"
LC_COLLATE=C
works in your case at all?
:: Registered Linux User No. 223384
:: github
:: infinality-bundle+fonts: good looking fonts made easy
Offline
I was just to write it.
Yes, it works that way, but something has changed since the last upgrade because it worked with LOCALE=
Thanks!
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline