Sunday, January 06, 2008

Trying out the XO Laptop Operating System

In a recent post I mentioned that I had ordered an XO Laptop from the One Laptop Per Child program. It is still on order but being the slightly impatient person that I am I decided to see if I could test drive the software on the laptop before it arrives. It is based on Linux after all which usually means the software is freely available somewhere on the Internet.

Taking the XO for a spin turned out to be pretty easy and I have been able to add all of the applications I've wanted so far. I mentioned in my last post about the XO that I wanted to use it for programming and web browsing so I had a few requirements in mind. The laptop comes preinstalled with a custom web browser and Python but I often like to program in C and C++ so I wanted to install gcc. The web browser has a few wrinkles too, in the development build I tested I wasn't able to get some flash plugins to load (could be the version of flash or the fact that the XO version I downloaded wasn't a production release). The browser is tabless and it is a bit difficult (though not impossible) to figure out where downloaded files are stored. In short it wasn't quite was I've grown accustomed to, so I thought I would try installing Firefox. He's my step by step instructions for trying out the XO Laptop virtually and customizing it.

I began with the XO's wiki and found out that there are instructions for emulating the XO and VMWare virtual machine images for recent builds of the system. VMWare is a program which creates a simulated computer that runs within your current operating system. For the past few years I've tested all of the Linux distributions I've considered on VMWare Server (free to download and use at home). Once I started VMWare, I opened the ship.2-OLPC-655.vmx file and started it up.

After the initial configuration, I wanted to add gcc, a collection of open source compilers. I thought it was going to involve downloading several RPM files, but I found out about a tool called yum which manages RPM packages. This is similar to Ubuntu's apt-get. As root I was able to run
yum install gcc
and it downloaded and installed all prerequisites.

Next I wanted to install Firefox, and to download it I thought I would try Lynx (a text based web browser). Installing Lynx was just as easy, as root I ran:
yum install lynx
I ran lynx www.google.com and searched for firefox and downloaded the tar.gz Linux version. After downloading I unpacked the archive using
tar zxvf firefox-2.0.0.11.tar.gz
I tried running firefox, but got an error about a missing shared object library. Yum was able to find this as well. One final time as root, I ran
yum install libstdc++.so.5
After installing the C++ library, firefox ran just fine. The menus and graphics in Firefox matched the XO's theme, which I thought was pretty nifty. I was also able to install Flash. Well there you have it, why not take it for a test drive yourself.

4 comments:

Ross Isenegger said...

I am a real newbie to Linux. I tried to do what you said on the SDHC card, with no luck. So I did it at root (used su -l) first. I didn't get any errors and there are a ton of directories and files.

But, how do I run firefox? Typing firefox in several locations doesn't seem to do it.

Jeff Scudder said...

Hi Ross,

I'm not sure if I know where the problem is, but the following explanation might help.

When I unpacked the firefox tar file, I was in my home directory, so when I want to run firefox I use:

/home/olpc/firefox/firefox

If you want to be able to just type

firefox

on the command line, then the firefox executable file needs to be in a directory that is included in the $PATH environment variable. To see which directories are in PATH you can do

echo $PATH

You could change the PATH if you want. This post is already a bit long :) so I'll hold off... Would you be interested in editing the path?

Ross Isenegger said...

Thanks for the help.

/root/firefox/firefox works for me. I am still fussing with the Flash plugin though (and lots of other things)

Jeff Scudder said...

When I installed Flash, I think I just used the plugin installer within firefox.