By Seth Fogie
Date: May 19, 2008
The OLPC's XO is a rugged-ized computer designed with children's education as its goal. While we aren't doubting the learning qualities of the device, we do have to wonder what exactly is being taught. In Part 1 of this series, Seth Fogie takes an exploratory look at the XO to see what’s inside. He provides a few pointers for preparing it for "enhancement," showing how to punch up that learning environment with games, music, movies, and more.
The OLPC (One Laptop Per Child) is a project designed to create a means by which all children around the world can connect with one another, create new and imaginative solutions, and challenge their intellect, using a computer that is attractive, rugged, and cheap to build and use. The end result is not quite affordable for most third world countries, but the initial device, known as the XO, has made significant steps toward achieving the goal.
Ironically, the OLPC program has not just produced a laptop that delivers on its promise to "provide children around the world with new opportunities to explore, experiment, and express themselves." The program might also have taken the first step to building a world full of hackers. Now, we aren't saying OLPC is a subtle communistic take-over-the-world doomsday program. However, don't let the XO's green and white kid-friendly exterior fool you—this machine has all it needs to become a dangerous tool in the wrong hands. As the rest of this article demonstrates, it only takes a little time, knowledge, and Google to turn the playful XO into a hacker's toolbox.
What is the XO, really? Before delving into the details of how the innocent XO can be converted into a hacker's toolkit, let's take a moment and examine the details of this system.
Following are the specs of the first version of this laptop:
- 433 MHx AMD Geode LX-700. OK; enough to handle the basics.
- 1200×900 7.5" LCD. Though high enough in resolution, it is quite small in reality.
- 256 MB DDR266. Eh—enough to run most command-line tools.
- 1024K ROM. The hard drive; basically a 1GB memory card.
- SD card slot. Very useful; you can extend memory far beyond the 1GB main drive space.
- 802.11b/g/s-ready (802.11s is for mesh networks). Impressive, but incomplete; 802.11s is not quite prime time for OLPC mainly because of networking issues and other anomalies that have been discovered.
- 3 USB + keypad, touchpad, audio jack, and speakers. Excellent for such a small device; USB support is mostly plug and play.
Although the website currently states that XO is running Fedora 6, according to /etc/redhat-release the version on the device we're using is Fedora release 7. The OS includes most of what you would expect from a core installation.
However, one big difference is the user interface, which is based on a GUI known as Sugar. The jury's still out on this unique concept for a UI, but the whole thing is written in Python and is very customizable. There really is no easy way to properly describe it, so if you're interested, download the LiveCD (http://wiki.laptop.org/go/LiveCd).
Included with the core OS and its GUI are a small collection of programs meant to serve as a starting point for XO users:
- A browser built on Xulrunner (Gecko)
- AbiWord for document processing
- Email and chat clients
- Graphics programs
- Music creation suites
- A unique and entertaining collection of programming tools that provide an introductory environment for learning how to code
This device is no super computer, but it does provide a lot for its price. Granted, the hardware could be a bit more powerful. Nevertheless, the Sugar interface and the included applications could make the device more attractive to educators and kids than a default Ubuntu system on a similar piece of hardware.
Tweaking the Desktop
A customized desktop is a requirement for any serious hacker. The following tips will help you tweak your XO interface to make it a system any hacker could be proud of.
The first noticeable graphic of the OLPC is its circular ring in the middle of the desktop (Figure 1). This ring serves one main purpose, which is to provide an interface so that the user can manage the graphical programs that are currently running. In the middle of this ring is the custom-colored buddy icon that represents the XO user. The OLCP allows you to change certain aspects of the icon, but we want to make a statement.
Figure 1 Original XO buddy icon
As we examined how to change the icon, we quickly realized that the XO's graphics were based on Scalable Vector Graphics, a relatively new type of image format that builds the image dynamically from an XML file. This presented a small problem because we didn't have any SVG editors on hand; nor did we know of any free ones. After a bit of Googling, we found Inkscape, "an Open Source vector graphics editor, with capabilities similar to Illustrator, CorelDraw, or Xara X, using the W3C standard Scalable Vector Graphics (SVG) file format."
Next we had to locate the XO icon that is embedded in the desktop. After looking in all the obvious places, we eventually found the icon in the /usr/share/icons/sugar/scalable/device/ directory (after finding a reference to the icon file in /usr/share/sugar/shell/view/home/MyIcon.py). So, once we created our own file, we could either replace the computer-xo file in the former directory or upload our file to the former directory and specify its name in the MyIcon.py file.
Code for Original XO Buddy Icon
<?xml version="1.0" ?><!DOCTYPE svg PUBLIC ’-//W3C//DTD SVG 1.1//EN’ ’http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd’ [ <!ENTITY stroke_color "#010101"> <!ENTITY fill_color "#FFFFFF"> ]><svg enable-background="new 0 0 55 55" height="55px" version="1.1" viewBox="0 0 55 55" width="55px" x="0px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px"> <g display="block" id="stock-xo_1_"> <path d="M33.233,35.1l10.102,10.1c0.752,0.75,1.217,1.783,1.217,2.932 c0,2.287-1.855,4.143-4.146,4.143c-1.145,0-2.178-0.463-2.932-1.211L27.372,40.961l-10.1,10.1c-0.75,0.75-1.787,1.211-2.934,1.211 c-2.284,0-4.143-1.854-4.143-4.141c0-1.146,0.465-2.184,1.212-2.934l10.104-10.102L11.409,24.995 c-0.747-0.748-1.212-1.785-1.212-2.93c0-2.289,1.854-4.146,4.146-4.146c1.143,0,2.18,0.465,2.93,1.214l10.099,10.102l10.102-10.103 c0.754-0.749,1.787-1.214,2.934-1.214c2.289,0,4.146,1.856,4.146,4.145c0,1.146-0.467,2.18-1.217,2.932L33.233,35.1z" fill="&fill_color;" stroke="&stroke_color;" stroke-width="3.5"/> <circle cx="27.371" cy="10.849" fill="&fill_color;" r="8.122" stroke="&stroke_color;" stroke-width="3.5"/> </g></svg>
Figure 2 OLPC buddy icon DEFCONified
Prepping the Lean Green Hacking Machine
It's one thing to look like a l33t hacking machine, but it's another to actually have one—and yet another to actually know what to do with it! Let's look at some of the basics of how to turn the OLPC into the ultimate hacking machine.
The OLPC comes with a small collection of tools and options that are nice for the typical seven-year-old, but not very useful for a child who wants to test the XO's capabilities. These next sections outline some of the key things we think you need to take care of before sending your OLCP to the dark side.
Upgrade the OS
If you obtained one of the units in the initial OLPC shipment, the first thing you'll want to do is upgrade the OS from the default 650 to a newer version. You can quickly determine the installed OS version by hitting Ctrl+Alt+F2 (the circle with three dots). Your XO will jump over to an alternate shell that will list the OS version in the top line. When you're done, hit Ctrl+Alt+F3 (the circle with one dot) to return to the GUI.
OLPC build 653 (stream ship.2; variant devel_jffs2) Kernel 2.6.22-20071121.7.olpc.af3dd731d19395d03 on an i586
If you can see that you're not using a version greater than or equal to 653, you'll want to do the following to upgrade the OLPC: Open a terminal window, and type su –l to drop to root access. Then type olpc-update –rn 653 to update to version 653. (If a newer version is available, you can update to that.)
Assuming you're connected to a wireless network, the XO will initiate the update process, download the necessary files, and install them. If only all OS updates were this simple!
Get Root and Remote Access (SSH)
Once the OS update is complete, you'll want to add a permanent root account to your OLPC for future use. This is accomplished by opening a terminal window and typing in the following:
sudo passwd root New UNIX password: <type in password> Retype new UNIX password: <type in password>
You can also add other users via the useradd command, and set a password for the olpc account. Why go through all this? Well, the simple reason is so you can gain remote SSH access to the OLCP. By default and for good reason, a user can access a remote system via SSH only if their account has been assigned a password.
Add Compiling Support
The next item we need to add to the XO is the ability to compile source code. This requires a package known as GCC (GNU Compiler Collection), which can be installed with the following command—assuming you are connected to a wireless network with Internet access.
yum install gcc
Yes, it really is that easy.
When you type this command and hit Enter, the XO will connect to various online sites that store software packages for the XO, to see if the specified package is available. If it is, the next thing the yum (Yellow Dog Update, Modified) will do is determine what, if any, dependencies are needed for the specified package to work.
For example, if you were to install Gimp (a very popular open-source graphics editing software package) on the XO using yum install gimp, you'd first have to approve the installation of 27 other packages—including gimp-libs, xorg-x11-font-utils, libsemanage-2.0, audit-libs-python, and many more. Fortunately, yum takes care of all these details and does the dirty work for you, so you can spend more time surfing websites like InformIT.com!
Upgrade the Entertainment System
Hacking and cracking is a tedious activity that requires a certain level of distraction to help you stay sane. Specifically, we're talking about audio/visual entertainment that will keep the right side of your brain amused while the left side comes up with attack strategies. You'll need a media player that works well with numerous formats and OS types, which pretty much means you need to install VLC (aka VideoLan).
To install VLC, type the following:
su –l rpm -ivh http://rpm.livna.org/livna-release-7.rpm http://dl.atrpms.net/all/libdvdnav4-0.1.10-2.fc7.i386.rpm yum install vlc (this take a while)
Everything should now be ready to go. Music should be playing. And you can take some delight in seeing a customized icon each time you look at your desktop. It's time to take a break and enjoy some classic gaming.
Gaming on the XO
The XO is built for kids, so it has a few games. These games are educational in nature, however, and so really not too enjoyable for anyone over 12. Fortunately, there is a huge following for the XO online, resulting in some options being available for the XO gamer. In fact, it's so easy to install games on the OLPC that for many games you only need to visit a couple of websites and click on a link.
A few popular choices:
- Doom. http://wiki.laptop.org/go/Doom Locate and click on Doom-#.xo.
- SimCity. http://wiki.laptop.org/go/SimCity Locate and click on SimCity-#.xo.
- Go. http://wiki.laptop.org/images/e/ee/PlayGo-1.xo
- Chess. Enter the following:
su -l yum install xboard wget -P/usr/bin http://freechess.org/Download/timeseal_x86 chmod +x /usr/bin/timeseal_x86 exit
For the entire list of games:
- Easy to install: http://wiki.laptop.org/go/Activities
- Not so easy to install: http://wiki.laptop.org/go/Games
As you can see, there's a whole world of opportunities for gamers out there. So if you ever do get bored with hacking challenges, you can always load up Doom and frag some zombies.
Part 1 Summary
At this point in the XO conversion process, you have all you need to get your game on—literally. In addition to some basic amusement, you also have a Linux system that is ready to fulfill its true purpose. So, what is that purpose? Come back next week for more!