Playing around with the OLPC / XO

My family recently came to Japan to meet my wife and her family, and my dad gave me a great toy: an OLPC / XO laptop that he got through the Give one Get One program.

I’m excited about the XO project because I think it is a good project: essentially bringing laptops (or ebooks, primarily) to children around the world to help improve education. I think that is a nice goal to concentrate on. There are lots of interesting very small laptops available now, primarily the Asus Eee PC laptop, but I really like the OLPC because it has some very interesting hardware. I actually think the EeePC has better hardware for more traditional laptop use – particularly the keyboard is easier for me to type on, and the machines have better specs – but the OLPC has an amazingly interesting display, and I really like the sturdy build of the hardware.

The most interesting thing about the display is that if you bring down the backlight on the display it has a really great, 200dpi black and white reflective display that is readable in sunlight. You just can’t get that one a normal laptop. I also like how the color works (just turn on the backlight) and you get color, albeit at a lower apparent resolution. This reminds me of the Apple //e that I grew up using. I want to play with some of the drawing programs to see if by placing individual dots you can change the color like in the old double hires Apple //e display.

The next two sections talk about getting Japanese support working under the Sugar interface that ships on the OLPC by default, and installing XFCE as an alternative to Sugar that makes the laptop seem like a more traditional linux desktop.

The way I have mostly using the OLPC though is with an install of Xubuntu on an SD card, which is the second main section of this post. The remainder of this post is mostly raw notes about the install process, and probably very boring unless you are into this kind of stuff.

You might be more interested in reading about using FBReader to read ebooks on the OLPC, or using Anki to study Japanese. If this looks interesting, click the “read more” link.


Installing Japanese Input Support

The first thing I wanted to do was see if I could get Japanese input working. That turned out to be pretty easy: following these instructions and Japanese input worked without and trouble.

Input did not survive a reboot though. According to this page on SCIM-anthy, SCIM only supports en_US.UTF-8 LC_CTYPE setting by default. I added /SupportedUnicodeLocales = en_US.UTF-8,ja_JP.UTF-8 so that maybe SCIM would pop up in Japanese after a reboot. By the way, it looks like your locale setting is stored in /home/olpc/.i18l.

I also added scim-input-pad and scim-tomoe.
scim-tomoe allows you to draw Kanji on a pad to input the character in case you don’t know the reading.

This topic tells you how to disable some global Sugar keybindings, like Control-O or Control-S that make working in emacs difficult. Bill Clementson has a post on working with Emacs on the XO that is also useful.

Installing XFCE

I followed these directions to install XFCE, but also checked out the more complete directions.

I followed the directions to install Firefox, and also the xbindkeys / olpc-keybind package to allow for the special olpc controls.

I don’t know why but when I boot the machine after setting up XFCE as the default environment I need to boot twice: the boot process gets stuck after the animated XO logo. Holding down the power key until it shuts off, and then restarting has worked every time though (very, very strangely.)

I have not been able to get SCIM-anthy to start up by default. If I boot up the text editor, there is a right-menu “Input Methods” selection that will let me select “X Input Method” (instead of Default) and then SCIM-anthy pops up.

According to this page on getting SCIM-anthy working on various Unix flavors I should put


export XMODIFIERS='@im=SCIM'
export GTK_IM_MODULE="scim"
export QT_IM_MODULE="scim"
export LC_CTYPE=ja_JP.utf8
scim -d

into my .bash_profile. Right now I have some of those in .xsession. I thought maybe I had a problem because I don’t have QT modules installed. So I did a yum install scim-qtimm. According to I need to add a bunch of stuff to /etc/sysconfig/i18n:


GTK_IM_MODULE=scim
QT_IM_MODULE=scim
XIM_PROGRAM="scim -d"
XMODIFIERS=@im=SCIM

I also checked and it looks like when I do a env | grep IM_MODULE that GTK_IM_MODULE is set to xim: this might be because I’m missing scim-gtk. So I did a yum install scim-gtk

That fixed it! So now XFCE will boot up with Japanese support running. Great!

Installing Ubuntu on the SDHC card

