Ubuntu Intrepid for the XO
Alex Belits (alias Teapot) has released a customized version of Ubuntu Intrepid (8.10).
This is an easy-to-setup, easy-to-use desktop operating system for the XO based on the rock-solid foundations of Ubuntu. It is ideal for G1G1 adult donors who would like to have a real desktop environment instead of Sugar or for children who are already used to normal computers.
When Ubuntu is installed, the Sugar installation is not affected. The whole OS boots/runs comfortably from the SD card. If the SD card is removed and the machine is restarted, you boot into Sugar. Sugar may also be booted without removing the SD card by holding down the "O" game key while powering up the XO.
It also has the most important power management features of Sugar so the XO can be used like a real laptop with it.
XO specific customizations
- Deep suspend/resume works for closing/opening the lid
- Automatic shallow suspend is supported by a custom script which activates shallow suspend if there is no user input and there is no high load on the system. This script can be easily activated/deactivated according to the needs. This can be used for ebook reading or browsing. Similar to advanced power management of Sugar.
- Custom desktop theme with XO-friendly colors (green...etc)
- Battery state of charge indicator works and charge percentage is included in the default desktop toolbar
- Dedicated arrow buttons (left side of the screen) mapped as direction buttons (so can be used when browsing for example)
- Game buttons are mapped as (Home/End, Page Up/Down), so these can be used for browsing or reading.
- Screen rotation with the dedicated button (below the arrow buttons)
Notable features
- Xfce desktop preconfigured with GDM, so the user gets a graphical login and desktop without extra setup. This desktop environment is suitable for the resources of the XO and advanced enough to work with.
- Automatic login can be easily set-up with the GDM configurator, so if you want you can get directly into the desktop if you want (less secure but more comfortable)
- Synaptic and GDebi are installed by default so newbies can install extra software by the GUI
- Web browsing: Firefox 3.0.4 (installed by default but not very snappy), Opera 9.6 can be easily installed (starts much faster than Firefox, smaller memory footprint)
- PDF capable: ePDFViewer by default, Evince can be installed easily with Synaptic. These are very capable PDF viewer programs.
- Flash capable: Flash v10 works in Firefox and Opera (after installing the plugin with Synaptic). Flash-enhanced websites seem to render correctly. Flash games are too slow, but simple flash applets work.
- Watching YouTube videos is supported with a dedicated download/watch program (TubeWatcher). (This is because Flash video playback is not fast enough to be enjoyable from within the browser)
- Java capable: Java JRE 1.6 u10 works without issues (after installing with Synaptic). Azureus works (advanced, Java based Bittorrent client).
- FBReader works (advanced ebook reader). (Installed with Synaptic)
- All other Ubuntu Intrepid tested applications can be installed and used (AbiWord, Gnumeric, OpenOffice...etc)
- Mplayer is installed by default. VLC Player can be installed easily and plays good-quality movies smoothly
- Pidgin installed by default
- Skype 1.3 works with headset (downloaded from skype.com, installed from package, audio device set correctly: see solutions)
- Swap file can be easily created, so larger applications can be run on the 256 Mb physical RAM of the XO. A 256Mb swap is recommended for OpenOffice.
- The above install can fit to a 2GB SD card but you won't have too much free space remaining. A 4GB SD card is recommended.
Not supported (yet)
The XO cannot hibernate like a normal laptop (that would further reduce inactive power consumption compared to deep suspend). However, suspend to ram (deep suspend) works and results in low power loss while the XO is not in use. Wacom driver for an external USB tablet is not installed.
Requirements
You will need at least a 2GB SD card and a 1GB USB memory device. A 4GB or larger SD card is recommended to provide adequate space for applications and data.
Obtain a Developer Key for your XO: http://wiki.laptop.org/go/Activation_and_Developer_Keys
Upgrade your OLPC OS to at least version 8.2.0: http://wiki.laptop.org/go/Release_notes/8.2.0
Upgrade your OLPC Firmware to at least to the version q2e18 (should be installed automatically with OS 8.2.0): http://wiki.laptop.org/go/OLPC_Firmware_q2e18
Obtain the customized Ubuntu Intrepid via BitTorrent (from http://mars.illtel.denver.co.us/~abelits/torrents/OLPCFiles-intrepid-20081130.tar.bz2.torrent) and place the .bz2 file on a USB memory device.
If you do not have another computer with a BitTorrent client installed, you can install BitTorrent on the XO under Sugar and use it to download the file. Open Terminal and type:
sudo yum install bittorrent
Connect a USB memory device. Start the BitTorrent client and download the file to the USB drive.
cd /media/USB-device-name
bittorrent-curses http://mars.illtel.denver.co.us/~abelits/torrents/OLPCFiles-intrepid-20081130.tar.bz2.torrent
Do not attempt to download the file to your XO’s internal NAND flash memory, as the file is very large and you’re going to have to copy it to a USB device anyway for installation.
Installation Procedures
Boot your OLPC into Sugar and start the Terminal activity.
Caution: It is recommended to copy and paste all of the following commands into Terminal rather than typing them, as mistakes may render your system nonfunctional.
Connect the USB drive. Do NOT insert SD card yet. The process will fail if the SD card is already inserted. Open Terminal and type
mount | grep /dev/sd
Repeat until it returns a line like this:
/dev/sda1 on /media/USB-device-name ...
Become root and stop haldaemon:
sudo -s
/etc/init.d/haldaemon stop
Insert the SD card into the slot . All data on the card will be erased by the following commands, so ensure anything important has been saved to another device.
Erase MBR and partition table:
dd if=/dev/zero of=/dev/mmcblk0 bs=4096 count=1
Make the partition table:
echo -e ',,L,*\n\n\n' | sfdisk /dev/mmcblk0
Create the root filesystem:
mke2fs -jLOLPCRoot /dev/mmcblk0p1
Mount the filesystem and unpack the tarball onto it:
mount /dev/mmcblk0p1 /mnt
cd /mnt
tar xvjf /media/USB-device-name/OLPCFiles-intrepid-20081130.tar.bz2
Copy your developer key to the SD card:
cp /security/* security/
Reboot the computer
reboot
After booting into a new system, log in as user olpc with password olpcolpc, and perform final updates:
Click on the Network Manager icon at the bottom panel and select the wireless network you want to use. You will be prompted for the key/password, if one is required.
Start Terminal and complete the configuration:
sudo aptitude update
sudo aptitude safe-upgrade
sudo aptitude reinstall ssl-cert
sudo aptitude clean
sudo /etc/init.d/cups start
mkdir .mplayer
echo -e 'vo=sdl\nframedrop=1\nlavdopts=skiploopfilter=all:fast=1' > .mplayer/config
exit
Optional Steps
Install any other packages/software you desire (gimp, inkscape, msttcorefonts , flashplugin-nonfree, OpenOffice.org, etc.) Certain Firefox extensions such as flashblock and adblock are very helpful on the XO.
After installing flashplugin-nonfree, run
sudo ln -s /etc/alternatives/firefox-flashplugin /usr/lib/firefox-addons/plugins/flashplugin-alternative.so
and install flashblock extension (the usual way, from the browser itself).
Change your password with this terminal command:
passwd
Enter olpcolpc as the current password, then enter the new password you intend to use twice.
Changing the password does not change the password for the network manager keyring. The keyring password will still be olpcolpc.
rm .gnome2/keyrings/login.keyring will remove the old keyring. A new one will be created the next time you connect, allowing you to choose a new password.
Adjust your clock:
Set your OLPC to the correct time zone:
sudo dpkg-reconfigure tzdata
If your clock is still not set correctly, set it manually with
sudo date 102413252009
(the format is MMDDhhmmYYYY)
or set the clock automatically by synchronizing with a time server:
sudo ntpdate pool.ntp.org
You can make a swap file to improve performance in certain situations. In this example it's a 256MB file, so you need at least 256MB of free space on the SD card:
sudo dd if=/dev/zero of=/swap.bin bs=1M count=256 (will take some time to complete)
sudo chmod 600 /swap.bin
sudo mkswap /swap.bin
sudo swapon /swap.bin
If you want to remove it, disable swap first:
sudo swapoff /swap.bin
sudo rm /swap.bin
To re-enable swap after each reboot, run
sudo swapon /swap.bin
To automatically enable swap every time the system boots, add the following line to /etc/fstab file:
/swap.bin none swap defaults 0 0
To tell the system to swap as little as possible to reduce flash wear, add this to /etc/sysctl.conf
# Swap as little as possible
vm.swappiness=0
Use sudo nano filename to edit those files and be very careful -- wrong entries can render your system unbootable).
To use aggressive power saving mode (suspend on inactivity):
sudo touch /etc/xo-suspend/aggressive and rebooting will enable it
sudo rm /etc/xo-suspend/aggressive will disable it
Enable automatic login to the desktop:
Go to “Settings > Login Window” and enter your password.
Choose "Xfce Session" as the Default session.
Bring up the Security tab and select Enable Automatic Login.
Note: You will still be prompted for your keyring password to connect to your network every time you log in, which pretty much defeats the purpose of enabling automatic login. You can eliminate the keyring password as well, but that requires storing all of your passwords in plain-text. This is not recommended, but if fully automatic login is more important to you than password security, delete your existing keyring with:
rm .gnome2/keyrings/login.keyring
The next time you reboot and connect to an encrypted network, you’ll be prompted for the network password. You will then be prompted to create a keyring. Leave both password boxes blank and click “Create.” Confirm that you want to store your passwords unencrypted by clicking “Use Unsafe Storage.”
Warning: Anyone who gains physical or remote access to your user account files can now see all of your passwords.
To back up your Ubuntu installation:
Boot into Sugar by holding down the “O” game key while turning on your XO. Release the game key when directed.
Connect a USB memory device. Open the terminal and type
su
df
Note where the USB and SD are mounted. The SD is at /media/OLPCRoot and the USB should be /media/USB-device-name. Then type
cd /media/OLPCRoot
tar cvzf /media/USB-device-name/file-name.tgz ./
This is a lengthy process and will take some time to complete. The exact time required depends upon the contents of your SD card.
You can give your tgz file any name you want.
To restore your backup to the same SD card, use the Sugar terminal to enter
su
cd /media/OLPCRoot
tar xvzf /media/USB-device-name/file-name.tgz ./
To restore your backup to a new SD card, follow the same procedures you used to install Ubuntu for the first time, but substitute the "tar xvzf filename" command above for the "tar xvjf filename" in Teapot's installation instructions.
Tips and Fixes
To enable the monochrome 200dpi “reader” mode, press the Frame key in the upper-right corner of the keyboard.
If the mic light of the XO is always illuminated, un-check the "V_REFOUT enabled" box in the sound control panel and in the terminal type
alsamixer -V all
Navigate with the arrow keys to the last entry and set it to "MM" by pressing "m". Press Esc to quit.
Useful Links
The complete and annotated install instructions, current download link and general support (OLPC News thread)
Solutions for typical customizations and problems (OLPC News thread)