Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When you want to set a server to accept "Remote Desktop" connections, you do: System \ Preferences \ Remote Desktop

The thing is I just have a ssh connection to the server for now. How do you set it using only the command line ?

share|improve this question
Actually I found out that when the host restart, vino-server is not restarted by default, eventhough the settings at System \ Preferences \ Remote Desktop are correct. If you unset and reset, it restarts vino-server – Bob Yoplait Jan 20 '11 at 18:11
you can also do "/usr/lib/vino/vino-server --sm-disable" on the server – Bob Yoplait Jan 20 '11 at 19:06
up vote 1 down vote accepted

This will work with a normal installation:

ssh to your remote machine, with X forwarding turned on

ssh -X servername 

Then run vino-preferences

Alternatively, set the gconf keys from the command line with gconftool :

gconftool-2 --set --type=bool /desktop/gnome/remote_access/enabled true

You can see the other remote_access keys with this command :

gconftool-2 -a /desktop/gnome/remote_access

If your server isn't started remotely, start it with


There's more info in this answer.

share|improve this answer

Install x11vnc on the remote computer and then punch something like this in on your local computer:

ssh user@host -L 5900:localhost:5900 "x11vnc -display :0 -noxdamage"

Then connect to localhost on your local computer with your VNC client. The local port 5900 will be tunnelled over the SSH connection (which is now running x11vnc).


share|improve this answer

Am assuming then that you have the openssh server installed in the server. So from a client do this:

ssh USER@SERVER. For example: ssh This is the simple way of ssh to connect.

The user HAS to have ssh permission in the server and must also be available in the server of course.

share|improve this answer
I want to start a "Remote desktop Viewer" through VNC, but I have to set up "System \ Preferences \ Remote Desktop" on the host server. Which file on the server need to be changed ? – Bob Yoplait Jan 19 '11 at 22:18
i was going to type what Oli said above. Which was my first guess after you explain the way to connect. Am going to edit this post with other options but Oli is right with x11vnc. – Luis Alvarado Jan 19 '11 at 23:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.