PDA

View Full Version : Knoppix upgrade changes English to German



aay
08-04-2003, 07:56 AM
I recently added the Knoppix developers repistories to my /etc/apt/sources.list.



deb http://developer.linuxtag.net/knoppix/ ./
deb-src http://developer.linuxtag.net/knoppix/ ./


My problem is that after doing an apt-get update and apt-get upgrade, my shell is in German. I did an update to xmms and it's gui menu is now also in german. Most other console based programs that I have run are now in German too. Anyone else run into this, and if so is there a solution?

Thanks,

Adam

aay
08-04-2003, 08:05 PM
Gaim is also in German now. This is nuts. Ideas anyone?

Stephen
08-04-2003, 09:14 PM
Have you tried dpkg-reconfigure locales it looks like it may have been set to German somehow. Also you can override the settings by putting:


LANG=en_US
export LANG


In your .bash_profile or .bashrc you may also want to check in /etc/enviroment to see what is set too there and IIRC there is something in /etc/profile to do with the language in German for the shell.

aay
08-04-2003, 10:49 PM
Have you tried dpkg-reconfigure locales it looks like it may have been set to German somehow. Also you can override the settings by putting:


LANG=en_US
export LANG


In your .bash_profile or .bashrc you may also want to check in /etc/enviroment to see what is set too there and IIRC there is something in /etc/profile to do with the language in German for the shell.

Stephen I ran dpkg-reconfigure locales and that didn't seem to help. I also looked in /etc/enviroment andthere was just one line: LANG=en_US so that doesn't appear to be the problem.

Your third suggestion seems to be hitting the mark though. I'm pasting in my /etc/profile.




# /etc/profile
umask 022
PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin:/usr/games"
[ "$UID" = "0" ] || PATH="$PATH:."
export PATH
# Set LOCALE
if [ -f /etc/sysconfig/i18n ]; then
. /etc/sysconfig/i18n
[ -n "$LANG" ] || LANG="de_DE@euro"
export LANG
[ -n "$LC_CTYPE" ] && export LC_CTYPE || unset LC_CTYPE
[ -n "$LC_COLLATE" ] && export LC_COLLATE || unset LC_COLLATE
[ -n "$LC_MESSAGES" ] && export LC_MESSAGES || unset LC_MESSAGES
[ -n "$LC_NUMERIC" ] && export LC_NUMERIC || unset LC_NUMERIC
[ -n "$LC_MONETARY" ] && export LC_MONETARY || unset LC_MONETARY
[ -n "$LC_TIME" ] && export LC_TIME || unset LC_TIME
[ -n "$LC_ALL" ] && export LC_ALL || unset LC_ALL
[ -n "$LANGUAGE" ] && export LANGUAGE || unset LANGUAGE
[ -n "$LINGUAS" ] && export LINGUAS || unset LINGUAS
[ -n "$_XKB_CHARSET" ] && export _XKB_CHARSET || unset _XKB_CHARSET

if [ -n "$SYSFONTACM" ]; then
case $SYSFONTACM in
iso01*|iso02*|iso15*|koi*|latin2-ucw*)
if [ "$TERM" = "linux" ]; then
if ls -l /proc/$$/fd/0 2>/dev/null | grep -- '-> /dev/tty[0-9]*$' >/dev/null 2>&1; then
echo -n -e '\033(K' > /proc/$$/fd/0
fi
fi
;;
esac
fi
unset SYSFONTACM
fi
# END LOCALE
# enable bash completion in interactive shells
[ "$PS1" -a -f /etc/bash_completion ] && . /etc/bash_completion
TTY=$(tty)
TTY=${TTY##*/}
[ -n "$TTY" ] && PS1="\[\]\u@$TTY[\W]\\$\[\] " || PS1="\[\][\W]\u\[\] "
alias ..="cd .."
alias which="type -path"
alias where="type -all"
alias ll="ls -l --color=auto"
alias l="ls -a --color=auto"
alias rm="rm -i"
alias mv="mv -i"
alias cp="cp -i"
alias la="ls -la --color=auto"
alias ls="ls --color=auto"
# This is very KNOPPIX-specific
alias su="sudo su"


As you can see, the problem seems to be here:


[ -n "$LANG" ] || LANG="de_DE@euro"
export LANG


What do you have for that line?

Thanks

Stephen
08-04-2003, 11:24 PM
I've got Bonzai Linux on here now which is basically an install of Woody, which I have taken to SID, without the pain of going through a normal install but in the backup of /etc from knoppix I have it just has the same as yours except it has LANG="de_DE" I would change it to en_US just to give it a try and see if it works. You never mentioned did you edit the .bash rc or profile to try and override the default that has been set to German also I take it you did do the obvious and checked the Regional & Accessibility to make sure the language is set properly there. You may also want to check the . directory's files for xmms and gaim to see if anything is being set there.


Just had another thought remove all the kde-i18n-* locales and it has to default to C or POSIX which will give you an English default locale.

aay
08-05-2003, 04:09 AM
I've got Bonzai Linux on here now which is basically an install of Woody, which I have taken to SID, without the pain of going through a normal install but in the backup of /etc from knoppix I have it just has the same as yours except it has LANG="de_DE" I would change it to en_US just to give it a try and see if it works. You never mentioned did you edit the .bash rc or profile to try and override the default that has been set to German

Yes I did this and it didn't help.




also I take it you did do the obvious and checked the Regional & Accessibility to make sure the language is set properly there. You may also want to check the . directory's files for xmms and gaim to see if anything is being set there.

Checked these and there really aren't any defaults to adjust. Plus I wouldn't want to do this for every gnome/gtk app - which seem to be the only ones affected by this.




Just had another thought remove all the kde-i18n-* locales and it has to default to C or POSIX which will give you an English default locale.


Well, would this last suggestion really help seeing that nothing in KDE is giving me any problems - only gtk based apps.

Hmm. This is turning out to be a tough nut to crack, but I have made some progress.

First of all, even though I have allready edited /etc/profile as indicated above, I added an additional line export LC_ALL=C after the if/then statement.

That brought good results. My shell now is back to English.

But all the gnome/gtk apps are still in German.

I think I know why though.

Here is my /etc/sysconfig/i18n


LANG="de_DE@euro"
COUNTRY="de"
LANGUAGE="de"
CHARSET="iso8859-15"
XMODIFIERS=""


I changed it to:



LANG="en_US"
COUNTRY="en"
LANGUAGE="en"
CHARSET="iso8859-15"
XMODIFIERS=""


After I restarted X, this fixed the problem.

But unfortunately when I added the repositories listed in my first post in this thread and did an apt-get update, apt-get upgrade, this kind of brought my hdinstall back to more of a CD based version of Knoppix. All hardware detection, probing, etc is performed whenever I reboot. I even see the detection progress bar that normally only accompanies the CD version.

An effect of this is that /etc/sysconfig/i18n is rewritten with the German defaults whenever I reboot.

I tried appending the lang=us option to lilo, but that doesn't seem to do anything. So I guess now I either find the script that is updating /etc/sysconfig/i18n and modify it or I come up with some sort of hack to overwrite /etc/sysconfig/i18n with English defaults somewhere in the boot process. Thanks for sticking with me on this one. It's been a real pain. Suggestions still welcome.

aay
08-05-2003, 04:52 AM
Ok Stephen I've gotten a fix. It's not the most elegant thing in the world but it works.

Like I said /etc/sysconfig/i18n keeps on being rewritten with the german defaults, but thankfully the English defaults that I loaded are saved as /etc/sysconfig/i18n.save before the file is overwritten.

So I added the following lines to /etc/init.d/bootmisc.sh

rm -rf /etc/sysconfig/i18n
cp /etc/sysconfig/i18n.save /etc/sysconfig/i18n
chmod +r /etc/sysconfig/i18n

This essentially fixes the problem. Like I said not the most elegant solution, but it works. Thanks for your help.

Stephen
08-05-2003, 05:17 AM
[quote]
But unfortunately when I added the repositories listed in my first post in this thread and did an apt-get update, apt-get upgrade, this kind of brought my hdinstall back to more of a CD based version of Knoppix. All hardware detection, probing, etc is performed whenever I reboot. I even see the detection progress bar that normally only accompanies the CD version.


Interesting side effect for those people who complain that they want the HD install to be more like the CD as long as they could figure out how to get it to a language other than German.

And there I had this reply all set to post and I previewed it about to suggest just about the same thing and seen your reply I chopped most of it out although I would still suggest a post to the developers list someone has to know which file you need to edit.

paradocs
08-05-2003, 05:47 AM
Hi All

I don't know much. But could the following help?:

At KNOPPIX root the variable for
the programming language is LANG

echo $LANG
C

your speaking language variable is LANGUAGE so

echo $LANGUAGE
de
export LANGUAGE=us

Best Wishes
paradocs

aay
08-05-2003, 05:48 AM
Good idea. I'll try and get a note off to them.

aay
08-07-2003, 07:30 AM
Stephen and others who have been following this thread or who has been having this problem after adding the Knoppix package repository to your sources.list file I found out the real reason why things get defaulted back to german.

The fix is much better / more elegant than my previous fix.

Here's what need to do:

You need to open and edit the following file:

/etc/init.d/knoppix-autoconfig

Look for the following section:


### localization
# Allow language specification via commandline. The default language
# will be overridden via "lang=de" boot commandline
LANGUAGE="$(getbootparam lang 2>/dev/null)"
[ -n "$LANGUAGE" ] || LANGUAGE="de"


Simply change the "de" at the end to "us".

This should fix the problem.

Stephen
08-07-2003, 08:18 AM
/etc/init.d/knoppix-autoconfig



That's interesting two different threads with problems in the same file it may be something to look out for in the future, the other thread here (http://www.knoppix.net/forum/viewtopic.php?p=19114#19114).

aay
08-07-2003, 04:31 PM
Stephen,

Is /etc/init.d/knoppix-autoconfig run at boot on your system or on hd installs in general. This seems to be responsible for Knoppix hardware detection/configuration, but untill I added the above mentioned sources to my sources.list file and did an update, I wasn't aware if it running after doing a hdinstall. The fact that it is in /etc/init.d/ means that it should be run during boot, but I'm wondering if maybe it isn't changed or disabled somehow after a hdinstall.

Also I'm suspecting that my /etc/init.d/knoppix-autoconfig is a bit different than others who have done a hdinstall, but who have not added the above mentioned repositories to their sources.list.

Actually I had already looked at the link you posted and it got me started reading this file. Once I did that it was obvious that this is where my problem was.