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:
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
LANG=de_AT.UTF-8
LANGUAGE=
LC_CTYPE="de_AT.UTF-8"
LC_NUMERIC=de_AT.utf8
LC_TIME=de_AT.utf8
LC_COLLATE="de_AT.UTF-8"
LC_MONETARY=de_AT.utf8
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.utf8
LC_IDENTIFICATION="de_AT.UTF-8"
LC_ALL=
Currently gdm does not support selecting the language/locale at login,
and I miss that feature. Is there any reason why this was disabled?
Anyway, I would very appreciate if someone could explain to me what is
happening and how to get it right again.
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
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/ju1tl1$cmi$1@dough.gmane.org
07-16-2012, 10:38 PM
Bob Proulx
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.
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.
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
07-17-2012, 09:26 PM
Patrick Strasser
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
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/ju4l9t$a33$1@dough.gmane.org
07-17-2012, 10:24 PM
Bob Proulx
LC_MESSAGES set somewhere during gdm login
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
07-17-2012, 11:04 PM
Patrick Strasser
LC_MESSAGES set somewhere during gdm login
Bob Proulx wrote on 2012-07-18 00:24:
> Patrick Strasser wrote:
> Do you have a ~/.xsession file?
No, no ~/.xsession file.
> 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?
Hit! After suspecting gdm as the culprit - after change from GNOME 2 to
GNOME 3 sowhere lost it's nice cool session setup selection features -
to use old settings that I do not know where to set, I completely
overlooked the obvious in front of my nose.[1]
I have LC_MESSAGES set in .profile, and in .dmrc. I'm still after many
years of using Linux confused about when .profile is sourced, but
anyway, I will remove it and try again.
> 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.
Will have a look into that. I really should learn what's going on during
a login under the hood.
Regards
Patrick
[1] Learned to ask questions without too much speculation about what
went wrong or what _I_ believe is the error. If it was true, I would
have solved the problem right away and need not ask... It worked!
--
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
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/ju4r10$a33$3@dough.gmane.org