GNOME, the default Ubuntu desktop, is a powerful environment with a lot of features. Here is the information you need to quickly get up to speed on how to customize it.
Recently, the GNOME desktop seems to have lost some features. Looking around on mailing lists and reading people's blogs, you'll often find gripes about how some feature that was someone's personal favorite no longer exists. In reality, GNOME has far more features and configuration options available now than it ever had in the pastthey're just hidden from sight, with users shown only the most commonly used options in the standard interface. This has the effect of making GNOME simpler and easier to use for the average person, but it also makes it a prime target for getting under the hood and tweaking the deskop to suit your own tastes if you're an advanced user and want everything to work just the way you like it.
Configuration Nirvana: the Configuration Editor
GNOME provides a central mechanism called GConf for storing user preferences on behalf of individual applications. Instead of writing out their own preferences files and then parsing them again to read values back in, applications can simply use the GConf API. This has a number of benefits, such as the ability to share preference settings among applications and have preferences applied immediately to all running applications.
The GConf database is structured like a simple filesystem, containing keys organized into a tree hierarchy. Each key can be a directory that contains more keys, or it can have an actual value of its own. For example, the key /apps/nautilus/preferences is a key that contains other keys (in a similar manner to a directory), and inside it is the /apps/nautilus/preferences/background_color key with a default value of #ffffff. While keys are expressed as paths, as in a filesystem, they don't actually exist on disk in that way: they are stored in an XML document, with the path representing the nested items within it.
GConf has several tools that you can use to directly browse, query, and manipulate the database using either a GUI or the command line. Configuration Editor provides a very nice graphical interface to the database, but it doesn't appear in Ubuntu's Applications menu by default, so you can launch it from the command line:
$ gconf-editor
Alternatively, you can edit the Applications menu and add it. Go to
Applications – Accessories - Alacarte Menu Editor, select System Tools, and turn on Configuration Editor
Once you close the Menu Editor and return to the Applications menu, you'll find a new entry for Configuration Editor under System Tools.
When you open Configuration Editor, you'll notice that there is no Save button and all changes you make are applied immediatelyso be careful! Browse around to see what options you can set for various applications, including Nautilus (the GNOME file manager) and Metacity (the default window manager). To get started, here are some specific options you can tweak with the gconf-editor:
Icons on desktop
The default Ubuntu desktop configuration is totally empty: no trash can, no computer icon, no home icon. In Configuration Editor, go to /apps/nautilus/desktop to see options to turn on or off a variety of desktop icon
Empty trash without warnings
Emptying the trash generates an annoying confirmation message that has to be clicked, but you can suppress the confirmation by turning off /apps/nautilus/preferences/confirm_trash.
And if you want to be able to bypass the Trash entirely and delete files by right-clicking on them, turn on apps/nautilus/preferences/enable_delete to add a "Delete" option to the right-click contextual menu. Now you can delete items immediately without sending them to the Trash first!
Open files with a single click
GNOME's default behavior is for a single-click to select files and a double-click to open them, but KDE and some other environments use a web-like "hot links" metaphor, in which files open on a single click. To enable the same behavior in GNOME, go to /apps/nautilus/preferences/click_policy and replace the double value with single.
Scripting GConf
Automating changes to the GConf database is easy with tools such as gconftool, which is a command-line GConf client. Use it to read or set specific values in the database as well as explore its structure.
Recursively walk through parts of the database structure by specifying a starting point and using the -R (recursive read) option:
$ gconftool -R /apps/nautilus
Get the attribute type of a specific key using the -T (type) option:
$ gconftool -T /apps/nautilus/preferences/enable_delete
Read specific values by explicitly setting the key and using the -g (get) option:
$ gconftool -g /apps/nautilus/preferences/enable_delete
Write values by specifying the data type, using the -s (set) flag, the key, and the new value:
$ gconftool -t bool -s /apps/nautilus/preferences/enable_delete true
Writing values like this is a good way to demonstrate that changes really are immediate. Open up Configuration Editor and browse to /apps/nautilus/preferences/. Then watch the "enable_delete" checkbox while you set and unset the value using gconftool.
Once you get started, you'll find that your imagination is the limit when it comes to scripting GConf! For example, you could write a script that pulls down a webcam image every 10 minutes and then calls gconftool to set it as your desktop background. Make sure the image filename is different each time; otherwise, GConf won't see the change, and the background won't change:
$ gconftool -t string -s /desktop/gnome/background/picture_filename \\
/home/jon/CamImages/Pic53332.jpg
Or you could set up a script to use XPlanet to generate an updated view of Earth and set it as your desktop background, and then call it from cron every 30 minutes. Install XPlanet:
$ sudo apt-get install xplanet xplanet-images
Then create a script to execute it. If you don't know the latitude and longitude of your city, you can probably find it (or a nearby city) in Wikipedia (http://www.wikipedia.org). Just adjust the following script to suit your location and screen resolution:
#!/bin/sh
rm -f /tmp/earth-*.jpg;
IMAGE=/tmp/earth-\Qdate +%s\Q.jpg;
nice xplanet -num_times 1 -output $IMAGE -geometry 1280x1024 \\
-longitude 96 -latitude 0;
gconftool -t string -s /desktop/gnome/background/picture_filename $IMAGE;
You can also use gconftool as a convenient way to add new URI handlers to GNOME. For example, to specify that you want tel: links to execute your Vonage client and initiate a call, you can run the following commands:
$ gconftool -t string -s /desktop/gnome/url-handlers/tel/command \\
"bin/vonage-call %s"
$ gconftool -s /desktop/gnome/url-handlers/tel/needs_terminal false -t bool
$ gconftool -t bool -s /desktop/gnome/url-handlers/tel/enabled true