Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Changing locale for X session

156 views
Skip to first unread message

Shachar Or

unread,
Jul 20, 2008, 11:50:11 AM7/20/08
to
Hello!

How do I set the locale for a user to something other than the one set by
debconf in the locales package?

This should be the user's default in X sessions.

I was told that gdm has a feature for this but I'm using kdm.

Cheers!
--
Shachar Or | שחר אור
http://ox.freeallweb.org/


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Eugene V. Lyubimkin

unread,
Jul 20, 2008, 12:10:14 PM7/20/08
to
> Hello!
>=20
> How do I set the locale for a user to something other than the one set =
by=20

> debconf in the locales package?
>=20

> This should be the user's default in X sessions.
>=20

> I was told that gdm has a feature for this but I'm using kdm.
>=20
> Cheers!
export LC_ALL=3D<locale> in ~/.Xinitrc ?

--=20
Eugene V. Lyubimkin aka JackYF, Ukrainian C++ developer.

signature.asc

Shachar Or

unread,
Jul 20, 2008, 12:40:13 PM7/20/08
to
On Sunday 20 July 2008 18:55, Eugene V. Lyubimkin wrote:
> > Hello!
> >=20
> > How do I set the locale for a user to something other than the one set =
>
> by=20
>
> > debconf in the locales package?
> >=20
> > This should be the user's default in X sessions.
> >=20
> > I was told that gdm has a feature for this but I'm using kdm.
> >=20
> > Cheers!
>
> export LC_ALL=3D<locale> in ~/.Xinitrc ?
What is the "3D" for?

>
> --=20
> Eugene V. Lyubimkin aka JackYF, Ukrainian C++ developer.

--

Shachar Or

unread,
Jul 20, 2008, 12:50:09 PM7/20/08
to
On Sunday 20 July 2008 18:55, Eugene V. Lyubimkin wrote:
> export LC_ALL=3D<locale> in ~/.Xinitrc ?
When I open up a terminal as that user and type 'echo $L' and press <tab> i
can see that there's no such variable.

I've tried to set the $LANG variable via this file and it didn't change it
also.

I think that this isn't the correct file.

Thilo Six

unread,
Jul 20, 2008, 1:20:14 PM7/20/08
to
Shachar Or wrote the following on 20.07.2008 17:47

> Hello!
>
> How do I set the locale for a user to something other than the one set by
> debconf in the locales package?
>
> This should be the user's default in X sessions.
>
> I was told that gdm has a feature for this but I'm using kdm.
>
> Cheers!

kde or gnome?
etch or lenny?

--
bye Thilo

key: 0x4A411E09

Kelly Clowers

unread,
Jul 20, 2008, 1:40:16 PM7/20/08
to
On Sun, Jul 20, 2008 at 9:45 AM, Shachar Or <dawn...@lavabit.com> wrote:
> On Sunday 20 July 2008 18:55, Eugene V. Lyubimkin wrote:
>> export LC_ALL=3D<locale> in ~/.Xinitrc ?
> When I open up a terminal as that user and type 'echo $L' and press <tab> i
> can see that there's no such variable.
>
> I've tried to set the $LANG variable via this file and it didn't change it
> also.
>
> I think that this isn't the correct file.


I do not know where that "3D" came from, but it isn't valid.

Try setting LC_ALL= and LANG= in ~/.xsession

Make sure the locale is correct, e.g. mine would be:
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

Capitalization and punctuation of the locale is important.

Generally:
language_LOCATION.ENCODING


Cheers,
Kelly Clowers

Shachar Or

unread,
Jul 20, 2008, 3:10:09 PM7/20/08
to
Hi!

Using etch. Using kdm.

I've found that I can put stuff in ~/.xsession. I put 'export
LC_ALL=he_IL.UTF-8' there. That made the xserver start and quit, putting me
back in kdm.

I assume that this is because X didn't start any process and it decides to die
thus.

I assume that this is because of kdm's behaviour. kdm, when it finds
the .xsession in the user's home, launches it and doesn't launch the script
that it would normally launch, the one that starts the KDE session.

I didn't want to mess around too much so I worked at this at another angle; I
set the system default to he_IL.UTF-8, which is what I want for my users, and
then I did
echo 'export LC_ALL=en_US.UTF-8' >> /root/.profile
so that root won't have Hebrew in it's shell. This is because Hebrew is RTL
and it is confusing when combined with LTR; not to mention that the console
doesn't even print RTL correctly, but in reverse! (where do I file a bug for
this?)

