Gentoo Logo

The GNOME Configuration HOWTO

Content:

1.  What is GNOME?

The Project

The GNOME project is a free software project dedicated to the development of GNOME, a Unix/Linux desktop suite and development platform. The GNOME Foundation coordinates the development and other aspects of the GNOME Project.

The Software

GNOME is a desktop environment and a development platform. This piece of free software is the desktop of choice for several industry leaders. It is interesting both for business users, home users as well as developers.

The Community

Like with any big free software project, GNOME has an extensive user- and development base. GnomePlanet is a popular blog aggregator for GNOME hackers and contributors whereas Developer.Gnome.Org is for the GNOME developers. GNOME Library contains a huge list of GNOME resources for end users. The World of GNOME is also a popular aggregator for GNOME-related news.

2.  Installing GNOME

What do you need?

Important: First read and follow the instructions in the X Server Configuration Howto to setup your X environment.

Before you start installing GNOME, you might want to edit your USE variables. Make sure that X, gtk, and gnome are in your USE variable listed in /etc/portage/make.conf. If you want support for dbus, a system message bus Gnome uses extensively, add it to your USE flags. If you don't want KDE support (the other big desktop environment), remove qt4 and kde.

Code Listing 2.1: Example USE in /etc/portage/make.conf

USE="-qt4 -kde X dbus gtk gnome"

You can add the branding USE flag to get a lovely Gentoo-branded splashscreen instead of the default Gnome splashscreen:

Code Listing 2.2: Enabling Gentoo branding

# echo "gnome-base/gnome-session branding" >> /etc/portage/package.use

Note: If you use the desktop profile, these USE flags will be set for you. You can check your profile by running eselect profile list and eselect profile set <profile-name> as root.

Once done, start installing GNOME by emerging gnome:

Code Listing 2.3: Installing GNOME

# emerge gnome

You can also opt for a minimal Gnome installation using gnome-light. If you do so, you will have a lightweight Gnome installation without the additional tools that a full Gnome installation provides so you might need to install additional packages afterwards.

Code Listing 2.4: Installing a minimal GNOME environment

# emerge gnome-light

This will take a while, so you might want to start reading all those books your mother bought you but you never opened. Done? Great, now update your environment variables:

Code Listing 2.5: Updating environment variables

# env-update && source /etc/profile

Next we'll clean up the remaining services and user groups.

Code Listing 2.6: Setting up the DBUS service

# /etc/init.d/dbus start
# rc-update add dbus default

Check if the plugdev group exists. If it does, it is adviseable to make yourself member of that group, but this is optional (the group is not that common anymore).

Code Listing 2.7: Checking and adding users to plugdev

~# getent group plugdev
plugdev:x:104:

# Substitute yourUserName with your user name ;-)
~# gpasswd -a yourUserName plugdev

First Impressions

Let us first take a look at what we just built. Exit your root shell and log on as a regular user. We will configure our session to run GNOME when we issue the startx command (see also Using startx in the X Server Configuration Howto):

Code Listing 2.8: Setting GNOME as the default desktop environment

$ echo "exec gnome-session" > ~/.xinitrc

Starting with gnome-base/gnome-session-2.26.2, you will need to prepend the XDG_MENU_PREFIX variable to get the Gnome menus if you're using the ~/.xinitrc method to start your desktop. (If you're not using ~/.xinitrc, it will be handled automatically for you; no additional configuration is needed.)

Code Listing 2.9: Prepending XDG_MENU_PREFIX to ~/.xinitrc

$ sed -i '1i\export XDG_MENU_PREFIX=gnome-' ~/.xinitrc

Now start your graphical environment by running startx:

Code Listing 2.10: Starting GNOME

$ startx

If all goes well, you should be greeted by GNOME. Congratulations. Now let us take a look at how you can configure GNOME to suit your needs.

3.  Configuring GNOME

GNOME's Graphical Login Manager

If you want the GNOME Display Manager (GDM) to run automatically when you boot (so you can log on graphically), you must add the xdm init script to the default runlevel:

Code Listing 3.1: Adding xdm to the default runlevel

# rc-update add xdm default

Now edit /etc/conf.d/xdm and alter the DISPLAYMANAGER variable.

Code Listing 3.2: Editing /etc/conf.d/xdm

DISPLAYMANAGER="gdm"

If you installed Gnome using the gnome-light package, you will need to install gdm too (as it is not defined as part of the gnome-light package).

Code Listing 3.3: Installing the gdm application

# emerge gdm

If you reboot now, the GNOME Display Manager will prompt you for your username and password and will default to using GNOME as Desktop Environment (even though you will have the option of selecting a different one of course, choosing from those available in /usr/share/xsessions/). Thus, if you use GDM, you don't need to edit ~/.xinitrc.



Print

Page updated December 9, 2012

Summary: A frequently used environment is GNOME. This HOWTO tries to describe all aspects of GNOME, including installation, configuration, usage, ...

Sven Vermeulen
Author

Lars Strojny
Editor

Joshua Saddler
Editor

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.