You are not logged in.

#1 2010-07-31 06:37:20

Frood
Member
From: Gothenburg, Sweden
Registered: 2008-01-08
Posts: 14

[Solved] Problems with locale in X11 using SLiM

My locale settings do not work in X but they do when not in X.

This is the output I get when when i run locale in X:

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=

When I run locale when not in X, this is what I get

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

This matches my settings in rc.conf:

LOCALE="en_US.UTF-8"

This has the effect that special characters will not display properly in X. I have tried running locale gen a number of times and setting the locale to different things in rc.conf but it makes no difference.

I'm using SLiM and wmii if that matters.

Last edited by Frood (2010-08-25 11:22:16)

Offline

#2 2010-07-31 08:33:07

Varg
Member
From: Belgium
Registered: 2010-07-07
Posts: 272

Re: [Solved] Problems with locale in X11 using SLiM

As far as I know the settings in rc.conf only apply to the terminals. When you want those locales in X you have to adjust that in the X configuration. It's like that for keyboard layouts, so I thinks it's the same thing for locales. I could be wrong though.
There's an article in the wiki about Xorg, maybe you'll find something over there.

Offline

#3 2010-07-31 10:00:15

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Problems with locale in X11 using SLiM

What exactly is displayed wrong? Some umlauts in a scripted dialogs, text you input in the terminal emulator?

Offline

#4 2010-07-31 10:27:30

Mektub
Member
From: Lisbon /Portugal
Registered: 2008-01-02
Posts: 647

Re: [Solved] Problems with locale in X11 using SLiM

Frood,

put your locale settings in /etc/xprofile or ~/.xprofile.

http://wiki.archlinux.org/index.php/Xprofile

Mektub


Follow me on twitter: https://twitter.com/johnbina

Offline

#5 2010-08-02 09:35:45

Frood
Member
From: Gothenburg, Sweden
Registered: 2008-01-08
Posts: 14

Re: [Solved] Problems with locale in X11 using SLiM

karol wrote:

What exactly is displayed wrong? Some umlauts in a scripted dialogs, text you input in the terminal emulator?

Umlauts in xterm(also in urxvt) and gvim specifically. No problems in other applications that i have noticed, for example my utf8-encoded latex files that look strange in gvim compile just fine.

The xprofile script only seems to be used by GDM and KDM according to the wiki, I'm using SLiM. Should I put my locale settings in my .xinitrc perhaps, could I make it inherit the settings from rc.conf?

This is a bit strange because I haven't had these problems with other installs of Arch.

Offline

#6 2010-08-02 10:07:43

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: [Solved] Problems with locale in X11 using SLiM

Did you follow the wiki?


To know or not to know ...
... the questions remain forever.

Offline

#7 2010-08-02 10:15:16

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Problems with locale in X11 using SLiM

I'm not using any DE and I don't use xprofile script so my locale look exactly the same whether in X or not.

@ bernarcher
I think OP has a problem with how those characters look, not how to input them.

Last edited by karol (2010-08-02 10:16:45)

Offline

#8 2010-08-02 11:42:02

yabasta
Member
Registered: 2010-05-01
Posts: 167

Re: [Solved] Problems with locale in X11 using SLiM

This is a stab in the dark, but i was having the same issue after upgrading Xorg recently. Not sure what video card you use, but if you use a certain type of nvidia then whats in this post may help : https://bbs.archlinux.org/viewtopic.php?id=101852

Like i say, a stab in the dark..may help.

Last edited by yabasta (2010-08-02 11:42:30)

Offline

#9 2010-08-03 07:49:52

Frood
Member
From: Gothenburg, Sweden
Registered: 2008-01-08
Posts: 14

Re: [Solved] Problems with locale in X11 using SLiM

karol wrote:

I'm not using any DE and I don't use xprofile script so my locale look exactly the same whether in X or not.

Do you use any login manager or do you start X from the terminal? My current thought is that SLiM needs to be configured in some way to pass on the locale settings.

Offline

#10 2010-08-03 07:53:14

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Problems with locale in X11 using SLiM

Frood wrote:
karol wrote:

I'm not using any DE and I don't use xprofile script so my locale look exactly the same whether in X or not.

Do you use any login manager or do you start X from the terminal? My current thought is that SLiM needs to be configured in some way to pass on the locale settings.

I start X form the console. I think there already were some threads with people accusing SLIM of messing up their fonts.

Offline

#11 2010-08-03 09:09:39

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: [Solved] Problems with locale in X11 using SLiM

Sorry, I previously misunderstood your problem. sad

This is what I know about locale settings in general:

Usually the locale is set with the locale.sh script in /etc/profile.d. It should also determine the language X uses. There could however be different setup in /etc/X11/xinit/xinitrc or a stale script in /etc/X11/xinit/xinitrc.d which changes the language.


To know or not to know ...
... the questions remain forever.

Offline

#12 2010-08-11 14:44:11

Frood
Member
From: Gothenburg, Sweden
Registered: 2008-01-08
Posts: 14

Re: [Solved] Problems with locale in X11 using SLiM

I worked around the problem by changing SLiM to gdm. Now it works as it should and I can see all my umlauts and the 'locale' command gives the expected output. So it really seems that SLiM was the culprit here.

Only trouble is that gdm is ugly without any themes from gnome installed(or what you need to get it beautiful) and that it doesn't seem to use .xinitrc. But I guess that I can figure that out.

Offline

#13 2010-08-25 11:21:51

Frood
Member
From: Gothenburg, Sweden
Registered: 2008-01-08
Posts: 14

Re: [Solved] Problems with locale in X11 using SLiM

I found the root of the problem. I had modified the slim.conf to enable me to use gnome-keyring but I didn't have it start a login shell. So for anyone having a similar problem make sure that your login command contains something like:

login_cmd ... /bin/bash -login ...

The -login after /bin/bash is what does the trick and makes bash run the profile script which is needed for the locale to work properly(among other things).

Offline

Board footer

Powered by FluxBB