Thursday, October 22, 2009

HOWTO: Control the gnome VNC vino-server from the command line - Ubuntu Forums

HOWTO: Control the gnome VNC vino-server from the command line - Ubuntu Forums: "HOWTO: Enable and control the gnome VNC vino-server from the command line
CAVEAT: A user must already be logged into the desktop on the target machine for this to work

Here is a cool trick for remotely enabling the gnome vino VNC server (assuming that it's already been installed and configured) on a box that you only have SSH access to.

Log into the target system using SSH, and run the following command:
Code:

gconftool-2 -s -t bool /desktop/gnome/remote_access/enabled true

You can also monkey with the vino server options by editing this file

/home/<userhomedir>/.gconf/desktop/gnome/remote_access/%gconf.xml

Let's say you want to disable the 'Ask you for confirmation' setting, or change the password.

Easiest way to do it:

1) On your own Ubuntu box; Go to System => Preferences => Remote Desktop. and configure the Remote Desktop Preferences to your liking, then click close.

2) Navigate to ~/.gconf/desktop/gnome/remote_access/ in your home directory, open up the %gconf.xml file, and copy the contents.

3) Establish an SSH connection to the remote box, change directory to /home/<userhomedir>/.gconf/desktop/gnome/remote_access/ directory, and backup the existing %gconf.xml file.
Code:

mv %gconf.xml %gconf.xml.bak

4) Create a new %gconf.xml file,
Code:

vi %gconf.xml

then paste in the contents for your own %gconf.xml file that you copied in step number 2.

5) Stop and start the vino server from the command line
Code:

gconftool-2 -s -t bool /desktop/gnome/remote_access/enabled false
gconftool-2 -s -t bool /desktop/gnome/remote_access/enabled true

6) Connect to the target system using your vnc client. When I'm on my Ubuntu workstation, I prefer to connect securely via SSH with the following command
Code:

vncviewer -via username@somehost.com targetboxhostname:0

Last edited by srf21c; November 9th, 2006 at 11:39 AM.. Reason: add 'enable' to title for better search visibility
srf21c is offline"

No comments:

Post a Comment