LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-15-2006, 12:51 PM   #1
hussar
Member
 
Registered: Oct 2003
Location: Heidelberg, Germany
Distribution: Slackware 11.0; Kubuntu 6.06; OpenBSD 4.0; OS X 10.4.10
Posts: 345

Rep: Reputation: 30
Multilingual support for ssh sessions


Hello,

I am looking for some help setting up my slack-current system to support more than one language when ssh'ing into a machine on my network that has a language other than English as its default language.

I live in a multilingual family. The two primary languages are English and German. My main machine is set up to use English as its default language. I have recently built a machine from parts and installed kubuntu on it with German as the default language. It has a German keyboard attached to it.

I occasionally ssh into the kubuntu machine to perform administrative tasks and, well, because I can. Since it uses German as its primary language, however, in the terminal on my slack box the German special characters appear, uh, not quite right.

How can I adjust my main slack-current box such that the German characters appear as they should in the aterm terminal window when I ssh in? I suspect it has something to do with getting both boxes to use the same character set - such as UTF - but I don't know how to do that. Can someone point me to a resource where I can get some information on how to do this?
 
Old 07-16-2006, 05:20 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
http://www.tldp.org/HOWTO/German-HOWTO-1.html#ss1.7 ?
 
Old 07-17-2006, 12:38 AM   #3
Daga
Member
 
Registered: Apr 2006
Location: A comfy chair...
Distribution: Slackware
Posts: 111

Rep: Reputation: 15
Instead of changing the locale to de_DE, de_CH, or similar, wouldn't be easier to have him just change his character set for his terminal to ISO-8859-1 (or -15, which has the euro)? It supports all of the western-European languages (and as a result, English also).

hussar: I think you could get away with just modifying /etc/profile.d/lang.[c]sh, which has comments in it also. Unfortunately I don't have aterm on my box to test this with.

Hope it helps
 
Old 07-17-2006, 11:35 AM   #4
hussar
Member
 
Registered: Oct 2003
Location: Heidelberg, Germany
Distribution: Slackware 11.0; Kubuntu 6.06; OpenBSD 4.0; OS X 10.4.10
Posts: 345