I applied for a developer key as noted on the instructions for how to install Ubuntu using a compressed file method onto a SD card. (Also see this post on a blog.)

Following those directions seemed to work well enough. I had to copy the /boot/olpc.fth script from the forum (modified to boot from the SD card) into the NAND’s /boot/olpc.fth. I also modified the /etc/fstab on the CD card to mount the SD card and internal NAND.

The problem is that after I switched out the boot script, I get the following error:

Boot device: /sd/disk:\boot\vmlinuz Arguments: ro root=/dev/mmcblk0p1 rootdelay=1 console=ttyS0,115200 console=tty0 fbcon=font:SUN12x22
SDHCI: Card didn't power up after 1 second
Can't open boot devive

That wasn’t the right thing to do though because by default the OLPC will look for a olpc.fth on the USB stick port, the SD card port, and then the NAND port, so I restored the original file that was there. It was really hard to boot into the laptop again because I had to issue the commands at the open firmware prompt to set everything up myself:


setenv boot-file ro root=mtd0 console=ttyS0,115200 console=tty0 fbcon=font:SUN12x22
setenv boot-device nand:\boot\vmlinuz
setenv ramdisk nand:\boot\olpcrd.img

Very annoying because I had to do that twice since my machine is still freezing on the first boor for inexplicable reasons! (The inexplicable reason was the missing unfreeze command to unfreeze the display: the boot was working fine, but didn’t always turn the screen back on so I could see it!)

The boot problem seems to be a known problem that can be fixed by upgrading to a newer firmware. This thread documents problems with booting from SDHC cards. It recommends upgrading to the newest version of the OLPC firmware, q2d16 at the time of this writing.

After upgrading the firmware, the OLPC booted off of the SD card! Unfortunately, it seems to freeze at the “Loading ramdisk image from sd:\boot\olpcrd.img” line. I think the problem is that the /etc/fstab in the flash card had a line split over two lines because I made the file with copy and pasting. Oops! Perhaps also Xbuntu needs the other entries that I commented out in the fstab also.

It looks like other people have had the problem of the boot process freezing at the ramdisk loading stage. Adding the “unfreeze” and “drop” calls let the display show up at boot time!

The mouse is crazy – it will tap click and open like 50 terminals in short order. this post details a way to turn off the tap-click behavior.

The Xubuntu version that loaded up didn’t have a way to change font DPI from the User Interface setting panel as the fedora version has, so I did some searching and tried this approach to set the DPI to 150, which worked well for me before.

Upon reboot the mouse was working (no crazy tap clicking) and the DPI looked good.

Now to get Japanese input working, followed the directions here. I had some trouble with Japanese, because I couldn’t find out where to put the environmental variable settings, and couldn’t get scim -d to start. So I wrote a script (startup) that is:



export XMODIFIERS='@im=SCIM'
export GTK_IM_MODULE="scim"
export QT_IM_MODULE="scim"
export LC_CTYPE=ja_JP.utf8
startxfce4

which works great. I’ll have to look into getting that to start automatically upon boot-up.

I also installed FBreader with synaptic, which works great, but I can’t get it to recognize the face-panel keys. So I have to look into getting the face panel game keys recognized by the Xserver somehow. This thread has information about getting the gamepad directional keys and rotation key recognized by X.

I installed xubuntu-desktop which picks up a whole bunch of stuff (including gdm) and zsafe which is a password manager. Those are useful to have around. After that big install, the nm-applet disappeared and I couldn’t connect to the network. So I did some command line stuff:


$ iwconfig eth3 essid “Disco2007”
$ dhclient eth3

Then I had a problem where HAL wasn’t coming up with the system. What what what? this bug report has information about people whose DBUS isn’t coming up on boot. I put in a symbolic link in /etc/rc2.d/S12dbus ../init.d/dbus since that wasn’t in my install. On reboot HAL came up fine (it had been failing before due to the lack of a DBUS.)

When the UI came up again, there were FOUR instances of nm-applet. That is like, three too many. This thread has information on how to remove extra nm-applet instances. I also had to go into the autostarted applications (Settings / Autostarted applications) and not have it start up “Network Manager” since that is being saved in the session.

