20080203

Asus EEE PC localisation (Stock Xandros)

After playing around with the EEE PC I started installing other distributions on it, and you know what? It's fun!
The stock Xandros is nice for it's quick booting time, but it lacks some things. The worst is the lack of national keyboard support. Even on the units sold in Slovenia (don't know for Italy & Germany) there is no support for the hardware keyboard.
My father decided to get one as he saw mine and asked me to prepare it for his work so the main things were:
  • national keyboard support (si, it, de)
  • spell checking for the same languages in OpenOffice and if possible in Firefox/Thunderbird
  • change the language of the programs to German as he is much more fluent in German than in English which is the default on the EEE
btw shame on Asus for not updating the choice of the keyboard in the stock OS.

To get support for the keyboard the easiest thing was to copy the xmodmap definitions from Ubuntu so I just connected the EEE PC to the home network and copied from my desktop the needed files with scp.
So I opened a Terminal CTRL+ALT+T and created as root a directory for the definitions
sudo mkdir /usr/share/xmodmap

copy over the files
sudo scp user@b100w11-desktop:/usr/share/xmodmap/xmodmap.si /usr/share/xmodmap/

you can now enable the Slovenian keyboard with xmodmap /usr/share/xmodmap/xmodmap.si

or the German, provided you have copied also the xmodmap.de etc.

Usable, but not really useful. I wanted a keyboard shortcut for it. So I created the directory bin in the user home directory and wrote a little script named si

nano ~/bin/si

in which I have put

#!/bin/bash
xmodmap /usr/share/xmodmap/xmodmap.si

and two others for de and it, named respectively de and it ;)
After making the three files executable with
chmod 0755 ~/bin/*
The next step was defining a keyboard shortcut.
It was just a matter of copying over the icevm keys template and adding a few lines to it

mkdir ~/.icewm
cp /etc/X11/icewm/keys /home/user/.icewm/keys
nano ~/.icewm/keys

and add those lines to the end

key "Alt+Ctrl+s" /home/user/bin/si
key "Alt+Ctrl+d" /home/user/bin/de
key "Alt+Ctrl+i" /home/user/bin/it

it was almost working, there was just a little annoyance... When the computer started it still had the default US/International keyboard. The fix was letting it execute the si script on startup. But that proved to be more complex as I first thought.

I created a file named startup in ~/.icevm but it didn't get executed until I found out that I had to change the startup script that was calling up the GUI.
Goggling for it I found that the procedure to let the startup script execute was to:

sudo cp /usr/bin/startsimple.sh /usr/bin/startsimple.sh.ori
sudo nano
/usr/bin/startsimple.sh

find the line /opt/xandros/AsusLauncher & and insert above it the following lines:

if [ -x /home/user/.icewm/startup ]; then
#we have a start up file to execute
/home/user/.icewm/startup &
fi

the script was to be made executable with

chmod 0755 ~/.icewm/startup

the script again consisted of two lines

#!/bin/bash
~/bin/si

So the pieces are now together and the only thing that lacks is a visual feedback of the keyboard that is in use, but In my opinion that is not really so important.

For the German language in the programs the main thing was to generate new locales by editing the file /etc/locale.gen and adding the lines for the wanted locales

de_DE.UTF8 UTF-8
sl_SI.UTF8 UTF-8
it_IT.UTF8 UTF-8


and running sudo locale-gen

After a reboot the German translations of some programs already showed up, while for the others there was still a little work to do. I found the instructions and the hints on the excellent EEE User pages.






No comments: