Installing Xfce

Benedikt Meurer

os-cillation
System development
Software developer


This manual describes the required steps in installing Xfce 4.2.0 on your system using the graphical installation wizard provided by os-cillation.

This document is distributed under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

January 2005


Table of Contents

Introduction
Preparations
Starting the installation
The graphical installation wizard
Postinstallation Tasks
Setting up GDM
Setting up KDM
Setting up dtlogin (Unix)
Setting up Gtk+ themes
Installing the goodies
Installing the Terminal
Enabling transparency and window shadows
Uninstalling
Frequently asked questions
Support and Feedback

 

Introduction

Installing software from source was mostly pain with Linux/Unix systems in the past. Even with proper autoconf'ed software packages, the process of configuring, building and installing is an error-prone task, especially if you want to configure the software in a custom way, it can be disturbing to dive into the software documentation just to figure what is required to enable this option. In addition its an uneasy task to keep track of installed files once more and more software packages are installed from source.

This installer was developed to address the issues mentioned above. It allows for smooth installation and uninstallation of software from source. This offers several advantages over alternative approaches:

  • It doesn't suffer from the dependency problems that arise with most binary based packaging systems, because everything is configured and build for the specific target system. This offers a great amount of portability.
  • It offers an intuitive and thereby easy to use wizard based graphical user interface.
  • It features an easy to use uninstallation tool, that allows you to cleanly remove the Xfce Desktop Environment from your computer later on.

Preparations

Before you start the installation process, you need to make sure that your system is setup properly to run the installer. The installer itself requires a properly working Gtk+ 2.2 (or above) installation, whereupon both the Gtk+ runtime files and the Gtk+ development files are required. Debian users should check if the package libgtk2.0-dev is installed, whereas RedHat, Fedora, Mandrake and SuSE users should check gtk2-devel.

In addition to the Gtk+ package, the Xfce desktop environment also requires the libraries libICE, libSM and libXpm. These files are distributed as part of the X11 distribution. Debian users need to install the packages libice-dev, libsm-dev and libxpm-dev. RedHat, Fedora, Mandrake and SuSE users need either XFree86-devel or xorg-x11-devel dependent upon the X11 distribution - XFree86 or XOrg - in use, while Mandrake users should also make sure that the package libxpm4-devel is installed.

Furthermore, the Disk based hashtables library written by Edscott Wilson Garcia is required by several Xfce components. It can be downloaded from the SourceForge Project page. Some distributions also ship a DBH package, for example, Debian users need the package libdbh1.0-dev, while FreeBSD users will have to install the port databases/dbh; Fedora users should install the package dbh-devel.

Some Linux distributions have been reported to have obscure dependencies, which allow you to install the development packages mentioned above, without actually having a working build environment. Please check that you have a working gcc (GNU C Compiler) and a working cpp (C Pre Processor) installed on your system prior to running the installer. For example, if you use Fedora FC3, you need to make sure that the package named cpp (which was at cpp-3.4.2-6.fc3 at the time of this writing) is installed on your system. In case of SuSE Linux, the packages in question are usually named gcc and cpp as well, although the exact name may differ.

Starting the installation

First of all, you need to download the installer file xfce4-4.2.0-installer.bin. See the Installer Xfce page for download locations.

Once downloaded, you need to mark the file xfce4-4.2.0-installer.bin executable using the command:

$ chmod +x xfce4-4.2.0-installer.bin

The remainder of the installation process depends upon where you plan to install Xfce. You can either choose to install Xfce system-wide for all users (this is the preferable option) or you can choose to install Xfce for your user account only (most likely in some place below your home directory). Installing Xfce system-wide requires root access to the machine and therefore involves the following commands:

$ xhost +localhost
$ su
# ./xfce4-4.2.0-installer.bin

If the installer tells you that it is unable to connect to your X server, try the following commands instead:

$ xhost +localhost
$ su
# env DISPLAY=:0 ./xfce4-4.2.0-installer.bin

You can also use sudo to run the installer with root permissions (this requires you to setup sudo properly first, see the supplied documentation for details):

$ sudo ./xfce4-4.2.0-installer.bin

In case you don't have root access to the system or just don't want to install Xfce system-wide, you need to run the installer as user, using the command:

$ ./xfce4-4.2.0-installer.bin

The installer now verifies the integrity of the downloaded file, extracts the installation wizard and the packaged software (this may take a while depending on the I/O performance of your computer) and performs some other steps required for the installation process. In case all these operations are successful, the output given on the terminal should look like this:

Verifying file integrity... OK.
Extracting the installer... OK.
Checking for usable C compiler... gcc
Checking for usable C++ compiler... g++
Checking for GNU make... gmake
Checking for package config tool... pkg-config
Checking for GLib (GModule) >= 2.2.0... detected 2.4.8 in /usr/local
Checking for Gtk+ >= 2.2.0... detected 2.4.14 in /usr/X11R6
Compiling installer-gui... OK.
Running installer-gui...

In case of a problem, the installer will report an error here and write detailed information about problem to the file .xfce4.installer-log in your home directory. Please include the relevant parts of this file, when reporting problems to the forum.

A common problem is that the installer is unable to find the Gtk+ installation on your system. This can have several causes, whereupon the most prevalent cause is that you forgot to install the Gtk+ development files along with the runtime files, read the section called “Preparations” for details on how to fix this problem. If you are sure that you installed the Gtk+ development files, but the installer keeps on telling that it is unable to detect Gtk+, you may need to set the environment variable PKG_CONFIG_PATH to tell the installer where to find your Gtk+ installation. For example, say you installed Gtk+ into /opt/gtk2, you may need to execute the command

PKG_CONFIG_PATH="/opt/gtk2/lib/pkgconfig:$PKG_CONFIG_PATH"
export PKG_CONFIG_PATH

prior to running the installer.

If everything goes well you will be presented with the graphical installation wizard. See the next section for details on the installation wizard.

The graphical installation wizard

Once the installation wizard starts up, it will display an introduction screen with information about the software that is going to be installed - Xfce Desktop Environment 4.2.0 in this case - and where to ask for help if trouble strikes back. Click Next to continue with the installation.

Welcome screen

The next screen checks if all requirements for the successful installation of the Xfce Desktop Environment are met. Besides the requirements listed above, you need libxml2 (both runtime and development files), the everything-to-postscript converter a2ps and the ICE authorization helper tool iceauth, which is part of the X11 distribution. You cannot continue from here until all of the requirements are met.

Please make sure that you install libxml2, not libxml1, as Xfce really requires libxml2. Debian users need the package libxml2-dev, while RedHat, Mandrake and SuSE users need the package libxml2-devel. FreeBSD users need to install the port textproc/libxml2.

System requirements screen

Once all of the system requirements are met, you can choose the features you want to include with this build. Select a feature from the list to see its description.

Features screen

Now you need to specify the location where you plan to install Xfce to. If you started the installer as superuser you can choose virtually every directory you like. If you started the installer with your user account, you are mostly limited to locations below your home directory.

If you have Xfce installed already, e.g. say you have installed Xfce 4.2RC3 using the installer, and want to upgrade this installation to Xfce 4.2.0 now, just enter the same path here, that you used for the installation of Xfce 4.2RC3 and the installer will take care of upgrading everything properly.

Prefix screen

The setup for the installation is finished and the installer is ready to build and install Xfce now.

Build preparation screen

Xfce is now build and installed on your system, this will take a lot of time - around 30 minutes on decent i386 machine. You will be present with a button Error log if something fails. Click the button to see the log messages.

Building and installation screen

If the installation succeed, you will be prompted to complete the installation wizard, just click Done here. The installer will cleanup all temporary files used during the installation and terminate itself afterwards.

Finished screen

Postinstallation Tasks

Setting up GDM

If you use the GNOME Display Manager (gdm) to start your X session, and did not select the option Setup Display Managers during the installation or if for some reason the installer was unable to setup gdm properly, then you will have to manually create a .desktop file to teach gdm about your fresh Xfce 4.2.0 install.

A sample xfce42.desktop file is generated in $PREFIX/share/examples (where $PREFIX is the prefix you chose) during the installation already. It is usually enough to simply copy the example file to the Sessions directory used by gdm; this directory is usually located in /etc/dm/Sessions, /etc/X11/gdm/Sessions, /usr/share/xsessions, /usr/X11R6/share/gnome/xsessions or some other location, refer to the documentation of your system for details. You need to restart gdm after you copied the file.

Lets say, you installed Xfce into /usr/local and your system looks for available sessions in /usr/share/xsessions, then you will need to perform the following step (as superuser) to register Xfce with gdm:

cp /usr/local/share/examples/xfce42.desktop /usr/share/xsessions/xfce42.desktop

Setting up KDM

If you use the KDE Display Manager (kdm) to log in to your X desktop, and you did not select the option Setup Display Managers during the installation or if for some reason the installer was unable to setup kdm properly, then you will have to manually create a .desktop to teach kdm about your new Xfce 4.2.0 installation. First, you need to locate the directory where kdm searches for its .desktop files. The commands

kde-config locate kde.desktop
locate mwm.desktop
echo `kde-config --expandvars --install data`/kdm/sessions

