Differences between VNC and ssh -X

Aside from bandwidth and latency issues (which can vary a bit), the big differences are the functionality it provides.

VNC exports a whole session, desktop and all, while ssh will run a single program and show its windows on your workstation.

The VNC server exports a session that survives even when you disconnect your screen, and you can reconnect to it later with all the windows open etc. This is not possible with an ssh X tunnel, since when your X server dies, the windows go away.


ssh -X redirects X11 commands to your local X server. So it is as if you were running the program locally, when it's really running on the computer at the other end. It's very slow because it uses a great deal of bandwidth. (This is what people are talking about when they say X11 is "network transparent.")

VNC and other remote desktop apps instead let the other computer process all of the graphics drawing and so forth and captures, in essence, a screenshot and sends that back to your computer. It can seem much faster, because far less information is required to display everything. However, it also sends the whole desktop, rather than a single application.

I don't recommend using ssh -X over the Internet for one simple reason: It will use all of your available bandwidth. It's fairly useful over a LAN, in my opinion, so if you just need one application and don't want to have to run a whole desktop, this is a good way to go. Otherwise, just use VNC.


VNC will share an entire desktop from a remote system. It requires a full-fledged desktop on the remote system.

ssh -X allows you to run single X application from a remote server. The remote system does not need to be running a complete desktop, and you often only need a handful of packages to be installed on the remote system.

ssh -X can be useful when installing complex software packages over a remote connection. Some software products may use a GUI installer (Oracle Database, etc). I don't want to install and a full-fledged Gnome desktop on my remote server. So, you install one or two X11 packages (Xauth?) on the remote server, and allow the DBA to run the Oracle installer remotely using something simple like 'ssh -X /media/cdrom/oracle-installer'.

Tags:

Ssh

Vnc