On SuSE Linux 7.3 the locale is is sometimes surprisingly resetted to
the system default values.
This is a bug in /etc/profile reintroduced in SuSE Linux 7.3:
Have a look at the file /etc/profile and search for the following piece of code:
#
# Source the files generated by SuSEconfig
#
if test -z "$_SUSECONFIG_PROFILE" ; then
# read only once
readonly _SUSECONFIG_PROFILE=true
test -e /etc/SuSEconfig/profile && . /etc/SuSEconfig/profile
fi
After the line
readonly _SUSECONFIG_PROFILE=true
there should be another line
export _SUSECONFIG_PROFILE
which was forgotten.
The intention of this piece of code is to avoid reading
/etc/SuSEconfig/profile more than once. For example, if you have
RC_LANG="en_US" set in /etc/rc.config.d/ lang.rc.config it should
nevertheless be possible to start a Chinese KDE session with the
command:
~$ LANG=zh_TW.Big5 WINDOWMANAGER=kde startx
But a command used during the start of KDE, /opt/kde2/bin/startkde is
a login shell, it contains
#!/bin/bash --login
as the first line. Therefore it reads /etc/profile again, which will
read /etc/ SuSEconfig/profile again if _SUSECONFIG_PROFILE is exported
and therefore unset. /etc/ SuSEconfig/profile then resets LANG to
en_US, i.e. KDE will be started in the wrong locale.
Sourcing /etc/SuSEconfig/profile again and again in each login shell
causes the problem that the locale changes back to the default system
locale for each login shell.
The user doesn't know that the locale has been changed behind his back
and just wonders why for example Chinese input doesn't work in
applications started via the KDE menus or via Alt-F2 although KDE was
started with the above command line.
Starting the KDE terminal konsole via Alt-F2 or via clicking on the
terminal icon in the KDE taskbar and then calling the locale command
in the terminal which opens will reveal that the locale has been
changed during the start of KDE.
So please change /etc/profile as explained above to fix this.
--
Mike Fabian