may help you to find locate directory. Common locations are /usr/share/apps/kdm/sessions or /usr/local/share/apps/kdm/sessions. Once you found the kdm sessions directory, you need to create a new file xfce42.desktop in this directory, with the following content:

Example 1. An example xfce42.desktop file

[Desktop Entry]
Encoding=UTF-8
Type=XSession
Exec=/usr/local/bin/startxfce4
TryExec=/usr/local/bin/startxfce4
Name=Xfce 4.2
Comment=The Xfce 4.2 Desktop Environment
Comment[de]=Die Xfce 4.2 Desktop Umgebung

If you didn't install Xfce into /usr/local, then you'll have to adjust the Exec and TryExec lines to match your installation.

Now you can login to your new Xfce desktop using kdm. If Xfce doesn't show up in kdm afterwards, check the paths you put in the xfce42.desktop file and try to restart kdm.

Setting up dtlogin (Unix)

The installer tries to automatically detect a CDE installation on Unix systems if run as root and installs the following files (if not already present):

/usr/dt/config/Xsession.xfce4
/usr/dt/config/Xsession.xfce42
/usr/dt/config/C/Xresources.d/Xresources.xfce4
/usr/dt/appconfig/icons/C/Xfce4logo.pm

Once the installation completed you can simply select Xfce 4.2 Desktop from dtlogins Sessions menu to log into your newly installed Xfce. You might need to force dtlogin to reread the list of installed sessions first.

Setting up Gtk+ themes

You may also want to install the additional Gtk+ user interface themes that ship with Xfce. They are available as a separate installer here.

Installing the goodies

You may also want to install the additional goodies for Xfce - a collection of useful and neat plugins for the Xfce panel. They are available as a separator installer here.

Installing the Terminal

In addition, there is an installer for the Terminal - which is an advanced and easy to use terminal emulator for Xfce - available from the Installer Terminal page.

Enabling transparency and window shadows

If you built Xfce against Xorg 6.8.0 or above and selected the feature Composition manager during the installation, you can now go on and enable transparency and window shadows in Xfce.

First of all, the Composite extension has to be activated in your /etc/X11/xorg.conf using the following section:

Section "Extensions"
  Option "Composite" "Enable"
EndSection

Be sure to restart your Xserver afterwards. On next login, you should see window shadows already and the panel should be transparent when the mouse pointer is outside the window area.

You can make individual windows transparent or opaque using the small utility transset which is available from the freedesktop.org CVS Server or as part of your Linux distribution. After installing transset you can simply run it and click on a window to make it transparent. You can choose how much transparency you want. For example

$ transset .5

will give 50% transparency (allowed range is 0 to 1, whereupon 0 means 100% opacity).

Please be aware that the Xorg Composite extension is still under development, and still includes quite a few bugs. Using the composition manager can notably slow down your working environment if your video card does not support the RENDER extension in hardware. It is known to work well with NVidia graphic cards using the nvidia driver, especially if you add the line

Option "RenderAccel" "true"

in the Device section of your xorg.conf. But take note, that Xinerama or TwinView do not play well with Composite, so, for now you can either use DualHead or Composite with the nvidia driver.

Uninstalling

If you decide to uninstall Xfce later on - though we doubt you will want to do this once you discovered the strength of Xfce - run the command

$ xfce4.uninstall

with the same user you installed Xfce earlier (e.g. prepend sudo if you installed as root). You will be presented with a graphical uninstallation wizard. The uninstallation process will start once you click Next, so be sure to check that you really want to uninstall Xfce before clicking Next.

Uninstall screen

Once confirmed, the uninstaller will start to remove the Xfce Desktop Environment from your system.

Uninstall screen

Frequently asked questions

Installation fails with "C++ preprocessor fails sanity check"

This error message tells you that the configure script was unable to verify that the C++ preprocessor is setup properly on your system. You can most probably fix this problem by installing the g++ package for your distribution.

Installer fails with "Unable to connect to Xserver"

For some reason the installation wizard is not able to connect to an Xserver, which is required for the installer. This usually happens when you use su, and su in turn doesn't pass the DISPLAY environment variable properly. Try to use the commands

$ xhost +localhost
$ su --preserve-environment
# ./xfce4-4.2.0-installer.bin

or

$ xhost +localhost
$ su
# env DISPLAY=:0 ./xfce4-4.2.0-installer.bin

instead (replace :0 with your display name if required).

Support and Feedback

To report a problem or make a suggestion regarding the installer or this manual, use the os-cillation forum at http://www.os-cillation.de/cgi-bin/yabb/YaBB.cgi#installer_cat or point your IRC client to irc.freenode.net, join the channel #xfce and ask for help.

In case you want to request a new feature, please make clear why you consider it a worth addition for the installer. It is more likely that a new feature gets added if you provide good arguments for the feature.