It’s late at night (or early in the morning to be precise); the exhaustion of preparing for a Physics exam toying with my patience, the Chennai heat getting on my nerves. And worst of all, terrible music playing in the backround, courtesy my friend who lacks a sense of aesthetics (no offense. Well, he never reads this blog anyway, so it doesn’t matter). There’s only way to save my sanity; turning on my Rhythmbox DAAP share (that’s same thing as iTunes music sharing), so that I can listen to something tangible on his computer.
Luckily, due to my persistent efforts, he is running Linux (Ubuntu Hardy Heron), so I pull up a terminal and try to SSH through. Bad move; I can’t remotely open up rhythmbox on my box. I could try running SSH with X11 forwarding (ssh -x), but that would just lack elegance (and there’s nothing more sacred then that). I decide to try using remote desktop (via Vinagre). Unfortunately, it gives a blank screen, and I realise why – I’ve set it to require approval before you login. Enter GConf.
GConf is somewhat like the Windows registry, only not so arcane. It stores all all the keys in a hierarical format that can be accessed either through the ‘gconftool-2′ (which I used), a directory structure and xml files (which isn’t right for this application. More on this later), or the graphical editor, gconfeditor-2 (which I couldn’t use). There are two things you need to save your soul if you are in a predicament such as mine; the key that lets you remote access, and the right command. It ends up that all the information is stored in a very aptly named path called remote_access. Finding that out was a simple grep away.
$> gconftool-2 -R / |grep remote
The -R flag says recursively go through the ‘registry’. The / gives you the starting point, and quite intuitively, it implies the root directory. You’ll end up finding some vague entries in a path /desktop/gnome/remote_desktop. Jackpot!
$> gconftool-2 -R /desktop/gnome/remote_access
authentication_methods = [vnc]
lock_screen_on_disconnect = false
use_alternative_port = false
require_encryption = false
view_only = false
prompt_enabled = true
icon_visibility = client
enabled = true
local_only = false
alternative_port = 5900
This is pretty straightforward. I just have to change prompt_enabled to false, and I’m through (Hallelujah). And that’s a simple:
$> gconftool-2 -t bool -s /desktop/gnome/remote_access/prompt_enabled false
The -t is to specify the type, which is boolean or ‘bool’.
The neat thing about using the GConf tool (gconftool-2) is that it automagically updates the application/applet you’ve modified (FYI, it uses DBus). This is why changing the entry in the directory structure manner isn’t of use to us right now. However, for the sake of completeness, you could modifiy this tag by editing ~/.gconf/desktop/gnome/apps/remote_access/%gconf.xml.
There are lots of neat things you can do with your GConf, like setting up global keybindings or changing the look of certain panel applets / programs. I’ll try and post on these at a later time.