Original Poster
Rep: Reputation: 30
I looked at the possibility of changing my main box's language to DE, but it doesn't really make sense to do that since it has an American English keyboard attached. I would probably end up with some problems due to language setting and keymap mismatch. (Having an US English keyborad isn't a problem when using the CLI over ssh, because none of the commands I need - ls, rm, cp, etc. - uses any special characters. The main problem is reading some of the system messages that get sent back.)

Daga, while I was researching this last night, I looked at the /etc/profile.d/lang.[c]sh files, and changed from C and en_US to 8859-15 (Latin9, or 8859-1 with the Euro symbol and some others). I tried changing the settings by issuing the command `. /etc/profile.d/lang.csh` but I got the error message that setenv was not found. It was kind of late though, and rather than fooling with it, I went to bed. I'm going to give it another shot this evening.

Last edited by hussar; 07-17-2006 at 11:38 AM.
 
Old 07-17-2006, 07:51 PM   #5
quiescere
Member
 
Registered: Sep 2003
Distribution: Slackware64 14.2
Posts: 54

Rep: Reputation: 15
Having worked with this quite a bit (it´s a pet obsession of mine), I strongly recommend not going with any of the 8859 sets any more. UTF-8 is the way to go, and I suspect, given the aggressively multinational nature of the Ubuntu family, your kubuntu box is already defaulting to UTF-8. This is probably why you are seeing bad characters: Kubuntu is sending UTF-8 encoding, and you are reading ISO8859-1. For the remainder of this post, I am assuming you are switching your slackware box to UTF-8 and not the kubuntu box to iso8859-*, both because I believe this is the RightThing(TM) for i18n and because I don´t know where kubuntu stores its encoding declarations. I should warn you, though, that to the best of my knowledge aterm is not yet Unicode-savvy. You will probably have to use a different terminal program, which I will come to later.

First, /etc/profile.d/lang.[c]sh should be updated:
lang.sh: export LANG=de_DE.UTF-8
lang.csh: setenv LANG de_DE.UTF-8
replacing de_DE with whatever is appropriate. en_US should work as a fallback, as it will still allow display and input of the full range of non-US characters.

If I understand your post correctly, your slackware box has an English keyboard installed. For that, I editted /etc/X11/xorg.conf to include:
Option "XkbLayout" "en_US.UTF-8"

although you might also try (this latter should work even if you decide to stick with iso8859-* encodings):
Option "XkbLayout" "us"
Option "XkbVariant" "alt-intl"
Option "XkbOptions" "compose:rwin"

Thanks to the xorg list, I recently found out that you will need to edit /etc/profile.d/gtk+2.[c]sh
export GTK_IM_MODULE=xim
and /etc/profile.d/qt.[c]sh as well:
export QT_IM_MODULE=xim

This will give you access to the full range of compose sequences in /usr/X11R6/lib/X11/locale/en_US.UTF-8/Compose

If you´ve chosen to stay with iso8859-1 or -15, then replace en_US.UTF-8 with the ISO encoding in that filename. If it´s in that file, you can type it on the keyboard and that file will tell you how. (By the XkbOptions directive above, "Multi-key" in the Compose file is the right Windows key on the keyboard.)

You will need Unicode fonts. You can get classic X bitmap fonts at Markus Kuhn´s Unicode Fonts and Tools page. Personally, I prefer to use TrueType/OpenType fonts. Search for FontPath in /etc/X11/xorg.conf and add the following line:
FontPath "/usr/X11R6/lib/X11/fonts/TTF/"
if it´s not already there, and dump truetype unicode fonts there. Personally, I like the Gentium family. If you choose to do so (though it violates Microsoft´s license) you can add their core fonts for the web (Verdana, Georgia, Tahoma, Arial, etc.). Many, many more unicode fonts are available at http://www.slovo.info/unifonts.htm and http://www.alanwood.net/unicode/fonts.html. Don´t forget, as I did, to tell your terminal program to use the new fonts.

Speaking of the terminal program, aterm is not, to the best of my knowledge Unicode-compliant. You will have to switch: rxvt-unicode, mlterm, Terminal (from os-cillation.com), and gnome-terminal are all compliant, I believe.

Further resources:
http://melkor.dnp.fmph.uniba.sk/~gar...WTO/howto.html
http://eyegene.ophthy.med.umich.edu/unicode/
http://www.jw-stumpel.nl/stestu.html

You may want to go further with converting filenames and text data on native linux filesystems, or on network mounted filesystems. I have not found this necessary, but if you choose to do so see
http://hektor.umcs.lublin.pl/~mikosm...x-unicode.html

Hope this is helpful, and good luck.
 
Old 07-18-2006, 01:54 PM   #6
hussar
Member
 
Registered: Oct 2003
Location: Heidelberg, Germany
Distribution: Slackware 11.0; Kubuntu 6.06; OpenBSD 4.0; OS X 10.4.10
Posts: 345

Original Poster
Rep: Reputation: 30
quiescere, I am now getting umlauts and German-style quotes in a gnome terminal window, but since I didn´t try it before, I don´t know it that is new or not. I am not getting the special characters in aterm (which you predicted) or rxvt (which according to rxvt -help has multilanguage support compiled in). I have also noticed that if I want to type an apostrophe or double-quote character, I need to hit the key twice.

I need to play with this some more to see what has really changed.

BTW, in the files *.csh ¨export¨ needs to be ¨setenv¨. It does not appear that csh understands ´export´.

Thanks for your help.
 
Old 07-18-2006, 02:49 PM   #7
quiescere
Member
 
Registered: Sep 2003
Distribution: Slackware64 14.2
Posts: 54

Rep: Reputation: 15
Quote:
Originally Posted by hussar
I have also noticed that if I want to type an apostrophe or double-quote character, I need to hit the key twice.
That's because of deadkey composition. Personally, I love it, but if it annoys you, you can add the following to xorg.conf (most likely just uncomment an existing line):
Option "XkbVariant" "nodeadkeys"

With deadkeys, you easily type characters with accents, umlauts, etc. by first typing the accent, then hitting the relevant character. Hitting double-quote then hitting a gives an a with an umlaut, for example.

To get a double-quote by itself, hit the double-quote key then hit the spacebar.

Quote:
Originally Posted by hussar
BTW, in the files *.csh ¨export¨ needs to be ¨setenv¨. It does not appear that csh understands ´export´.
Oops, you're right. I tend to forget as I never use csh.
 
Old 07-18-2006, 03:58 PM   #8
hussar
Member
 
Registered: Oct 2003
Location: Heidelberg, Germany
Distribution: Slackware 11.0; Kubuntu 6.06; OpenBSD 4.0; OS X 10.4.10
Posts: 345

Original Poster
Rep: Reputation: 30
Now that I know what it is, I think it is great! Any idea why I would be getting different results for the key combination double-quote-u and double-quote-o in this firefox editing window than I do in xterm?

I looked through the Compose document, but couldn't find the German double s. Do you happen to know what that combination is?

I also need to figure out which of my keys is the Multi_key. I've tried both Windows keys and both Alt keys, and they give different results.

But, hey, this is great! I didn't realize that getting the terminal sessions to look better would have this great side-effect.
 
Old 07-19-2006, 03:22 AM   #9
quiescere
Member
 
Registered: Sep 2003
Distribution: Slackware64 14.2
Posts: 54

Rep: Reputation: 15
Quote:
Originally Posted by hussar
Now that I know what it is, I think it is great! Any idea why I would be getting different results for the key combination double-quote-u and double-quote-o in this firefox editing window than I do in xterm?
Afraid I have no idea, sorry.
Quote:
Originally Posted by hussar
I looked through the Compose document, but couldn't find the German double s. Do you happen to know what that combination is?
It's <Multi_key> <s> <s>.
Quote:
Originally Posted by hussar
I also need to figure out which of my keys is the Multi_key. I've tried both Windows keys and both Alt keys, and they give different results.
The Multi_key is defined in /etc/X11/Xmodmap. That file uses keycodes to identify keys, and you can get keycodes by using the xev command. If you run xev and then press a key, you can get the keycode. My Windows key is keycode 115, for example. You may have to use trial and error to figure out which key is defined as your Multi_key (or just redefine your Multi_key in Xmodmap). Note that you do not hold down the Multi_key to use the key compositions.
Quote:
Originally Posted by hussar
But, hey, this is great! I didn't realize that getting the terminal sessions to look better would have this great side-effect.
Great! I'm thrilled that this has been useful for you.
 
Old 07-19-2006, 01:04 PM   #10
hussar
Member
 
Registered: Oct 2003
Location: Heidelberg, Germany
Distribution: Slackware 11.0; Kubuntu 6.06; OpenBSD 4.0; OS X 10.4.10
Posts: 345

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by quiescere

It's <Multi_key> <s> <s>.
That confirms that my Multi_key is, in fact, the right Windows key. When I hit it and then <s><s> I get the double s.

Quote:
Originally Posted by quiescere

The Multi_key is defined in /etc/X11/Xmodmap. That file uses keycodes to identify keys, and you can get keycodes by using the xev command. If you run xev and then press a key, you can get the keycode.
Apparently, I don't have an Xmodmap. I did `locate Xmodmap` and came up with one in an archive from an old, dead SuSE system I had and a README.Xmodmap file under /etc/X11/xinit/. I may have to hand-roll one.

I thought I would use showkey to figure out what the key numbers were, but I have just discovered that showkey doesn't want to work in a terminal window while X is running and that the numbers are different when I am in a non-X console or an X terminal window. I tried xev as you suggested though, and it works pretty well. My right Windows key is 116; the left is 115.
 
  


Reply

Tags
fonts, unicode, utf8


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[priv] in SSH Sessions stefaandk Linux - Security 2 09-22-2006 12:05 PM
SSH help, concerning sessions frokid879 Linux - Newbie 4 11-11-2005 11:22 AM
Multilingual + Asian Language Support IamDaniel Slackware 4 07-06-2005 07:08 PM
multilingual keyboard input support? bobbens Linux - Software 2 10-26-2004 01:07 PM
multilingual input support in open office bobbens Linux - Newbie 0 10-25-2004 09:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration