Greek Support in the Debian Console
Posted by sonic2000gr on Mon 25 Sep 2006 at 06:20
This article is primarily focussed on the Greek users of Debian out there, and I hope there are quite a few of us! I am using Debian as a server myself and it is quite important to be able to at least show the full greek character set in the console, as some of my files may have greek filenames. Typing Greek in the console is of less importance, although this article covers it as well.
Greek support is very easy to install in the GNOME and KDE desktop environments, although a graphical environment is usually not installed on servers. Thus this article deals with the command line only.Installing locales
First make sure you have the locales package installed. As root issue the command:
apt-get install locales
This will install the package - if it was not already installed. Again as root, execute:
This command will allow you to select locale. In the dialog that follows you can select as many locales as you wish. In our case you need to at least select:
Changes to other files
As root edit the file
/etc/inputrcand make sure the following lines appear (edit or add as necessary):
set meta-flag on set output-meta on set convert-meta offAlso edit the file
/etc/console-tools/configand edit or add the following lines (you will need to uncomment some of them):
At the end of the file, you will see some lines with APP_CHARSET_MAP. Change them to look like the ones below:
APP_CHARSET_MAP=iso07 APP_CHARSET_MAP_vc1=iso07 APP_CHARSET_MAP_vc2=iso07 APP_CHARSET_MAP_vc3=iso07 APP_CHARSET_MAP_vc4=iso07 APP_CHARSET_MAP_vc5=iso07 APP_CHARSET_MAP_vc6=iso07(Note: vc1 to vc6 are for virtual consoles)
Loading the greek keyboard mapping
Can be easily performed by the following command:
loadkeys /usr/share/keymaps/i386/qwerty/gr-utf8.kmap.gzHowever, since you will obviously need to load this at every startup, it would be nice to add it to a startup script somewhere. I have added a line to the
/etc/init.d/console-screen.shscript that deals with this matter anyways:
. . . loadkeys /usr/share/keymaps/i386/qwerty/gr-utf8.kmap.gz } case "$1" in start|reload|restart|force-reload) . . .
Possibly modify the users' .bashrc
Include the following lines at your .bashrc file:
export LC_CTYPE="el_GR.UTF-8" export LC_MESSAGES="en_US.UTF-8"
If you would like the system messages to be in greek, the second line should read:
Greek / Latin mappings can be toggled by pressing the ALT+SHIFT keys (like windows). If you use Putty to connect through, then use CTRL+SHIFT.
Bugs / Limitations
You can view accented characters but not type them! This is not very important, unless you would really like to do greek file editing in the console. Accented characters can by typed normally through Putty which is even more puzzling...