Now I need to start working on the keys. See this post about adding XO keys which references this article, but this blog entry gives you all you need to know.

After following the key installation directions, I had trouble with the screen rotation. My problem is that xrandr does not seem to support rotation on my screen. For example, xrandr -o left gives me:

X Erorr of failed request: BadMatch (invalid parameter attributes)
 Major opcode of failed request: 154 (RANDR)
 Minor opcode of failed request: 2 (RRSetScreenConfig)
 Serial number of failed request: 12
 Current serial number in output stream: 12

A sudo rpm -q libXrandr said that it was not installed, but maybe XrandR2 is? I don’t know. I added Option "XRandRRotation" "On" to the Geode device section in xorg.conf and restarted the Xserver. It looks like this is the easiest way to install drivers that support XRandRRotation. That totally worked.

So, to continue with the previous installation.

It looks like ~/.xfce_startup contains a few lines that are called to set up the XFCE environment here, and in fact has xmodmap -e 'keycode 147 = F11' in it already, so I think I want to add other definitions to get the face keys recognized. In particular, here are the codes that my keyboard outputs (with GP_ my prefix for GamePad)



Key Keycode XKeysymToKeycode SuggestedMapping
GP_Up 139 98 KP_Up
GP_Down 210 104 KP_Down
GP_Left 209 100 KP_Left
GP_Right 134 102 KP_Right
GP_Circle 229 circle
GP_Square 231 emopenrectangle
GP_Check 232 checkmark
GP_Cross 230 multiply

The above Up, Down, Left, and Right are already mapped by the screen rotation script to Up, Down, Left, and Right using the ~/.olpckeys file, but I think I want to change them to something else so they don’t duplicate the keyboard arrow key values as they do now.

The above mapping seemed to work flawlessly, so I changed the ~/.olpckeys to pick up the new arrow definitions, and I also added the xmodmap calls to the ~/.xfce_startup script (xmodmap -e ‘Keycode = SuggestedMapping’) for all eight buttons (since the rotate_screen.py script is only called on the rotate button press, not initially.)

I also made a run_anki.sh script that sets up different keybindings for Anki, mapping the buttons to 0-5 for the card scoring, space to show the next card, and also one escape key because sometimes the CTRL or ALT buttons get pressed down mysteriously and pop up a menu, so I need to ESC out of them. The end of the run_anki.sh script sets the keys back to a default (but potentially incorrect for the arrow button orientation) setting.

As long as I’m talking about keys, after two weeks or playing with this setup, I found out that I had a sticking left alt key, something that others have seen before. So I followed the directions on the wiki entry to just remove the ALT key from the xmodmap and replace it with the left hand key (the keycode for my left hand button was 115 instead of 133, but otherwise everything was the same.)

Installing software

I started up Synaptic (had to do it from a terminal as root though – the graphical interface error’d out with a permissions error) and installed lots of software. Notably Emacs, Edict, and GJiten for Japanese dictionary lookup.

xfce4-netload-plugin, xfce4-cpugraph-plugin, xfce4-weather-plugin

Installing FBReader

FBReader is a nice text file / ebook (html, palm format, etc) reader that I have heard good things about. It is included in the Fedora Updates repository, so I was able to install it by getting root access in a terminal, and using:


yum --enablerepo=updates install fbreader


This is the main thread that got me interested in fbreader.


I have been using FBReader on the OLPC now for about two weeks, and I absolutely love it. You can set custom actions for keys, so it was very easy to set the front panel gamepad keys to turn pages. There is a beautiful full screen mode, and when you turn the backlight off the text looks beautiful.

I have been reading mostly in tablet mode. I set up FBReader to use the face controls to turn the pages. I have been using mostly HTML versions of ebooks for reading, and the display is great. If you rotate the screen 90 degrees the controls are at the bottom edge of the tablet, and you can easily hold the OLPC with your left hand through the nice handle. It is a bit hefty, but fairly easy to manage with one hand. I can’t help but think that the Kindle would be lighter and easier for ebook reading, but I just love the versatility of the convertible tablet / laptop OLPC.

