You are not logged in.
When using for instance the locale en_DK, which I have made sure is available, I'm having some trouble with Xlib. urxvt for instance prints the following warning at startup:
urxvt: the locale is not supported by Xlib, working without locale support.
What's worse, it also prevents xmobar from loading properly. It simply crashes instantly with the following error message:
xmobar: user error (createFontSet)
The problem is also there when using my custom locale en_MY, but not with e.g. en_US, sv_SE and de_DE. So it seems like some locales doesn't work with/aren't enabled for Xlib. It also seems like the problem is the _name_ of the locale since if I copy one of the failing locales to for instance en_US, that one works too. Is there something that has to be done, other than putting the locale in /etc/locale.gen, and running locale-gen?
Last edited by havresylt (2010-09-13 08:39:38)
Offline
I've set my locales and urxvt works:
$ locale
LANG=en_DK.UTF-8
LC_CTYPE="en_DK.UTF-8"
LC_NUMERIC="en_DK.UTF-8"
LC_TIME="en_DK.UTF-8"
LC_COLLATE=C
LC_MONETARY="en_DK.UTF-8"
LC_MESSAGES=C
LC_PAPER="en_DK.UTF-8"
LC_NAME="en_DK.UTF-8"
LC_ADDRESS="en_DK.UTF-8"
LC_TELEPHONE="en_DK.UTF-8"
LC_MEASUREMENT="en_DK.UTF-8"
LC_IDENTIFICATION="en_DK.UTF-8"
LC_ALL=
But of course if you set it to "en_DK"
[karol@black ~]$ export LC_ALL="en_DK"
[karol@black ~]$ locale
LANG=en_DK.UTF-8
LC_CTYPE="en_DK"
LC_NUMERIC="en_DK"
LC_TIME="en_DK"
LC_COLLATE="en_DK"
LC_MONETARY="en_DK"
LC_MESSAGES="en_DK"
LC_PAPER="en_DK"
LC_NAME="en_DK"
LC_ADDRESS="en_DK"
LC_TELEPHONE="en_DK"
LC_MEASUREMENT="en_DK"
LC_IDENTIFICATION="en_DK"
LC_ALL=en_DK
[karol@black ~]$ urxvt
urxvt: the locale is not supported by Xlib, working without locale support.
it wont :-)
Offline
Then something is very wrong with my system. I tried doing
export LC_ALL="en_DK.UTF-8"
and then launching urxvt, but I still get the error message. What could be wrong? Is there a way to restore packages to their default?
Offline
Then something is very wrong with my system. I tried doing
export LC_ALL="en_DK.UTF-8"
and then launching urxvt, but I still get the error message. What could be wrong? Is there a way to restore packages to their default?
What packages? You can set your locales to whatever you want.
Uncomment the desired locale in /etc/locale.gen, generate the locale, set it in /etc/rc.conf, reboot and it should work. Check if you have the correct locales (I export LC_MESSAGES=C in .bashrc, so you can have similar scripts that change your locale).
Offline
What I meant was that there obviously seems to be something wrong some other part of the configuration. For some reason Xlib doesn't like some locales. I thought if I reset some of the packages it might have an effect. But I really have no clue at all. Someone has an idea what might be broken?
Offline
What I meant was that there obviously seems to be something wrong some other part of the configuration. For some reason Xlib doesn't like some locales. I thought if I reset some of the packages it might have an effect. But I really have no clue at all. Someone has an idea what might be broken?
So you did everything I posted, your locales looks like mine (the first listing) and you still get an error?
Offline
havresylt wrote:What I meant was that there obviously seems to be something wrong some other part of the configuration. For some reason Xlib doesn't like some locales. I thought if I reset some of the packages it might have an effect. But I really have no clue at all. Someone has an idea what might be broken?
So you did everything I posted, your locales looks like mine (the first listing) and you still get an error?
Yes, exactly: http://pastebin.com/5eM77rBN
Offline
What's the output of
grep -v ^# /etc/locale.gen
?
It should list en_DK.UTF-8 UTF-8.
Offline
Yes I have enabled it:
$ grep -v ^# /etc/locale.gen
en_MY.UTF-8 UTF-8
en_MY ISO-8859-1
en_DK.UTF-8 UTF-8
en_DK ISO-8859-1
en_US.UTF-8 UTF-8
en_US ISO-8859-1
sv_SE.UTF-8 UTF-8
sv_SE ISO-8859-1
Last edited by havresylt (2010-08-19 20:23:04)
Offline
Yes I have enabled it:
$ grep -v ^# /etc/locale.gen en_MY.UTF-8 UTF-8 en_MY ISO-8859-1 en_DK.UTF-8 UTF-8 en_DK ISO-8859-1 en_US.UTF-8 UTF-8 en_US ISO-8859-1 sv_SE.UTF-8 UTF-8 sv_SE ISO-8859-1
I've jsut remembered the right way to do ^
locale -a
;P
Try https://bbs.archlinux.org/viewtopic.php?pid=645074 ; basically
export LC_CTYPE="en_US.utf8"
should help.
Offline
Wow I can't believe I missed that thread. Thank you for finding it!
Then it is as I thought, that it's the name of the locale that is causing confusion. I also had to be careful not to set LC_ALL, since that seems to override any custom settings for the other variables. It's pretty confusing how these variables work.
Still, if you really are using the locale in your first listing, it's weird that it works for you and not for me.
Offline