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

Re: LC_MESSAGES set somewhere during gdm login



Hello Bob!

Thanks for your reply and your help!

Bob Proulx wrote on 2012-07-17 00:38:
> 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?

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.

> You can double check by looking at the /etc/locale.gen file and seeing
> what is listed (uncommented) there.
> 
>   grep -v '#' /etc/locale.gen 

Seems fine:

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


de_AT.UTF-8 UTF-8
en_US.UTF-8 UTF-8

>> 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.

In my understanding that is LC_MESSAGES, that is set to a locale that is
not configured.

> 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.

What I expected:

----------------------

% strace -v -e trace=file locale
execve("/usr/bin/locale", ["locale"], ["LANG=de_AT.UTF-8", "DISPLAY=:0",
"PWD=/home/past", "LOGNAME=past", "GNOME_KEYRING_PID=4727",
"XAUTHORITY=/var/run/gdm3/auth-fo"..., "COLORTERM=yes",
"VST_PATH=/usr/lib/vst:/usr/local"...,
"DSSI_PATH=/usr/lib/dssi:/usr/loc"..., "GDMSESSION=gnome-fallback",
"GNOME_KEYRING_CONTROL=/home/past"..., "USERNAME=past",
"GNOME_DESKTOP_SESSION_ID=this-is"..., "WINDOWPATH=7",
"LC_MEASUREMENT=de_AT.UTF-8", "LC_NUMERIC=de_AT.UTF-8",
"DESKTOP_SESSION=gnome-fallback", "LC_MONETARY=de_AT.UTF-8",
"DBUS_SESSION_BUS_ADDRESS=unix:ab"...,
"LADSPA_PATH=/usr/lib/ladspa:/usr"...,
"XDG_DATA_DIRS=/usr/share/gnome:/"...,
"XDG_SESSION_COOKIE=c495c22ee9234"..., "GDM_LANG=de_DE.utf8",
"SHELL=/bin/zsh", "LC_TIME=de_AT.UTF-8", "WINDOWID=33554437",
"SSH_AGENT_PID=4806", "GTK_MODULES=gtk-vector-screensho"...,
"SESSION_MANAGER=local/localhost:"...,
"SSH_AUTH_SOCK=/home/past/.cache/"...,
"PATH=/home/past/CodeSourcery/Sou"..., "TERM=xterm", "HOME=/home/past",
"LV2_PATH=/usr/lib/lv2:/usr/local"..., "USER=past",
"GPG_AGENT_INFO=/home/past/.cache"..., "SHLVL=1",
"OLDPWD=/home/past/.config", "EDITOR=vim", "PAGER=less",
"MAIL=/var/mail/past", "LS_COLORS=rs=0:di=01;34:ln=01;36"...,
"LESS_TERMCAP_mb=\33[01;31m", "LESS_TERMCAP_md=\33[01;31m",
"LESS_TERMCAP_me=\33[0m", "LESS_TERMCAP_se=\33[0m",
"LESS_TERMCAP_so=\33[01;44;33m", "LESS_TERMCAP_ue=\33[0m",
"LESS_TERMCAP_us=\33[01;32m", "HISTSIZE=10000000", "SAVEHIST=1000000",
"HISTFILE=/home/past/.zsh_history", "vcs_info_msg_0_=",
"vcs_info_msg_1_=", "LC_MESSAGES=de_DE.UTF-8", "_=/usr/bin/strace"]) = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or
directory)
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or
directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY) = 3
open("/usr/lib/locale/locale-archive", O_RDONLY) = 3
open("/usr/share/locale/locale.alias", O_RDONLY) = 3
open("/usr/lib/locale/de_DE.UTF-8/LC_MESSAGES", O_RDONLY) = -1 ENOENT
(No such file or directory)
open("/usr/lib/locale/de_DE.utf8/LC_MESSAGES", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("/usr/lib/locale/de_DE/LC_MESSAGES", O_RDONLY) = -1 ENOENT (No such
file or directory)
open("/usr/lib/locale/de.UTF-8/LC_MESSAGES", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("/usr/lib/locale/de.utf8/LC_MESSAGES", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("/usr/lib/locale/de/LC_MESSAGES", O_RDONLY) = -1 ENOENT (No such
file or directory)
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
open("/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache", O_RDONLY) = 3
LANG=de_AT.UTF-8
LANGUAGE=
LC_CTYPE="de_AT.UTF-8"
LC_NUMERIC=de_AT.UTF-8
LC_TIME=de_AT.UTF-8
LC_COLLATE="de_AT.UTF-8"
LC_MONETARY=de_AT.UTF-8
LC_MESSAGES=de_DE.UTF-8
LC_PAPER="de_AT.UTF-8"
LC_NAME="de_AT.UTF-8"
LC_ADDRESS="de_AT.UTF-8"
LC_TELEPHONE="de_AT.UTF-8"
LC_MEASUREMENT=de_AT.UTF-8
LC_IDENTIFICATION="de_AT.UTF-8"
LC_ALL=

---------------------------------

Still, I don't know where LC_MESSAGES was changed from de_AT.UTF-8 to
de_DE.UTF-8

Regards

Patrick
-- 
Engineers motto: cheap, good, fast: choose any two
Patrick Strasser <patrick dot strasser at  tugraz dot at>
Student of Telematics, Graz Univ. of Technology, Austria


Reply to: