Linux, Writing and Reading Greek and Having an English Language Desktop (RedHat 9 / Gnome 2.2 Edition)

or how to have Gnome 2.2 under RedHat 9 read and write Greek, while keeping an English - language desktop

or how to make Linux behave as Windows did years ago (and requiring only a few clicks to do it!) :-)

DISCLAIMER: These are the instructions that worked for me, running Gnome 2.2 under RedHat 9. Your mileage may vary. This is an updated version of a previous document I've written, describing the procedure on getting the same result on RedHat 7.3 (Gnome 1.x). If you're running an old distribution, you might get more luck there.

These documents have been compiled from various sources on the Internet as well as from a lot of trial and error. Hopefully this will be useful to you.
These instructions will allow you to have an english-language desktop (Gnome 2.2 in my case) and be able to read and write greek. I am able to switch from a british layout qwerty keyboard (my personal favourite) to a greek one and back. These instructions worked on my RedHat 9 system running XFree86-4.3.

Installing Greek Fonts

We'll be using fontconfig for the installation.

The version of FontConfig installed by default on RedHat 9 has a bug and cannot see some fontsets. Install a new version from fontconfig.org or just use the RPMS I'm providing of version 2.2 here.

Download a few Greek fonts (like Microsoft's truetype fonts, available here. For a multi-user installation, create a directory, preferably under /usr/share/fonts and put the fonts there. Then run fc-cache <directrory>. For a single user installation, create a directory called ~/.fonts and put the fonts there.

Changing the system settings

For a multi-user setup, edit /etc/sysconfig/i18n. add to the SUPORTED= line the keywords :el_GR.UTF-8:el_GR:el. Also, add the a line LC_CTYPE="el_GR". My /etc/sysconfig/i18n reads:
    LANG="en_GB.UTF-8"
    SUPPORTED="en_GB.UTF-8:en_GB:en:en_US.UTF-8:en_US:en:fr_FR.UTF-8:fr_FR:fr:de_DE.UTF-8:de_DE:de:el_GR.UTF-8:el_GR:el"
    SYSFONT="latarcyrheb-sun16"
    LC_CTYPE="el_GR"
    
Note that this also supports German and French and uses British English as default. But you get an idea. For a single user installation, you need to set those variables at ~/.bash_profile if you're running bash or at your shell's configuration file.

Changing the XFree86 Settings

Go to the keyboard InputDevice section at /etc/X11/XF86Config. Add to the XkbLayout option ",el" (that mean's that you'll get Greek as the second keyboard layout). Add an option called XkbOptions and add grp:ctrl_shift_toggle. That allows you to change layouts using ctrl+shift. You can use other toggles, such as grp:alt_shift_toggle as well. Here's how my keyboard section looks:
     Section "InputDevice"
             Identifier  "Keyboard0"
             Driver      "keyboard"
             Option      "XkbRules" "xfree86"
             Option      "XkbModel" "pc105"
             Option      "XkbLayout" "gb,el"
             Option      "XkbOptions" "grp:ctrl_shift_toggle"
     EndSection
    
This allows me to switch from a british layout keyboard to greek and back. Change gb to us if you have a US one.

Setting up gtk

And last (this is the Gnome Specific bit), you need to change the GTK input mode to the X input mode. This allows you to use accents in Greek. I believe this is because of a bug. Add export GTK_IM_MODULE=xim to /etc/profile for a multi-user installation using bash, or to you shell's configuration file alternatively. For a single-user installation, add it to ~/.bash_profile (or to your shell's configuration file again).

gtk-1.x applications

You'll find some instructions here. Basically, you need to force them to use a greek font. If you still have problems, create a file called ~/.gtkrc_mine and add the following to it:
    style "user-font"
    {
    fontset="-misc-fixed-medium-r-semicondensed-*-13-*-*-*-c-*-iso8559-7"
    }
    widget_class "*" style "user-font"
    
Any greek font will do, not just fixed, which I used in this example.

That's it! Hope it works for you! Remember to restart XFree86...
s.zachariadis@cs.ucl.ac.uk
Last modified: Wed Jan 5 03:55:17 EET 2005