Ethiopian Setup

From OLPC
Revision as of 16:02, 16 February 2008 by Openspark (talk | contribs)
Jump to navigation Jump to search

Short version for seasoned Linux users

Development is being tracked here: http://www.codewiz.org/wiki/EthiopianLocale

  • Set LANG=am_ET.UTF-8 in /home/olpc/.i18n
  • Set XKB_LAYOUT="us(olpc2),et" in /etc/sysconfig/keyboard.
  • Reboot or restart X

You can change the keyboard settings on the fly by typing:

setxkbmap -model olpc 'us(olpc2),et'

  • You can switch between IM in the Write activity through the RMB context menu (no you can't, as the RMB context menu is disabled these days - uwog), although the Amharic IM only appears to work the the "us" XKB keyboard layout.
  • You can toggle between the us and the et layouts by hitting the group switch key, which is mapped to the rightmost key below enter (labeled multiply/divide on US keyboards). (This doesn't appear to work in build 653 -openspark)


Detailed instructions for the rest of us

Your XO laptop is all ready to accept input from an Ethiopian keyboard and to display that input in Ge'ez characters. To make this happen, you need to edit two files, one to choose the keyboard layout and one to choose the fonts that will be used to display your input:

  • Display: /home/olpc/.i18n
  • Layout: /etc/sysconfig/keyboard

To edit these files, you will need to talk directly to the Linux operating system. The steps for doing this are detailed below.

Open the Console

You can bring up a virtual console by pressing ctrl-alt-F1 or ctrl-alt-F2. F1 is the Neighborhood key (a circle of 8 dots, third from the left in the top row). F2 is the Group key (a triangle of three dots, fourth from the left in the top row).

This virtual console will always use the US-English keyboard for input, regardless of the keyboard and display settings used for other activities. (The Terminal activity will display Ethiopian Ge'ez characters once you have executed the following steps, so you must use the ctrl-F1 or -F2 virtual console to revert your XO laptop to US-English).

Log in as user "root"

When you press ctrl-alt-F1, the screen will appear black with (tiny) white writing. At the end, you will see something like:

 xo-11-0C-92 login: _

(The _ indicates a flashing cursor). Type "root" (without the quote marks). The last two lines of text should now look like this:

 xo-11-0C-92 login: root
 -bash-3.2# _

You are now in what is called a "shell". Anything you type now is taken very seriously by the computer. If you manage to type the wrong instructions, you can wreak all sorts of havoc. Please keep your hands inside the vehicle.

Note: If you have set a root password, you will be asked to enter this before the # prompt appears. I'm assuming that, if you are reading this, you have not set a password for root.

Open a text editor

Type:

 nano /home/olpc/.i18n

Your input so far should look like this:

 xo-11-0C-92 login: root
 -bash-3.2# nano /home/olpc/.i18n

Now press the Enter key. The command "nano" opens a text editor. The string "/home/olpc/.i18n" tells nano which file to open. The lines of white text that you saw earlier will be replaced by an almost completely black screen. At the top, you will see a white bar saying:

 GNU nano 2.0.3       File: /home/olpc/.i18n

At the bottom, you will see a set of keyboard shortcuts, such as ^O WriteOut and ^X Exit. The ^ character means "Press the ctrl key then press ..." So ^X means: press ctrl-X.

Close the text editor

You haven't made any changes yet, but let's just play safe. Try pressing ^X now. The # prompt will reappear:

 -bash-3.2# _

This indicates that you have stopped using the nano editor and have returned to the shell. The shell stores your recently executed commands, so that you don't have to retype them. Press the "pg up" up arrow key (second from the right in the second row of your keyboard, just under the Enter key). You should now see your last command:

 -bash-3.2# nano /home/olpc/.i18n

Press the Enter key. The nano interface returns. This time, we're going to edit the .i18n file.

Edit the file

Under the white bar at the top, you will see something like:

 LANG=""

A blinking cursor will appear like an underline beneath the L. Use the arrow keys to displace this cursor. Place the cursor to the right of where you want to insert or erase text. For instance, if you press the "end ->" arrow (bottom right key) seven times, the display will look like this:

 LANG=""_

Now press the Erase key twice:

 LANG=_

Type "am_ET.UTF-8" (with or without the quote marks, as you wish). The text should now look like this:

 LANG=am_ET.UTF-8

The "am" stands for "Amharic"; "ET" stands for "Ethiopia"; "UTF-8" is a standard which tells the computer how to convert the 0s and 1s that it understands into characters that humans understand. Basically, this line is telling the computer: "Please understand that when I type, I want to see the characters used for the Amharic language as it is used in Ethiopia"

Save your changes

Enter ^X. This tells nano that you want to exit the application. In a white line just above the bottom of the screen, nano replies:

 Save modified buffer (ANSWERING "No" WILL DESTROY THE CHANGES) ? _

If you not type the letter n (you won't get type to type the whole word "no"), nano will exit without saving your changes. If you type "y" (without the quote marks), the changes will be saved before nano exits. Type y now. In the white bar, nano replies:

 File Name to Write: /home/olpc/.i18n_

Press Enter. This will make nano overwrite the contents of the existing /home/olpc/.i18n file, then exit. You are back in the shell:

 -bash-3.2# _

Change the keyboard file

Now type...

 nano /etc/sysconfig/keyboard

... and press Enter. This file has four lines.

 KEYTABLE="us"
 XKB_MODEL="olpc"
 XKB_LAYOUT="us"
 XKB_VARIANT="olpc"

You are going to change the third line. Change this to:

 KEYTABLE="us"
 XKB_MODEL="olpc"
 XKB_LAYOUT="us(olpc2),et"
 XKB_VARIANT="olpc"

Press ^X, type "y", then press Enter.

Quit the shell

Type "exit", then press Enter:

 -bash-3.2# exit
 logout
 
 <stuff you can ignore>
 
 xo-11-0C-92 login: _

Return to the Sugar interface

To return to the familiar Sugar interface, press ctrl-alt-F3. F3 is the Home key (a circle with a dot in the center, fifth from the left in the top row of the keyboard).

Reboot the laptop

Before you can see the effect of the changes you have made, you will need to reboot your laptop. Press ctrl-alt-erase. The virtual Console will appear for a moment, then the screen will go gray for a while, then you'll find yourself back at the Home screen.

Write in Amharic

Select the Write activity. To see the Ge'ez characters better, set the font size to (say) 72. Click on the button marked (12 <down arrow>), and choose 72 in the popup menu.

Now try typing the girl's name "Mame" (maa-meh).

Type "m": a character like spectacles on a stick appears. Type "e": the "leg" of the spectacles changes sides. Ge'ez characters are in fact syllables. The first character was "m" on its own. You now have the character "ma". Type "m" again, then "e". The "me" character has no "legs".

Congratulations! You've written your first Amharic word.