Technical notes, tips, howtos, etc

Friday, February 6, 2009

Ubuntu/Gnome remote remote desktop activation

There may come a time when you need to get to your Ubuntu desktop remotely, but the Remote Desktop access is disabled. Fortunately, you can control these settings with the gconftool-2 utility (assuming you can ssh to the server of course :-). There are 3 vital settings that will need to be changed:

gconftool-2 --type boolean -s /dekstop/gnome/remote_access/local_only true

This setting will require you to connect to your remote machine through an ssh (or vpn) tunnel. If you leave this out, anyone that can reach your machine will be able to control it. Not Good(tm). With this setting, people with accounts have access, so still be cautious.

gconftool-2 --type boolean -s /dekstop/gnome/remote_access/prompt_enabled false

Which prevents the confirmation dialog from popping up.

gconftool-2 --type boolean -s /dekstop/gnome/remote_access/enabled true

Which enables the remote service.

Optionally, but recommended, set a password for the connection:

gconftool-2 --type list --list-type string --set /desktop/gnome/remote_access/authentication_methods '[vnc]'

gconftool-2 --type string --set /desktop/gnome/remote_access/vnc_password `echo -n somepass | base64`

If you don't have base64 installed, you can create the encoded string and replace the `echo...` statement with the string there.

Now connect by opening an ssh session with the vnc port forwarded:

ssh -L 15900:localhost:5900 user@yourhostname

Finally point your vnc client to localhost on port 15900, and you're good to go.

update: If you have a X server installed on the local system, just use 'ssh -X' and run 'vino-preferences' to see the standard remote access dialog.



.

No comments: