Patrick Strasser wrote:
> Bob Proulx wrote:
> > Patrick Strasser wrote:
> >> Ich have a nagging problem: After loggin in throuh gdm, LC_MESSAGES is
> >> set to a locale that is not configured, and I can not find where this
> >> happens.
> >>
> >> I configured (dpkg-reconfigure locales) locales for de_AT.UTF-8 and
> >> en_US.UTF-8. Still after logging in with gdm and starting gnome-terminal
> >> or xterm LC_MESSAGES is set to de_DE.UTF-8:

With your latest message I see that I read your original message
insufficiently.  Sorry about that.  I missed that you had already
converged onto LC_MESSAGES as being the problematic environment
variable that was negatively affecting.  I see that now.

> > Running 'dpkg-reconfigure locales' should be enough.  It should set up
> > the requested locales.  Are you sure you selected the same locale as
> > the one you are trying to use?
> 
> I want to use de_AT.UTF-8, and that works fine until I login through
> gdm. After logging in, LC_MESSAGES and only LC_MESSAGES is set to
> de_DE.UTF-8. Note the difference between AT and DE. I did not configure
> de_DE.UTF-8, which would be a workaround for the symptom, I'd rather
> like to find out where this went wrong.

Do you have a ~/.xsession file?  If so then when logging in with xdm,
gdm, gdm3, kdm, or other it will use that file to control how your
session starts.  Normally your sessions will not be a "login shell"
and will not source anything.  But many people, myself for instance,
use ~/.xsession to force sourcing of our ~/.profile so that we have
the same environment as if we were to log in remotely such as through
a serial console or through an ssh network login.

Do you have LC_MESSAGES set in your ~/.bashrc?  Or perhaps
/etc/bash.bashrc or some other file that might be getting sourced
through the chain?

I am sure that I want to launch into a discussion of how ~/.xsession
works but I think I shouldn't unless it is somehow related.  I have
posted about the behavior often in the past, though not very
recently.  You could find all about it in the archives.

I personally create ~/.xsession, ensure that it is executable, ensure
that it is a bash script with the --login option, and that causes my
~/.profile to be sourced by that shell process when X starts up.  That
allows me to control the environment for the running X session.
(Setting something in ~/.bashrc only affects shell sessions and not
the X environment itself.)  Then my ~/.profile sources ~/.bashrc (so
everything for everything can be controlled there) and in my ~/.bashrc
file I manually set my locale variables to:

  export LANG=en_US.UTF-8
  export LC_COLLATE=C

For me that is a good combination.  It isn't general purpose.  I can't
imagine how setting LC_COLLATE=C would interact with a chinese big5
charset for example.

In any case, it is something else for you to check.  I cannot recreate
your LC_MESSAGES variable getting set here in my environment.

Bob

Attachment: signature.asc
Description: Digital signature

Reply via email to