Why of this document?
This document was created to solve the trouble caused to users when they tried to type greek characters inside the X enviroinment. This document is mainly directed to greek users who would like to be able to type correctly greek characters in their favorite applications.
2. System Configuration
Keyboard Configuration on X
The first thing we need to do is to configure the X server in order to set the appropiate keyboard layout. We will use a dual layout, as it is necessary to have a latin-character layout in order to be able to interact correctly with the system. So we edit /etc/X11/XF86Config and we set up they keyboard as shown bellow.
Code listing 2.1: Keyboard Layout Configuration in /etc/X11/XF86Config
Code: Select all
Section "InputDevice"
Identifier "Keyboard"
Driver "Keyboard"
Option "AutoRepeat" "500 30"
Option "XkbRules" "xfree86"
Option "XkbModel" "pc104"
Option "XkbLayout" "us,el"
Option "XkbOptions" "grp:alt_shift_toggle"
EndSectionImportant: Beware that the options you have to add/chage are the two last: XkbLayout and XkbOptions. The rest must be configured to match your system. Also note that we used here Option "XkbLayout" "us,el", but sure you can use any possible keyboard layout combination.
Note: The option Option "XkbOptions" "grp:alt_shift_toggle" will allow you to switch keyboard layout inside X by just pressing the following key combination: ALT + SHIFT.
X Font Configuration
We don't have to worry about fonts, as Gentoo itself has already installed the appropiate True Type Fonts to type in Greek. We'll just have to keep in mind that we'll have to choose them when we get into X if we want to write in Greek correctly. There are some fonts that do not support Greek by default.
System Variable Exportation
If we have arrived to this point, it means that the greek keyboard layout is working... but not totally correct. You might write in Greek, but you'll notice you are unable to type accented greek vowels. Our next step will ensure that we will be able to type accents on vowels. To do that, we have to set two variables in our profile. In this example, the variables are set system-wide for all users.
Code listing 2.2: Adding system-wide variables in /etc/profile
Code: Select all
export LC_CTYPE=el_GR
export LC_COLLATE=el_GRAfter this is done, we just have to issue the following command in order to have the system updated. Elsewhere we would have to reboot the system for the changes to take effect.
Code listing 2.3: Updating the system settings
Code: Select all
$ source /etc/profile--------------------------------------------------------------------------------
Updated November 10, 2003
--------------------------------------------------------------------------------
Ioannis Aslanidis
Author
Arkalis Evangelos
Contributor
Theofilos Intzoglou
Contributor
--------------------------------------------------------------------------------


