How do I use the gconf editor?

I see some answers where people post to set a key in the gconf-editor, however there is no entry for gconf-editor in my menu.

How do I run it and how do I use it to set keys that people recommend?


Solution 1:

What is Gconf?

GConf is a system for storing application preferences. These preferences are stored in XML files under the user's home directory, ~/.gconf. Each preference is represented as a key-value pair.

GConf is meant to be a way for developers to easily store user preferences and system administrators to set default values for particular preferences. In most cases, there is no need for a user to edit Gconf keys directly.

The vast majority of keys correspond to entries in the various applications' preference menus. Though on occasion, developers will use Gconf keys as a way to enable undocumented features. These are "hidden" from users for a number of reasons. Sometimes the feature is still a work in progress. Other times it is a feature that the developer wants to do away with but still leave accessible to users that don't want to give it up. Frequently, the features are targeted at "power users," and the developer simply doesn't want to clutter up the normal preference dialog.

In some ways it is similar to Windows' Registry. One major difference is that, unlike the Windows' Registry, Gconf does not store system settings. It only stores application preferences. While editing Gconf keys may potentially cause minor issues with specific programs, it should never lead to system wide issues such as rendering your system unbootable. In fact, deleting the entire ~/.gconf directory will simply revert all programs using Gconf back to their defaults.

Managing Gconf from the command-line.

The program gconftool-2 allows the user to interact with Gconf from the command-line. It is often simpler to enter a one line command in the terminal than digging around in Gconf's GUI tool. For instance, if you would like to show the icon for you trash on the desktop simply run:

gconftool-2 --set /apps/nautilus/desktop/trash_icon_visible --type=bool true

This also illustrates what I meant by key-value pair above. In this case, the key is /apps/nautilus/desktop/trash_icon_visible which has a value of true.

You can perform a variety of operations with gconftool-2. If you'd simply like to see a key's value, use --get:

gconftool-2 --get /apps/nautilus/desktop/trash_icon_visible

If you'd simply like to reset a value to its default, use --unset:

gconftool-2 --unset /apps/nautilus/desktop/trash_icon_visible

gconftool-2 can be particularly useful for system administrators. For instance, /etc/gconf/gconf.xml.mandatory can be used to set mandatory preferences for all users. Further information on more advanced uses can be found with man gconftool-2 as well as in the GNOME Desktop System Administration Guide

How do I use the Gconf editor?

What was your question again? Oh, that's right: How do I use the Gconf editor?

gconf-editor is the graphical interface to manage Gconf settings. By default, it is not displayed in the menus. The easiest way to start it is by pressing Alt+F2 to bring up the "Run Dialog." Next, enter gconf-editor.

gconf-editor allows you to browse through the key-value pairs in a tree. Let's look at the example from above. Browse to apps > nautilus > desktop and you will see the trash_icon_visible key.

gconf-editor

  • Ubuntu docs on gconf-editor
  • GNOME docs on gconf-editor

Solution 2:

Alt+F2gconf-editor

Have an explore around it, it's somewhat similar to using regedit in Windows, except I find it's a bit more user friendly, and it won't kill your cat if you look at it funny.

Rather than using that to set keys though, you can use a command line tool 'gconftool-2' to set/edit/remove keys. I've found it pretty handy when setting URL associations for applications such as Spotify in Wine.