Ethiopian Setup: Difference between revisions

From OLPC
Jump to navigation Jump to search
No edit summary
(term for filled circle)
 
(23 intermediate revisions by 6 users not shown)
Line 1: Line 1:
'''Short version for seasoned Linux users'''

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


* See [[Checking the Layout configuration]] for instructions on how to set your locale and keyboard.
* Update your OS image if it's older than <strong>612</strong>


* Set <tt>LANG=am_ET.UTF-8</tt> in <tt>/home/olpc/.i18n</tt>
* Boot, switch to the console (<code>alt-F1</code>) and login as root.


* Set <tt>XKB_LAYOUT="us(olpc2),et"</tt> in <tt>/etc/sysconfig/keyboard</tt>.
* Edit <code>/etc/rpm/macros.pilgrim</code> and add <code>am_ET</code> to the list of <code>%_install_langs</code>.


* Reboot or restart X
* Add the olpc-bernie yum repository:


You can change the keyboard settings on the fly by typing:
cd /etc/yum.repos.d
wget http://www.codewiz.org/pub/olpc-bernie/olpc-bernie.repo


setxkbmap -model olpc 'us(olpc2),et'
* Install a few updates from olpc-bernie:


(This doesn't work for me in build 653. I get: Cannot open display "Default display". -openspark)
yum update libX11


* For glibc, yum will not work because we install the <code>i686</code> package even though <code>uname -m</code> says <code>i586</code>. Additionally, a glibc utility ran by the post install scriptlet breaks on JFFS2 because it depends on an unsupported filesystem feature. So we need to play a few dirty tricks around the package installation:


----
cd /
wget http://www.codewiz.org/pub/olpc-bernie/i386/os/glibc-2.6.90-17.i686.rpm
wget http://www.codewiz.org/pub/olpc-bernie/i386/os/glibc-common-2.6.90-17.i386.rpm
mount -t ramfs none /usr/lib/locale
rpm -U --ignorearch glibc-2.6.90-17.i686.rpm glibc-common-2.6.90-13.i386.rpm
mv /usr/lib/locale/locale-archive /
umount /usr/lib/locale
mv /locale-archive /usr/lib/locale


* 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.
* Set the LANG environment variable in <code>/etc/sysconfig/i18n</code>


* You can toggle between the <code>us</code> and the <code>et</code> layouts by hitting the <code>group switch</code> key, which is mapped to the rightmost key below <code>enter</code> (labeled <code>multiply/divide</code> on US keyboards). (This doesn't appear to work in build 653 -openspark)
LANG=am_ET.UTF-8


* To use the XKB Ethiopian layout along with US layout, you need to edit /etc/X11/xorg.conf. This will make "us" the first and "et" a second layout:


XkbLayout "us,et"
XkbVariant "olpc2,basic"


'''Detailed instructions for the rest of us'''
Alternatively, you can do that on the fly by opening the developer console (<code>Alt-=</code>) and type:


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:
setxkbmap -model olpc 'us(olpc2),et'


* Display: <tt>/home/olpc/.i18n</tt>
----
* Layout: <tt>/etc/sysconfig/keyboard</tt>


To edit these files, you will need to talk directly to the Linux operating system. The steps for doing this are detailed below.
* You can switch between IM in the Write activity through the RMB context menu, although the Amharic IM only appears to work the the "us" XKB keyboard layout.



* You can toggle between the <code>us</code> and the <code>et</code> layouts by hitting the <code>group switch</code> key, which is mapped to the rightmost key below <code>enter</code> (labeled <code>multiply/divide</code> on US keyboards).
''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 disc 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 _ character 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 disc 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.


''Restore the US-English keyboard and display''

To restore your original keyboard and display:

Press ctrl-alt-F1 to enter the virtual console

Type "root" (without the quotes) to log in to the shell as "root"

Use the up and down arrow keys to scroll through the commands that you used during your last session.

Locate the nano commands for the .i18n and keyboard files, and press Enter to edit the files.

Restore the files to their original state, as follows:


/home/olpc/.i18n
LANG=""

/etc/sysconfig/keyboard
KEYTABLE="us"
XKB_MODEL="olpc"
XKB_LAYOUT="us"
XKB_VARIANT="olpc"

Use ^X, y then Enter to save your changes and exit nano.

Type "exit" to exit the shell.

Press ctrl-alt-F3 to return to the Sugar graphic interface.

Press ctrl-alt-erase to reboot your XO.


== Notes on typing ==

The Amharic keyboard is phonetic. It expects two inputs for each syllable: one consonant and one vowel.

There are six vowels in Amharic. On the current OLPC keyboard layout, these are mapped to the five English vowels: a e i o u ee (press "e" twice). You may be used to a keyboard which uses "y" where the OLPC keyboard uses "ee".

In English, "y" can be either a vowel (whY) or a consonant (Yak). In Amharic, the vowel and the consonant are two separate characters. You may be used to a keyboard which requires you to press the Shift key to get the Amharic Y consonant, and which gives you the Amharic y vowel if you don't press Shift. The OLPC keyboard gives you a Y consonant when you press the "y" key, regardless of whether you press Shift or not.

Traditionally, spaces between words are marked with a colon-type character, and a full stop is four dots. A:traditional:Amharic:sentence:looks:like:this:: Nowadays, spaces are used to separate words. To get the four-dot full-stop, press Shift-colon twice.


== Bugs ==

In Write:

1) Type "me<space>": you get two "m" characters and a space

2) Type "jee" (to get the "jy" syllable): you get two characters - "je""jy"

In any activity that accepts keyboard input (Write, Pippy, Terminal, ...):

3) Type Shift-S. This should bring up a rounded w character, as shown on the S key here:

[[Image:Ethiopic-B3.png|800px|none|Ethiopic keyboard]]

In fact, typing Shift-S shows the "tse" character, which appears on the [ key in the image above. To get the Shift-S character you need to press (lowercase) s twice. (In fact, the character shown on the S key is "Se", which requires you to type "sse").

4) Typing [ outputs [, not the promised "tse" character.


----


[[Category:HowTo]]
[[Category:HowTo]]
[[Category:Language support]]
[[Category:Language support]]
[[Category:OLPC Ethiopia]]

Latest revision as of 13:38, 22 September 2011

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'

(This doesn't work for me in build 653. I get: Cannot open display "Default display". -openspark)



  • 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 disc 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 _ character 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 disc 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.


Restore the US-English keyboard and display

To restore your original keyboard and display:

Press ctrl-alt-F1 to enter the virtual console

Type "root" (without the quotes) to log in to the shell as "root"

Use the up and down arrow keys to scroll through the commands that you used during your last session.

Locate the nano commands for the .i18n and keyboard files, and press Enter to edit the files.

Restore the files to their original state, as follows:


/home/olpc/.i18n

 LANG=""

/etc/sysconfig/keyboard

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

Use ^X, y then Enter to save your changes and exit nano.

Type "exit" to exit the shell.

Press ctrl-alt-F3 to return to the Sugar graphic interface.

Press ctrl-alt-erase to reboot your XO.


Notes on typing

The Amharic keyboard is phonetic. It expects two inputs for each syllable: one consonant and one vowel.

There are six vowels in Amharic. On the current OLPC keyboard layout, these are mapped to the five English vowels: a e i o u ee (press "e" twice). You may be used to a keyboard which uses "y" where the OLPC keyboard uses "ee".

In English, "y" can be either a vowel (whY) or a consonant (Yak). In Amharic, the vowel and the consonant are two separate characters. You may be used to a keyboard which requires you to press the Shift key to get the Amharic Y consonant, and which gives you the Amharic y vowel if you don't press Shift. The OLPC keyboard gives you a Y consonant when you press the "y" key, regardless of whether you press Shift or not.

Traditionally, spaces between words are marked with a colon-type character, and a full stop is four dots. A:traditional:Amharic:sentence:looks:like:this:: Nowadays, spaces are used to separate words. To get the four-dot full-stop, press Shift-colon twice.


Bugs

In Write:

1) Type "me<space>": you get two "m" characters and a space

2) Type "jee" (to get the "jy" syllable): you get two characters - "je""jy"

In any activity that accepts keyboard input (Write, Pippy, Terminal, ...):

3) Type Shift-S. This should bring up a rounded w character, as shown on the S key here:

Ethiopic keyboard

In fact, typing Shift-S shows the "tse" character, which appears on the [ key in the image above. To get the Shift-S character you need to press (lowercase) s twice. (In fact, the character shown on the S key is "Se", which requires you to type "sse").

4) Typing [ outputs [, not the promised "tse" character.