Good week!

Bob Cox

unread,
Jul 20, 2008, 3:40:17 PM7/20/08
to
On Sun, Jul 20, 2008 at 19:33:30 +0300, Shachar Or (dawn...@lavabit.com) wrote:

> On Sunday 20 July 2008 18:55, Eugene V. Lyubimkin wrote:
> > > Hello!
> > >=20
> > > How do I set the locale for a user to something other than the one set =
> >
> > by=20
> >
> > > debconf in the locales package?
> > >=20
> > > This should be the user's default in X sessions.
> > >=20
> > > I was told that gdm has a feature for this but I'm using kdm.
> > >=20
> > > Cheers!
> >
> > export LC_ALL=3D<locale> in ~/.Xinitrc ?
> What is the "3D" for?

I think the message was created in printed/quotable format but then
posted as plain text, hence the "=3D" and "=20".

Regarding kdm/gdm/xdm, I use none of these and really do not see the
point, (other than avoiding having to type "startx").

--
Bob Cox. Stoke Gifford, near Bristol, UK.
Registered user #445000 with the Linux Counter - http://counter.li.org/

Thilo Six

unread,
Jul 20, 2008, 6:00:19 PM7/20/08
to
Shachar Or wrote the following on 20.07.2008 21:02

> Hi!
>
> Using etch. Using kdm.
>
> I've found that I can put stuff in ~/.xsession. I put 'export
> LC_ALL=he_IL.UTF-8' there. That made the xserver start and quit, putting me
> back in kdm.

in kde you can use a shell script like (chmod 700):
<--------------------------------------------
$ cat ~/.kde/env/locale.sh
#!/bin/bash
export LANG="de_DE.UTF-8"
export LANGUAGE="de_DE:de"
--------------------------------------------->

gnome pendant:
<--------------------------------------------
$ cat ~/.gnomerc
export LANG="de_DE.UTF-8"
export LANGUAGE="de_DE:de"
#export LANGUAGE="en_GB:en"
--------------------------------------------->

i have asked because the xserver in lenny will ease all of this:
http://packages.debian.org/changelogs/pool/main/x/xorg/xorg_7.3+14/changelog

<--------------------------------------------
* Add support for $HOME/.xsessionrc. Closes: #411639
This file, if present, will get sourced during the start of your X
session. This allows you to set session-wide environment variables
easily for things like locale information. Patch adapted from one by
Yves-Alexis Perez. Thanks also to Holger Levsen and Osamu Aoki for
advice.
+ Adds 40x11-common_xsessionrc to /etc/X11/Xsession.d
+ Document this in Xsession.5 manpage
+ Add a NEWS.Debian entry about it
+ Modifies /etc/X11/Xsession to declare the location of ~/.xsessionrc.
Custom versions of Xsession (like gdm's) will need an update
--------------------------------------------->

</snip>

> Good week!

HTH
--
bye Thilo

key: 0x4A411E09


Kelly Clowers

unread,
Jul 21, 2008, 12:10:12 AM7/21/08
to
On Sun, Jul 20, 2008 at 12:02 PM, Shachar Or <dawn...@lavabit.com> wrote:
> This is because Hebrew is RTL and it is confusing when combined with LTR;
> not to mention that the console doesn't even print RTL correctly, but in
> reverse! (where do I file a bug for this?)

I think RTL support on the console would be a kernel issue. Even for terminal
emulators, I think only mlterm has any RTL.

Shachar Or

unread,
Jul 21, 2008, 2:50:09 AM7/21/08
to
On Monday 21 July 2008 07:05, Kelly Clowers wrote:
> On Sun, Jul 20, 2008 at 12:02 PM, Shachar Or <dawn...@lavabit.com> wrote:
> > This is because Hebrew is RTL and it is confusing when combined with LTR;
> > not to mention that the console doesn't even print RTL correctly, but in
> > reverse! (where do I file a bug for this?)
>
> I think RTL support on the console would be a kernel issue. Even for
> terminal emulators, I think only mlterm has any RTL.

Anyone knows why this is that the console has yet to gain RTL support?

What about the common terminal emulators?

--
Shachar Or | שחר אור
http://ox.freeallweb.org/

0 new messages