XFCE
Xfce is a lightweight but powerful desktop environment that will work well on the XO. The following is a tutorial for using Xfce on the XO based on the article from the Free Like GNU article and several forum posts.
Preamble
Please read the following steps before proceeding to make sure you understand what is involved! We take no responsibility for you making your XO unbootable. Although the process is reasonably safe for your XO, you should know how to and have the ability to wipe the XO and start fresh using a USB stick in case you get into trouble!
Please also note that xfce and other third-party modifications (all non .xo bundled applications) to your XO may be rendered inoperative when you upgrade the base OS to a new build. (See http://dev.laptop.org/ticket/6317)
Instructions
Get Root
Establish a connection to the internet. You will need the ability to connect to the internet to retrieve and update files from the OPLC's repositories. "yum" is the command that will retrieve the files you request and it will automatically install them. You will need to have "root" access to use yum.
If you can't get an internet connection first because of missing WPA encryption, follow WPA instructions first. These even work with Sugar.
Get "root": Use the terminal activity and type su
at the prompt and hit the return key. Your command prompt will now end with "#" this means you have "root" and can change any file on the computer.
$ su #
Install Packages
Install xfce, this will give you a very basic desktop environment and the ability to customize it. This will download about 40MBs to RAM then install the files automatically. Make sure, no other Activity is running. Otherwise during installation you will get 'error: can't allocate memory'. To proceed, stop Terminal Activity, reboot, restart the process. If you get a "Socket Error" that returns you to a prompt, use the up arrow to restore your original command and enter to restart the process.
# yum install xfdesktop xfce-utils xfce-mcs-plugins xfce4-session
Optional packages: xmms (audio player), orage (calendar), xfce-mixer (volume control), system-config-date (set datetime/timezone), genmon (generic monitor - can be used to output battery status, for example), systemload (shows CPU and memory usage)
# yum install xmms orage xfce4-mixer system-config-date xfce4-genmon-plugin xfce4-systemload-plugin
Install Firefox
Installing firefox requires that you remove its exclusion from the XO's repository list Open the repository file with the following command:
# nano /etc/yum.repos.d/olpc-koji-ship2.repo
NOTE: in the latest builds (here tested on candidate-691) the command should be:
# nano /etc/yum.repos.d/olpc-koji-update1.repo
Remove the firefox
entry from the last line so it looks like this:
exclude=seamonkey,mozplugger,kdebase,kernel
then save using CTRL+X and confirm with "y" Install Firefox by running this command
# yum install firefox
Manage WiFi Networks
You can use wifi-radar to manage your wireless connection within xfce
# yum install wifi-radar
You can run wifi-radar through the xfce menu under "Networking". After running it once, a file will be created at /etc/wifi-radar/wifi-radar.conf
. Open this file in a text editor, and change the line which reads:
interface = eth1
to read:
interface = eth0
Now, running wifi-radar should allow you to see the available wireless networks and connect to one. You may need to disable the default wireless network manager, by running:
# /etc/init.d/NetworkManager stop
You can permanently disable network manager by
# /sbin/chkconfig NetworkManager off
If you want to run wifi-radar as a daemon which will automatically connect to a preferred network:
$ wifi-radar -d
Manage WPA2 and WPA Keys with XFCE
You can connect to Wireless Access Points using WPA and WPA2 keys. Following solution don't require wifi-radar, thus work stand-alone for preferred WiFi-connection. This method, once applied, even works with Sugar persistently.
Add WPA Keys
Prepare your wireless network configuration. Edits can be added muliple for various connection types.
# nano /etc/wpa_supplicant/wpa_supplicant.conf
Adding following lines for WPA2 or WPA1 keys
WPA2 Connect Entry
network={ ssid="MyHome WiFi Name" scan_ssid=1 proto=RSN key_mgmt=WPA-PSK pairwise=CCMP group=CCMP psk="My Paraphrase" }
WPA1 Connect Entry
network={ ssid="MyHome WiFi Name" scan_ssid=1 proto=WPA key_mgmt=WPA-PSK pairwise=CCMP TKIP group=CCMP TKIP psk="My Paraphare" }
Using WPA, options pairwise and group may vary between 'CCMP' or 'TKIP'. Get Wireless Access Point settings by running command line program 'iwlist scanning', looking for preferred wifi connection. 'CCMP' seems preferrable.
Edit sysconfig
Edit file
# nano /etc/sysconfig/wpa_supplicant
Read line INTERFACE="-iwlan0". Set to
INTERFACES="-ieth0"
Restart eth0
For some reason you must reset network device while booting.
# nano /etc/rc.local
After read "touch /var/lock/subsys/local" insert
ifdown eth0 ifup eth0
Disable NetworkManager
Disable network manager permanently by
# chkconfig NetworkManager off
Sugar Notice: NetworkManager manages Sugars 'Neigbourhood'. Once turned off, Neigbourhood will stay empty. But you'll win a 'hidden' stable and persistent WiFi connection instead. When turned on again, NetworkManager ask for password, which fails. Turn off again and reboot to connect.
Install wpa_supplicant demon
Enable wpa_supplicant permanently by
# chkconfig --level 2345 wpa_supplicant on
Your system must be rebooted to access the web.
Xfce startup message
While launching Xfce there is a dhcp warning 'Could not lookup ...'. Continue anyway or follow given instructions. All works very fine now.
Wifi-Radar setting
Wifi-Radar requires WPA-Drivers. Set WPA-Driver to "wext"
Using nm-applet instead of Wifi-Radar in xfce
With the xfce desktop, one can use nm-applet to connect much more easily to a variety of wifi-hotspots. I find it to be much easier to set up than wifi-radar.
Setting up nm-applet
- Connect to some sort of wifi hotspot, any way you can. You could also use a usb key, but it is easier to explain with yum
- download nm-applet. As root, yum install NetworkManager-gnome --enablerepo=fedora
- download some gnome UI elements yum install libgnomeui download is less than 4 megs
- add nm-applet & to your .xsession file found at /home/olpc/.xsession
- undo your wifi radar, wpa supplicant, or any other hacks you did to connect to the internet. nm-applet uses the same setup as sugar default. Make sure you turn NetworkManager back on
- restart, and enjoy nm-applet!
NOTE: IF you get an error(something about d-bus) just ignore it, nm-manager should still work
If you are having trouble reconnecting to a locked hotspot using nm-applet
nm-applet seems to suffer from the same issue of corrupted wifi password file (networks.cfg) which plagues sugar. Here's my attempt at a work around.
- On a toolbar in xfce, create a launcher (right click a toolbar, hit add) which runs the text rm /home/olpc/.sugar/default/nm/networks.cfg in the terminal (check the box when creating it) you only need to do this once!
- right click nm-applet in your systray, and click "disable wireless." right click again and click "disable networking"
- click your launcher to delete the networks.cfg file. You could also open a terminal and paste rm /home/olpc/.sugar/default/nm/networks.cfg into the terminal
- Then, right click nm-applet and restart networking, wireless
- click on nm-applet and "connect to other network" Manually type in your wireless network name and password, do not click on your wireless in the drop down if you see it. Sometimes it works, and sometime it doesn't, so inputting manually seems to work more often.
- you should be connected!
Screen Brightness/Rotation, Sound Volume, and Battery Status Control
The keys on your XO can be easily made functional again by installing the rpm on this page: olpc-keybind. This RPM contains the scripts to perform the operations and the instructions to configure your default olpc user account to use them.
This rpm depends on xbindkeys. Because this rpm doesnt yet exist in the official repositry you have to do the following in a terminal (as root) to install it:
yum install xbindkeys rpm -Uhv http://favias.org/files/olpc-keybind-1-2.noarch.rpm
To remove this functionality the following command as root in terminal will suffice:
yum remove olpc-keybind xbindkeys
Screen rotation note: Rotation does not automatically resize the windows. If you are using fullscreen mode this may be fixed by pressing Alt-F11 twice.
NOTE: On error 'scriplet failed' run as root /usr/bin/olpc-keybind manually. Run xbindkeys & for testing screen rotation. You can add /usr/bin/xbindkeys to Xfce Autostarted Applications via Setting Menue.
Nb: For me, screen brightness did not initially adjust, as root I had to:
chmod a+rw /sys/class/backlight/dcon-bl/brightness chmod a+rw /sys/class/backlight/dcon-bl/max_brightness
Displaying Battery Status in panel
- Install olpc-keybind rpm for the battery-status binary it provides
- use genmon (see above) to display the battery status in a toolbar
- right-click on a blank spot on an Xfce toolbar, chose Add Item, select Generic Monitor and clicked Add
- right-click the new Generic Monitor item, select Properties, and apply the following settings:
- Command: battery-status
- Label: B
- Period: 300
Getting normal fonts for web browsing, xfce desktop
If you think your fonts look a little funny on xfce, you may appreciate more "typical" fonts for your web browser and your desktop. I think it makes things look much nicer, and make my eyes bleed less. However, this is not entirely "free," but the package itself is distributable for free
Download the mscorefonts rpm from this website Mscorefonts rpm
open a terminal as root, in the folder you downloaded the rpm to, and type: rpm -i Micro Pressing tab should auto-complete the file name
restart your computer, and you should notice fonts in browser looking more like your other computers
Also, you can change your default user interface fonts in the xfce "User interface settings"(check me on this) and changing the font to a size and font you recognize. Its also good to turn on anti-aliasing (slight) to make the fonts look even better.
Mounting Removable Filesystems
- Insert SD card or usb drive.
- Run thunar, the Xfce File Manager.
- The removable media should appear in the left-hand column. Click on it to mount it. A df will show that it has been mounted in the appropriate place (/mount/VOLUME_NAME)
- To unmount, right click on the media name in the same place and choose unmount.
Change default desktop
Turn Xfce to default desktop
In /home/olpc/
create a copy of .xsession-example
called .xsession
:
#cp /home/olpc/.xsession-example /home/olpc/.xsession
Edit the .xsession
file to launch Xfce on startup:
# nano /home/olpc/.xsession
Find the commented line that reads #exec xterm
- below that line, add the following code:
exec startxfce4
- use CTRL+X to save and exit
- use CTRL+ALT+BACKSPACE to restart X, starting Xfce
Turn back to XO Sugar desktop
To make the original XO Sugar desktop the default boot again, rename the .xsession
file to anything other than .xsession (.xsession.xfce
for instance). Applied changes, e.g. networking, may stay persistent.
Trouble?
Defreeze Boot Animation
If you reboot and get stuck at the XO logo (with circle around it), hold down power to shutdown then power up again.
Warning! This is advanced and can potentially screw up your boot. To bypass the boot anim manually, hold down the checkmark while turning the OLPC on, then wait for the machine to tell you to release it.
You can prevent boot freezing by disabling the startup logo animation:
- Open the startup animation logo file
/etc/init.d/0-boot-anim-start
- Above the line saying "# i'm the child", change
if os.fork() == 0:
toif os.fork() == 'debug':
to prevent the animation code from being executed.
XO Wipeout
This document is under continued construction and may contain malicious strategies. In case of major trouble be prepared to wipe out your XO with an USB-Stick. This will clearly erase all data and any changes. Read and understand instructions following http://wiki.laptop.org/go/Secure_Upgrade first, before apply major changes to XO.
Learn Linux
After all, DO NOT forget you are half-blinded low-level hacking a machine designed for the rugged world with a sugared usability for small children... To do that, yes, you have to learn about Linux.