Menu

23 November 2008

gconftool to play with settings

gconf-editor is a very good utility where one can change behavior or setting or preference of any application using click. today I discovered its command line version --
gconftool-2
using this you can set behavior to preference of any application in command line or in shell script.
for example , just after installation of fedora , i use to open Nautilus (the file browser) and open its preference to set it "always open in browser mode" and 'single click to double click' behavior. Same with gedit and other tool to make setting.
But same thing you can perform with gconftool-2 like this..


gconftool-2 --set "/apps/nautilus/preferences/always_use_browser" --type bool TRUE
gconftool-2 --set "/apps/nautilus/preferences/click_policy" --type string "single"

do not use sudo,, you are making setting for you and not root.

you can bundle up such command to make your own theme which you can install from shell. (actually i got this idea form here - http://ubuntu.online02.com/files/XpGnome.zip - )

The format is very simple

gconftool-2 --set KEY_NAME --type TYPE VALUE

you need to browse in gconf-editor to know what is key name for a particular setting.

UPDATE :
* gconftool-2 -R will list all the setting. So you can save all initial settings. Like
$
gconftool-2 -R / > save.txt
* Search a given key,
$ gconftool-2 -R / | grep screensaver

more at : http://ubuntu-tutorials.com/2008/01/10/gconftool-2-gconf-editor-from-the-shell/
http://geekblok.com/2008/09/09/saving-time-with-gconftool-2/
http://linux.die.net/man/1/gconftool-2

1 comment:

saurabh1403 said...

nice blog and quite useful information. Thanks.