Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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

http://www.ubuntugeek.com/share-your-ubuntu-desktop-using-remote-desktop.html tells how to share a desktop by setting multiple features from within a GUI.

Is there such a HOWTO that is based on ssh command line access? I would like to know how I can remotely access a desktop from Ubuntu or any other operating system where I have ssh access and can install packages, but not graphical console access.

share|improve this question
What do you mean by "Console Access" vs. "SSH Access"? SSH access gives you access to a terminal interface... – Thomas Ward Jun 14 '12 at 15:24
@LordofTime console often means the physical terminal, keyboard/screen/mouse. – Tim Jun 14 '12 at 15:34
@Tim often, yes. always, no. just looking for clarification. – Thomas Ward Jun 14 '12 at 15:38
Thank you; I edited it to say "graphical console access" meaning being able to log in and get GNOME or some other GUI. – JonathanHayward Jun 14 '12 at 15:38

@Tim 's answer is perfectly reasonable, but as an alternative, you may want to look into NoMachine NX or FreeNX. NoMachine NX is proprietary but gives you two remote user logins for free. So if you just want to connect to your own server or something, this may be ideal. FreeNX, IIRC removes this restriction, but may be a little harder to get going depending on your level of experience with Linux. Both services tout a ''near local speed'' when used to connect remotely.

I believe both approaches require setting up an NX server on the host machine and then running an NX Client on the client machine. Just be sure you have the privileges to do that sort of thing before you dive in.

Personally I find NX to be faster and more stable than using VNC, but I don't have numbers to back that up. I just wanted to offer you an alternative to VNC.

share|improve this answer

Install x11vnc sudo-apt install x11vnc.

If there is a user already logged in run x11vnc -display :0

If no one is logged in and you know the path to your current DM (Display Manager), run sudo x11vnc -auth /path/to/x11auth -display :0

Or you can try guessing on the auth file x11vnc -auth guess -display :0

And... Just in case you are new to VNC, this link will get you up to speed quick: http://www.wikihow.com/Use-VNC-Virtual-Network-Computing-to-Control-a-Computer-Remotely

share|improve this answer
I assume that is how I install the server on Linux; how can I install the client on Mac or Linux? – JonathanHayward Jun 14 '12 at 17:27
I use "Chicken of the VNC" for my Mac, and TightVNC for Windows, and w/e VNC with Linux and Unix. – Tim Jun 14 '12 at 17:29
Oh, and if you want to get fancy, check out NoVNC, allows you to use a web browser to view the VNC Server. – Tim Jun 14 '12 at 17:44

Tim's solution is aimed at sharing the whole (remote) desktop and I think it applies better to your question.

If you'd like to display selected applications on your desktop you can use SSH trusted X11 forwarding and a local X server.

You might need to set your DISPLAY variable to :0.0 if not already set.

ssh -Y user@remote.host

Enter your password for user@remote.host.

Start an application e.g.:

gnome-terminal &

The terminal should display on your local screen. It can prove useful in some cases.

Note: since the communication goes through SSH, it is secure. Also the X11 protocol can prove inefficient in some use cases (e.g. browsing).

share|improve this answer
This is actually my favorite way of doing it! – Tim Jun 14 '12 at 17:42

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.