Use gconftool-2 to customize Gnome

You can fetch the values of any given key, but it’s rather hard to see the whole picture looking at it pixel-by-pixel or line-by-line.

Start up gconf-editor to browse Gnome’s gconf like a windows registry. Check out everything under “apps” and “desktop”. Almost anything you might want to do to customize Gnome is probably found in here.

gconf-editor

This is great for interactive customization, but what if you want to script it. Perhaps you have a multitude of changes to make or you want to create an RPM that installs some applets, or changes the look and feel? All you need is to define the type and provide the path to the key you want to set in the gconf registry.

Command-line gconftool-2 to the rescue!

I don’t like to see icons for computer and home on my desktop. Change a value or two and they disappear instantly.

gconftool-2 -t bool -s /apps/nautilus/desktop/computer_icon_visible false
gconftool-2 -t bool -s /apps/nautilus/desktop/home_icon_visible false

Set the desktop background. You could make a cron to do this at different times of the day or just to randomly choose from a group of pictures. The options really are endless.

gconftool-2 /desktop/gnome/applications/background/picture_filename "/pic.jpg"

One thing you may or may not like is Gnome’s automounting feature. You can turn that off with this one liner.

gconftool-2 -t bool -s /desktop/gnome/volume_manager/automount_drives false

Change the default terminal.

gconftool-2 -t string -s /desktop/gnome/applications/terminal/exec "mrxvt"

Or add to the gnome panel.

gconftool-2 -t string -s /apps/panel/objects/app/action_type "lock"
gconftool-2 -t string -s /apps/panel/objects/app/attached_toplevel_id ""
gconftool-2 -t string -s /apps/panel/objects/app/bonobo_iid ""
gconftool-2 -t string -s /apps/panel/objects/app/custom_icon ""
gconftool-2 -t string -s /apps/panel/objects/app/launcher_location "app.desktop"
gconftool-2 -t bool   -s /apps/panel/objects/app/locked false
gconftool-2 -t string -s /apps/panel/objects/app/menu_path "applications:/"
gconftool-2 -t string -s /apps/panel/objects/app/object_type "launcher-object"
gconftool-2 -t bool   -s /apps/panel/objects/app/panel_right_stick false
gconftool-2 -t int    -s /apps/panel/objects/app/position 33
gconftool-2 -t string -s /apps/panel/objects/app/toplevel_id "top_panel"
gconftool-2 -t bool   -s /apps/panel/objects/app/use_custom_icon false
gconftool-2 -t bool   -s /apps/panel/objects/app/use_menu_path false

Bonus points if you can figure out how to specify a negative value such as:

gconftool-2 -t int -s /apps/panel/toplevels/panel_0/x_right "-1"
Posted by admica   @   4 January 2011

Related Posts

2 Comments

Comments
Jan 21, 2011
3:29 pm
#1 Lammert Slofstra :

I would like to expand the gnome-panel from the commandline I used a command like this :
gconftool-2 –type bool –set /apps/panel/default_setup/toplevels/bottom_panel/expand true

I can find anything wrong with it maybe you can !

Gr.

From The Netherlands

Mar 25, 2011
6:44 am
#2 mucha :

gconftool-2 -t int -s /apps/panel/toplevels/panel_0/x_right ” -1″

not elegant, but working (add simple “space” before sign “-”)

Leave a Comment

Name

Email

Website

*

Previous Post
«
Next Post
»
Powered by Wordpress   |   Lunated designed by ZenVerse

Valid XHTML 1.0 Transitional