Team LiB
Previous Section Next Section

Hack 48. Compile a Bleeding-Edge GNOME Desktop

The use of binary packages has transformed Linux into a convenient system in which the software you need is readily available in RPM or Deb form. Although these packages are perfectly fine for the majority of users, they have a few limitations. The first issue is that binary packages are generically built for the widest range of hardware, which means they are not as optimized for your computer as they could be. Another issue is that availability of the latest software in binary form depends on your distributor and how quickly they can build the packages. The solution to these two common problems is to use the source and compile the code yourself. Although the idea of compiling code might send a shiver down the spine of even the bravest user, the method of compiling the latest version of GNOME is actually surprisingly simple.

The process of compiling GNOME used to be fraught with difficulties, and the great many modules took time, effort, and patience to compile. As more developers came on board, a few sensible hackers realized the process needed to be improved and created a GNOME compilation tool called GARNOME (, which provides a simplified method of compiling the code. GARNOME has been actively developed for a few years now, and you can compile a lot of GNOME software using it.

6.5.1. Prepare Your System

Before you install and configure GARNOME, first you should install the build tools required to compile the main GNOME desktop. You probably already have most of these tools, but for the sake of thoroughness, here is the complete list:

  • A shell (preferably bash)

  • wget (required to download the tarballs)

  • gzip and bzip2 (required to extract the tarballs)

  • binutils, gcc, g++, and make (required to compile)

  • bison, flex, gettext, diff, and patch

  • autoconf, automake, and libtool

Besides these tools, you need to obtain some additional software if you want to use certain packages that are available in the GARNOME system. These tools include:

  • fam (required to compile gnome-vfs)

  • bzip2-devel (required to compile gnome-vfs)

  • samba (required to compile gnome-vfs)

  • libpng, libjpeg, and libtiff (required to compile Nautilus)

  • db4-devel (required to compile Evolution)

  • krb5-devel (required to compile Evolution)

  • openldap-devel (required to compile Evolution)

  • gnutls (required to compile vino)

With this software installed, you should download the latest stable version of GARNOME from the projects web site and unzip it into a directory on your disk. Inside this directory is a main configuration file called This file has a lot of possible settings, each well documented in the file itself. Most of the settings relate to different ways the packages can be built. For even more specific configuration, you can also edit the makefiles inside the different subdirectories in the GARNOME source directory.

6.5.2. Compile the Code

Within your GARNOME directory are a number of subdirectories such as desktop, fifth-toe, hacker-tools, mono, and office. Each directory contains scripts that will build the relevant software. For example, the main GNOME desktop is present in the desktop directory, Mono is in the mono directory, etc. The README file included with GARNOME explains the contents of these modules in detail.

To compile the code, enter the directory of your choice and run make. As an example, to compile the main GNOME desktop, do the following:

foo@bar:~$ cd desktop/
foo@bar:~$ make paranoid-install

GARNOME downloads the required source code and compiles it in the right order. This process can take quite some time, depending on the speed of your computer. When it is complete, the compiled software is installed in a garnome directory created inside your home directory. If you prefer the installed software to be located elsewhere, you can edit the main_prefix setting in the configuration file to specify a new location.

The final step is to launch your new GNOME desktop. To do this, you need to write a small script that you can call to set up your environment variables and log you in to the desktop. Add this script to a file called garnome-session and save it to your home directory, such as ~/garnome-session:

#!/bin/sh GARNOME=$HOME/garnome
exec $GARNOME/bin/gnome-session

Now you can call this script by adding the following to .xinitrc in your home directory:

#!/bin/sh exec

This ensures that when you type startx, the new desktop will be started. If you use GDM as a graphical login manager, you need to place these two lines to .xsession in your home directory.

If you want all users on the system to have access to the installation, ensure that the main_prefix setting in the configuration file is a generic file path that all users can access (such as /opt/gnome).

    Team LiB
    Previous Section Next Section