Getting a Sugarized FBReader to Run on OLPC XO

Kids and the XO

OLPC XOs are interesting devices. There are some neat aspects to them but there are also some glaring issues. One issue we found in working with them and trying to make them useful for a trip to Senegal was the real lack of a good book reading application (‘Activity’ in OLPC-speak). After a lot of investigation and trial and error installs, I was able to get something working and wanted to share for any of you who also find this as a need. Another wrinkle was to do this all without the need for internet access so I really was focused on using a USB stick for all the installs.

1. Download the latest stable version of the OS from laptop.org. It will be a .img file and a fs.zip signature file. Get a USB stick of 1 or 2 gigs in size and put them on the root of that FAT formatted flash drive. When booting from a cold start, press all the ‘game’ keys right above the power button until you get a prompt to release them. This will start the flashing update of the internal storage. More info on how to do this here at the laptop.org wiki. When I was working on this, I was working with build 767-4.

2. Download the latest build of Sayamindu’s FBReader that he sugarized. This man should get a medal. His page on laptop.org provides all the links. When I was working on this I was using FBReader-4.xo.Using a sugarized version of FBReader is HUGE because it maps the file extensions for .epub, etc. and creates an activity in the Activities screen. You can install fbreader via terminal on the Fedora-based OLPC, but you do not get the goodies of sharing and easy application/document opening without this.

Thank you Sayamindu!!!!!!

3. Put the FBReader-4.xo (in my case) on the USB stick from a PC or Mac computer then plug it into the OLPC. The path for the USB stick will be

‘/media/<whateveryounamedtheusbstick>’

Mine usb flash is named USB for simplicity sake, so the path to the FBReader-4.xo install bundle is

/media/USB/FBReader-4.xo

Here is a screenshot of my df -h

terminal-usb-path

4. Go to the Terminal activity on the OLPC XO and type the following to install the bundle via sudo

sudo sugar-install-bundle /media/USB/FBReader-4.xo

sugar-install-bundle-from-usb1

This will kick-off the install.

5. Issue a reboot at the Terminal via

sudo reboot

reboot-after-install

This will restart the XO. When you come back on, you will have a square activity in the circle that is the FBReader.

fbreaderactivity

6. FBReader is then installed but you need to be able to dish books its way now. One way to do this is just to get online now via the Browse Activity and download .epub books. When you download them, the Browse Activity (Firefox-based web browser) will put them into the ‘Journal’ Activity from which you can double-click or ‘Start’ the files. Any .epub files you download that way will open in FBReader now.

7. The additional challenge on this project was to include books locally stored on the XO itself. The sugarized version of FBReader does not have an ‘Open File’ dialogue, so you really need to get local books into the Journal easily and once inside the Journal Activity, you can trigger a launch of the FBReader installed in step 4.

8. I created a directory on the usb drive while it was connected to my Mac/PC and put some epub books in that directory. The directory named ‘livres’ (your name is your choice of course) is on the root directory of the USB stick so I just copied it to the XO storage via Terminal.

9. In a fresh Terminal Activity, do a

cp -pr /media/USB/livres .

This will move the directory to the local storage on the XO. It should move it and the contents to the location

/home/olpc/livres

This is where we will point a bookmark in the Browse Activity to easily get the books.

10. Launch the Browse Activity and in the address bar type

file:///home/olpc/livres

browse-to-file-directory

Then press the ‘Star’ icon to bookmark it and then hit ‘Enter’. You should see an index of files that exist in the directory. Clicking on those will ‘download’ then or transfer them to the Journal for ‘Start’-ing into FBReader.

Next time a Browse activity is started, you can just type some characters of the folder name and it will try to auto-complete the file index for your directory with books. This makes a pretty easy way for people to get to the books locally on the drive and really mimics a Windows Explorer, Finder or Apache Index of files.

Here is a link to the laptop.org page on the Senegal XO project:
http://wiki.laptop.org/go/Senegal/KeurSadaro

Here is a link to the Drew/Lick-Wilmerding Blog:
http://senegaltrip09.blogspot.com/