Running gconftool-2: gconf-editor From Shell


Basically gconftool-2 is to be done is allow you to set the gnome environmet tweaks (font size, the sound mixer settings, taskbar size / location, etc.) from the shell vs. using graphical tools.

gconftool-2 example

Below is an example of using the gconftool-2 to set the default font size to 8, because I've done in the EeePC.

$gconftool-2 - set/apps/nautilus/preferences/desktop_font - type string "Sans 8"

$ gconftool-2 - set/desktop/gnome/interface/document_font_name - type string "Sans 8"

$ gconftool-2 - set/desktop/gnome/interface/font_name - type string "Sans 8"

$ gconftool-2 - set /apps/Metacity/general/titlebar_font - type string "Sans Bold 8"

$ gconftool-2 - set /desktop/gnome/interface/monospace_font_name - type string "monospace 8"

The above command is the same with the launch gconf-editor (ALT-F2: gconf-editor), navigate to the path listed above and change the values listed. Although I very grateful that we have a graphical tool to edit these things, you tell me which is faster?

gconftool-2 basics

Basic structure using gconftool-2 is as follows:


$ gconftool-2 - set/path/to/settings - the type of "value"

In/path/to/settings can be found by using the graphical tool (unless someone can tell me an alternative method). This can also be found in the same place. For example, let's say I want to change the value to switch the screen when the screensaver is in use. I can open gconf-editor GUI tool, navigation through the menu tree "apps> gnome-screensaver" to search for "lock_enabled" value. Usually, by checking the box or not we will move this value.

Using gconftool-2, we can achieve the same thing with:


$ gconftool-2 - set/apps /gnome-screensaver/lock_enabled-type bool 1 "

Now I understand that at this time we do not technically any more quickly because we have to look up in the GUI, but it was found after the first time you must first game of the second time. This is good to install multiple machines, or if you reinstall your computer regularly and want to script your settings back into place.

Available on the basic structure of our value-set, providing a path to the value of what we want to change, and then determine the type. In this case he is dead or on the boolean value. In other cases, such as with the example above, is a string that must be defined. You can find out the type of value (integer, boolean, string, etc.) use your item by double-clicking in the graphics application.

I have been able to find values in the gconf-editor or gconftool-2. Start from the right mixer for toggling volume settings to determine the size of a particular taskbars.

I hope the basic example above can provide.

Happy Testing....!!!

No comments:

Post a Comment

Please Comment...!!