Pages

Wednesday, June 29, 2011

Set vino (Gnome Remote Desktop Settings) from the command line

Trying to configure Linux VMs for students today i found it was difficult to configure the Remote Desktop Settings from a script. I finally found the information in other places but it was spread out and difficult to find. By default the Remote Desktop found in many distro's can be configured graphically under Preferences -> Remote Desktop.

However to configure it from the command line you must run the following as root.

gconftool-2 --set --type bool /desktop/gnome/remote_access/enabled true
gconftool-2 --set --type list --list-type string  /desktop/gnome/remote_access/authentication_methods '[vnc]'
gconftool-2 --set --type bool /desktop/gnome/remote_access/prompt_enabled 0
gconftool-2 --set --type string /desktop/gnome/remote_access/vnc_password $Base64encodedPassword

The $Base64encodedPassword is just a base64 encoding and its easy enough to do.

Links

3 comments:

  1. Hi,
    Thanks for this, I tried this on my "GhostBS. 9.0-RC1 FreeBSD 9.0-RC1". All your steps except the last one worked. I presume an encoded password should be appended to step 4, but not sure how to go about creating an encoded password (still complete newbie)!

    But your post did help me narrow down my search better.

    Keep up the good work.

    Rav, UK

    PS: output for step 4:
    GhostBS# gconftool-2 --set --type string /desktop/gnome/remote_access/vnc_password $Base64encodedPassword
    Base64encodedPassword: Undefined variable.

    ReplyDelete
  2. Hello Anonymous, Yes the $Base64encodedPassword should be replaced with the base 64 encoded password you wanted to use. You could generate the base 64 ending at runtime or it might be simpler if you’re new to this to use a site like http://www.shell-tools.net/index.php?op=base64_enc and generate a base64 encoding and use that to get you started.

    Try to get it working by coping the password encoding from that site and see if that works; then you can add the encoding it yourself later.

    ReplyDelete
  3. Thanks again Chris, yes that worked, although I had to resort to rebooting (complete shutdown) the whole server to get it working, restarting just the gdm several times didn't help. could have been other issues at play, I guess.

    ReplyDelete

Please leave a comment; someone, anyone!