FBReader saves where you are at every ten seconds or so. You don’t have to do anything to quit, just close the program down. When you start up again, it loads the book right back to where you were at. If you want to change books, it has a very nice library function that remembers all the books you have loaded into it. It will add books to the library as they are dropped into the ebook directory if they are in a standard ebook XML format, but since all the books I’ve been reading are just big HTML files I have to add them myself.

I have been reading on the train almost exclusively, and even in the crowded morning trains the OLPC is no harder to use than a standard paperback. It is bigger than a paperback, but you don’t have the problem of trying to hold it open, so you can still pretty easily use one had to hold it. You need to use your other hand to turn the page though. It is possible to hold with one hand in such a way that you can use your thumb to hit the gamepad controls also, but it is an awkward grip and I can’t hold it that way for very long.

The display is great, and I haven’t had any trouble with lighting. I’ve read a bit at night, and there the problem is that the lowest setting for the backlight is too bright, but if the backlight is off it is hard to work around the glare from a desk lamp. I ended up using the backlight on the lowest setting and I did get used to it, but it would be nice if there was an even lower setting. Since the kindle uses e-ink it doesn’t have a backlight at all, but I don’t know how it would perform with glare. There is still glass on the screen so I think that might be a bit problematic.

Reading on the OLPC is really nice though. I’ve read books on my Treo 600 and old Handspring Visor, but the larger size of the OLPC is much, much better. The display is also much easier to read. There is no eyestrain at all when the backlight is off. I have really just fallen in love with this thing for reading, and in the time that I’ve had it I have already read three books on it. Now I really wish I could find a store that would sell DRM-free ebooks (see my previous post for good sources of ebooks. My current problem is that I’ve read a few Tor books, but now I can’t buy ebook versions of the sequels!)

Installing Anki

Once I had installed Ubuntu, I did some searching and found that someone had packed up anki, a Japanese vocabulary learning system. It says that I need to add


deb http://fr.archive.ubuntu.com/ubuntu intrepid main universe

to my /etc/apt/sources.list to download the package, so I did.

Anki is an absolutely amazing package for learning Japanese. After checking through the discussion list for Anki, I found another OLPC user who wrote a small script that he calls to start Anki. All it does is re-map some of the face buttons so they can be used in Anki. I wrote about it up in the keybind section.

I’ve been using Anki for the past few weeks, and really like it. It is a great way to learn vocabulary, and there are lots of pre-made decks for it. I haven’t spent much time looking for new decks to study yet, but I’ll probably start looking into that in the next few weeks.


Posted

in

,

by

Tags:

Comments

4 responses to “Playing around with the OLPC / XO”

  1. Miiu Avatar
    Miiu

    I tried as you suggested by using yum etc… I got the following message:
    Public key for fbreader- 0.8.12-1.fc7.i386.rpm is not installed.

    I’m not sure what I did, or did not do, or should do; an advice would be helpful. I am also trying to install mplayer, but am getting a similar message.

    Thanks!

  2. Fugu Avatar

    Hi Miiu,

    the problem with the public key not being installed is an verification issue: the yum system can’t verify that the package you want to install is really from who it declares itself to be from because you don’t have the public key for the repository that you are using installed.

    I can’t really help directly because you should have the public key for Fedora Updates installed by default. Try searching around. Here is one thread with a solution, but it might not help in your care: http://www.linuxquestions.org/questions/fedora-35/public-key-not-installed-468615/

    good luck! I really love FBReader on the OLPC! I haven’t even looked at any pictures or video at all on the OLPC yet since I have so much good reading to get through.

  3. Dov Grobgeld Avatar
    Dov Grobgeld

    I have also been using fbreader on the OLPC, but I recompiled it for the OLPC to use Gtk instead of Qt that is used in the default installation in Fedora. See:

    http://imagic.weizmann.ac.il/~dov/olpc/

    Regards,
    Dov

  4. FuguTabetai Avatar

    Thanks for the link Dov!

Leave a Reply

Your email address will not be published. Required fields are marked *