Recently, I have had an argument with Priyanka who prefers using GUI to terminal. She used VNC sessions to view her remote Linux machine desktops on Windows machines. The whole experience was slow and lagged a lot. I on the other hand preferred to use the terminal and used X11 forwarding when needed. My logic for favouring X11 forwarding was that I thought it made more efficient use of the bandwidth as all X11 programs had to send was rendering instructions instead of sending bitmaps of a rendered desktop (the VNC way). After a few days, I decided to google “VNC vs X11 forwarding” to see what other people thought of it.
My research led me to conclude that VNC outclasses X11 forwarding on two fronts -
While I figured than using the
screen utility can help me resume programs after a dropped connection, there, seems no way to resume X11 forwarded programs after a disconnected SSH session. The only way that I know of so far is using a VNC virtual session.
VNC compresses data before transmission while X11 forwarding does not implement compression. The only compression that X11 forwarding can take advantage of is the one that the SSH tunnel can provide. The SSH compression is not as much as that of the RFB (Remote Framebuffer) protocol. This sounds plausible as any compression scheme dedicated to a certain type of data can be crafted to be more efficient than a scheme that is designed for random data. Further digging into the two protocols led me to -
Skimming through these documents, I am convinced that X11 protocol offers no compression.
In spite of the advantages of VNC, X11 forwarding has advantages too. X11 forwarding works by sending rendering instructions to the X11 server as opposed to pixel based VNC protocol. While this allows VNC to render any desktop, it also means that all pixels must be sent to he VNC client to render. If X11 Forwarding over came the above two points (Session and Compression), it would easily prove superior to VNC.
Another search found me -
These are two implementations designed to provide compression to the X11 forwarding. The NX Proxy is derived from DXPC. The DXPC is implemented as a set of two proxies - one on the server and one on the client. Thus compressing the communications over the communication channels.
Nomachine provides a free tool that implements NX technology. It is available for Windows, Linux and OSX.
WinSwitch is another tool which allows resuming single apps across sessions and is also available for Windows, OSX and Linux.