OLPC with XFCE Desktop
As much as I like our new OLPC, our daughter who was reared on the XFCE desktop had trouble navigating about the Sugar interface that comes with the OLPC XO. Fortunately there are xfce packages in the OLPC RPM repositories. XFCE runs well in 128MB of ram on another machine I own, so I figured that the XO would be happy with its 256MB alotment. After using it for a few hours, I’m convinced that until Sugar and the apps it comes with are more refined, that I’ll stick to XFCE for everyday use for my kids. I’ll give you the basic steps involved and show you how to default to the XFCE environment on boot up if you are confortable using the terminal, repository tools like yum or even apt-get and are willing to edit a startup script.
Please read the following steps before proceeding to make sure you understand what is involved! I take no responsibility for you making your XO unbootable. Although the process is reasonably safe for your XO (you wont be removing your original files to make this work), you should know how to and have the ability to wipe the XO and start fresh using a USB stick incase you get into trouble! You will also need about 100MB free for the XFCE environment and some games or other apps.
- You will need to make sure you have a connection to the internet for your XO. If you do then find the terminal activity and start it.
- type “su” at the prompt and hit enter, you will now have root access to the XO.
- the command “yum update” will create or update the repository list
- “yum install xfdesktop xfce-session xfce-mcs-plugins xfce-utils xfce4-session” will install the xfce desktop, window manager, and panel as well as other dependencies and utilities. Its about 50MB, IIRC
- you may want some other useful panel plugin packages such as “xfce4-genmon-plugin”, “xfce4-systemload-plugin”, “xfce4-places-plugin”, “xfce4-mixer”. The battery plugin seems to not like the way the XO reports battery status… the genmon plugin may be used to get around this once we know how the battery reporting works…
- “yum search <keyword>” will help you find other useful packages.
- tuxpaint, gcompris and frozen-bubble are some favorites that my daughter likes and are available in the repositories as well. Note these programs have their own sets of dependencies, be sure you have the space to install them. A basic web browser called “dillo” can be useful until something more robust is available in the repositories.
getting xfce to start as default requires that you edit (using nano) /usr/bin/olpc-session: “nano /usr/bin/olpc-session” on the last line of the script comment out sugar with the # sign: “# exec sugar” add the following as the last line in the script “exec xfwm4 & exec xfdesktop & exec xfce4-panel” then ctrl-x and save the file add the following as the last line of the script “exec startxfce4″ then ctrl-x to exit and save the file. “reboot” will restart the XO you can revert back to standard Sugar UI by uncommenting the “exec sugar” and commenting the xfce stuff in the /usr/bin/olpc-session script.
- There’s a better way…
- copy the .x-session-example to a file namd .xsession in /home/olpc/
- open the new .xsession file, find the “#exec xterm” line
- under that line put “exec startxfce4″
- ctrl-alt-erase will restart X and XFCE will start instead of Sugar.
- to go back to Sugar just rename .xsession to anything else and ctrl-alt-erase again
# yum update
# yum install xfdesktop xfce4-session xfce-mcs-plugin xfce-utils xfce4-session
$ cd ~
$ cp .xsession-example .xsession
$mv .xsession .foobarbazoo
Using the XFCE desktop leaves you with about 150MB ram which is plenty for most basic apps and games. My daughter has been using XFCE since she was 3 years old to launch a web browser, or tuxpaint if that says anything about usability.
the OLPC may start up to the child icon in a circle. I’m not sure why it does this alternate bootup, but if you shutdown via powerbutton, xfce will startup on the next boot.
you can get status of battery (among other things) from HAL. “hal-devices | grep battery” will show some stats.
if you are using a WPA network and want to connect from xfce, you can do the following as root:
- #: wpa_passphrase <ssid> <passphrase> >> /etc/wpa_supplicant/wpa_supplicant.conf
- #: wpa_supplicant -ieth0 -c /etc/wpa_supplicant/wpa_supplicant.conf -B
- #: dhclient eth0
you can get firefox from the YUM repos by reenabling the package see /etc/yum.repos.d/olpc-koji-ship2.repo
if you are getting locked up in XO in circle screen every other boot, try this dirty hack:
you need to be root and edit /etc/init.d/0-boot-anim-start
# nano /etc/init.d/0-boot-anim-start
find the line near the end that reads “#i’m the child” there are a few more commented lines below. Comment each line down until you reach the first “s.close()” line, but do not comment it. see below:
# fork and continue init.
if os.fork() == 0:
# i'm the child!
# ask to be notified of console changes
# (only switch out; don't worry about switching back)
# (we had to wait until we were the correct PID before calling
# vt_setmode, since it remembers the PID it was invoked from)
#vt_switch_now = False
#def vt_switch(signum, frame):
# global vt_switch_now
# vt_switch_now = True
#vt_setmode('/dev/tty2', mode=VT_PROCESS, relsig=SIGUSR2)
# do animation and wait for 'quit'
#src = server_loop(s, fb)
# clean up framebuffer and virtual terminals
# clean up the socket
# s.sendto('done', 0, src)
you should now get xfce to come up on every boot.