Tuesday, October 6, 2009

Masochism ...

Objective : Whenever volumes are mounted, I see volume icons on my Desktop. I want to hide the icons because they mess with my wallpaper.

Method 1 : Find a GUI option.
Result : None present

So, after half an hour of grep-ing in ~ and lsof-ing, I found out that the option I need to set is probably hidden deep down into one of the huge gconf schemas.

 So, I started to learn the gconftool-2 tool. Its one nasty command.

# gconftool-2 --dump / > /tmp/gconf-dump
# wc -l /tmp/gconf-dump
96086 /tmp/gconf-dump

Crap! that huge!
So, I grep-ed for various keywords for another 15 min. Thats when I got a match.

# grep volumes /tmp/gconf-dump
(hiding other results for the purpose of sanity)

So, thats the key I have to flip. Pored over the man-page of gconftool-2 and here is the magic command:

# gconftool-2 --type bool --set /schemas/apps/nautilus/desktop/volumes_visible false

Similarly, you can also turn-off, trash_icon_visible, network_icon_visible (hides samba mounts), home_icon_visible and computer_icon_visible. and voila! A clean desktop!

You'll have to logout and login back again to see the changes. Although, I am sure there's better way. (Like to ask gconfd to reload the config). But, its 2:00am already and I need some sleep. So, I'll update this post tomorrow!



CDK said...

You do get a GUI editor for this ... its called gconf-editor ... sort of a regedit for gnome ... quite good ...

Jitesh Shah said...

I know.. I've tried that.. but it is very primitive. All it does is to show a nice tree view of the xml .. Doesn't help much to locate a key you want to search!:( Hell, "gconftool-2 dump" does the same!

by GUI, I meant a nice radio-button or check-box which I can tick ;)

Vedang said...

in ubuntu, there is a nice GUI called "Ubuntu tweak" which can do all this. (For Ubuntu readers) You can get the latest version (0.4.9) here: https://launchpad.net/ubuntu-tweak/0.4.x/0.4.9

But look at it this way, you got to learn so much! :)

Jitesh Shah said...

ubuntu-tweak is more of gnome-tweak rather than ubuntu-tweak .. so most of it works just fine on fedora or any gnome-based distribution

anyway, AFAIK, it uses gconftool-2 in the backend to tweak the gnome schemas.

@learning.. that was the whole point of it :)