[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: LC_MESSAGES set somewhere during gdm login



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:

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?

You can double check by looking at the /etc/locale.gen file and seeing
what is listed (uncommented) there.

  grep -v '#' /etc/locale.gen 

> past@localhost ~ % locale
> locale: Cannot set LC_MESSAGES to default locale: No such file or directory
> locale: Cannot set LC_ALL to default locale: No such file or directory

If you think you really did select to generate the locale that you
wish to use then I would suspect some environment problem specific to
your login session.  I would try to isolate it.  I suspect there might
be an environment variable set that is messing with this.

Try this:

  $ env -i PATH=/usr/bin:/bin locale
  LANG=
  LANGUAGE=
  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=

Then try it with your selected local.

  $ env -i PATH=/usr/bin:/bin LANG=de_AT.UTF-8 locale

For me:

  $ env -i PATH=/usr/bin:/bin LANG=en_US.UTF-8 locale
  LANG=en_US.UTF-8
  LANGUAGE=
  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=

If that works to produce reasonable output then you know you have an
environment variable set that is causing the problem.  Finding that
environment variable should be easy in that case.

If that does not work then the problem is elsewhere.  I would then try
strace on the command to see what it is doing.

  $ strace -v -e trace=file locale
  ...
  open("/usr/lib/locale/en_US.utf8/LC_MESSAGES", O_RDONLY) = 5
  ...

Expect to see a lot of ENOENT as it searches looking for both specific
and general files related to locales.  But that should give you a
place to start.

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: