XFCE on OLPC (yeah, you know me!)
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 fileadd the following as the last line of the script “exec startxfce4″ then ctrl-x to exit and save the file.“reboot” will restart the XOyou 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
$ su
#
# 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.
ADDITIONAL NOTES:
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)
#global vt_switch_now
#vt_switch_now = False
#def vt_switch(signum, frame):
# global vt_switch_now
# vt_switch_now = True
#signal(SIGUSR2, vt_switch)
#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()
# clean up the socket
#if src:
# s.settimeout(1)
# s.sendto('done', 0, src)
s.close()
else:
s.close()
you should now get xfce to come up on every boot.
December 25th, 2007 at 3:52 pm
[...] to installing more conventional interfaces and applications on the XO. One is an Xfce project at freelikegnu.org. This is interesting, but I think I want to stay with Sugar for [...]
December 25th, 2007 at 6:38 pm
Help newby
I got to the nano edit part.
How do I edit using nano?
December 26th, 2007 at 8:46 am
“How do I edit using nano?”
First glance over http://linux.die.net/man/1/nano
nano is used like this:
nano /path/to/my/file.txt
you can then make your changes to the file and ctrl-x will bring you to the dialog for saving and quitting (see the hints at the bottom of your nano session).
many files require you to be “root” (login as root or use the “su” command) before you can save changes. Be VERY careful, or you may have to re-flash your XO (as I have had to do many times already
December 26th, 2007 at 9:41 am
Great tutorial, It’s been 6 years since I messed with anything linux based. I was able to install everything exactly and have my Olpc running Xfce now.
thx for the tutorial (firefox makes a world of difference on the box as well =)
December 28th, 2007 at 8:53 am
hello, I got xfce installed as well as zsnes. one “problem” I have is the resolution of the screen; this is such a small screen.
how do I go around changing the resolution?
xrandr outputs the following:
Screen 0: minimum 1200×900, current 1200×900, maximum 1200×900
default connected 1200×900+0+0
1200×900 51.0*
does that mean that the resolution cannot be changed (minimum 1200×900).
thank you
December 30th, 2007 at 3:13 pm
For now it seems we only have the 1200×900 resolution to play with. I tried adding other resolutions to the xorg.conf to no effect..
January 1st, 2008 at 3:27 pm
I would like to try this, but cannot find “xfce-session” on the repository. Everything else is there.
I also get a line “Excluding Packages from OLPC development (koji sources)” — if that means anything.
If anyone has an idea on this, I’d appreciate some help.
January 1st, 2008 at 7:17 pm
OK, I see the problem documented in my post above.
The line: “yum install xfdesktop xfce-session xfce-mcs-plugins xfce-utils xfce4-session” will install the xfce desktop”
Should be: “yum install xfdesktop xfce-mcs-plugins xfce-utils xfce4-session” will install the xfce desktop”
Installation underway.
January 2nd, 2008 at 6:46 pm
thanks for catching. I’ll edit to fix
F
January 7th, 2008 at 1:17 pm
[...] was to install the XFCE desktop environment to replace Sugar. This was simple enough to do using this blog post at FreelikeGnu.org. As I mentioned before you cannot copy and paste so type [...]
January 12th, 2008 at 1:23 pm
[...] Very Basic Xfce (1) [...]
May 12th, 2010 at 8:42 am
Hi,
Like rabrow I got to nano edit portion and I am lost. Please write the full commands just like the you did before that point, so the non-linux savvy people like me will be able to follow. Thank you in advance.
January 8th, 2011 at 10:10 pm
that tutorial is probably outdated by now…. I would check the official OLPC wiki for current instructions