Share your Ubuntu Desktop Using Remote Desktop 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.

  • What do you mean by "Console Access" vs. "SSH Access"? SSH access gives you access to a terminal interface... Jun 14, 2012 at 15:24
  • @LordofTime console often means the physical terminal, keyboard/screen/mouse.
    – Tim
    Jun 14, 2012 at 15:34
  • @Tim often, yes. always, no. just looking for clarification. Jun 14, 2012 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. Jun 14, 2012 at 15:38

3 Answers 3


@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.


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

  • I assume that is how I install the server on Linux; how can I install the client on Mac or Linux? Jun 14, 2012 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, 2012 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, 2012 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 [email protected]

Enter your password for [email protected].

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).

  • This is actually my favorite way of doing it!
    – Tim
    Jun 14, 2012 at 17:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .