Installing XFCE

XFCE is a lightweight desktop environment that aims to be fast and responsive, while still retaining the user-friendly look and feel of a classic desktop. Since it is relatively lightweight it isn’t a bad alternative to LXDE on the Raspberry Pi, and makes a very good alternative to GNOME 3 on older machines that can’t handle the new desktop.

If you prefer the classic desktop look and feel I have also written up how to install the MATE desktop. It is noticeably slower than XFCE or LXDE on the Raspberry Pi but provides a slightly ‘richer’ user experience, and any GNOME2 users (like me) will feel right at home.

Once you have installed the basic system then to install a minimal XFCE desktop on the Raspberry Pi (or any Debian Wheezy system) you need to start by logging in root.

$ su
Password: 

OR

$ sudo -i
Password:

To avoid any errors later in the installation, begin by checking that the details of the available packages are up to date, and then update the existing installed software.

# apt-get update
Hit http://archive.raspbian.org wheezy Release.gpg
Hit http://archive.raspbian.org wheezy Release
  :
  :
  :
Reading package lists... Done
# apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
  :
  :
  :
#

XFCE depends on X Windows so we will need to install this first.

# apt-get install xserver-xorg xserver-xorg-core xfonts-base xinit
Reading package lists... Done
Building dependency tree 
  :
  :
  :
0 upgraded, 46 newly installed, 0 to remove and 0 not upgraded.
Need to get 16.6 MB of archives.
After this operation, 28.3 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
  :
  :
  :
#

Then we need to add the packages required to allow us to start the XFCE desktop – but as I kept this to an absolute minimum it only includes the window manager and terminal application so what you can do with it is very limited, but despite being just about the most minimal XFCE installation you could have it still takes quite a while to download and install everything on a Raspberry Pi – so you need to be patient!

# apt-get install x11-xserver-utils xfwm4 xfce4-panel xfce4-settings \ 
> xfce4-session xfce4-terminal xfdesktop4 tango-icon-theme
Reading package lists... Done
Building dependency tree       
Reading state information... Done
  :
  :
  :  
Need to get 38.8 MB of archives.
After this operation, 124 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
  :
  :
  :
#

To be useful you will probably also want to include some extra packages including a least the XFCE file manager and task manager.

# apt-get install xfce4-utils xfce4-taskmanager gnome-icon-theme thunar

XFCE Running on a Raspberry PiUp to this point the emphasis has been very much on keeping the number of installed packages to an absolute minimum, however if you want a graphical login screen you can install a display manager.

# apt-get install lightdm 

By default the display manager will use the GTK greeter - if you want to change the background you can do so by editing the configuration file. I tend to use a plain colour background, but you can use your own images - however if you use a transparent image you should note that there does not seem to be any way to set the background colour (other than modifying the source code).

# vi /etc/lightdm/lightdm-gtk-greeter.conf

#
[greeter]
# background=/usr/share/images/desktop-base/login-background.svg
background=#152233

Although you can use a terminal session to edit files most people find it much easier to use text editor with a graphical user interface.

# apt-get install leafpad

To be able to mount removable drives on the desktop you need to install the following packages.

# apt-get install gvfs gvfs-backends policykit-1

Note - To prevent every fixed disk partition being automatically shown on the desktop you need to specify that they should be excluded by creating '/etc/udev/rules.d/hide-partitions.rules' and including the following entries to ensure that any fixed disks will be hidden.

# vi /etc/udev/rules.d/hide-partitions.rules

#/etc/udev/rules.d/hide-partitions.rules
# Use these setting to hide partitions or devices etc 
ACTION!="add|change", GOTO="end"ario
# we only care about block devices
SUBSYSTEM!="block", GOTO="end"
KERNEL=="loop*|ram*", GOTO="end"
# Prevent and partitions on /dev/sda from being shown on the desktop
KERNEL=="sda*", ENV{UDISKS_PRESENTATION_HIDE}="1"
LABEL="end"

To install the default XFCE web browser you just need the following.

# apt-get install midori

Note - It isn't obvious that to change the default search engine and display the status bar you need to right-click on the toolbar to bring up the relevant menu options.

If you need the ability to play sounds and adjust the volume then we need to install the basic packages to support audio and MIDI functionality.

# apt-get install alsa-base alsa-utils gstreamer0.10-alsa \
> gstreamer0.10-plugins-base xfce4-mixer
# apt-get install gstreamer0.10-plugins-good gstreamer0.10-plugins-bad \ 
> gstreamer0.10-ffmpeg

Adding a media player and support for editing MP3 ID tags can be done by installing two more packages.

# apt-get install parole thunar-media-tags-plugin

That is about it - obviously we could install a lot more packages to support IRC chat, CD burning, or e-mail and so on but which ones you choose is up to you.


Raspberry Pi is a trademark of the Raspberry Pi Foundation

This entry was posted in Linux and tagged , , . Bookmark the permalink.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.