Benad's Web Site

Even though VNC became the de facto standard remote desktop protocol for Linux desktops (especially with its integration with the GNOME desktop), I still found it too clunky and slow to use, even on a local network. The VNC protocol seems to have been designed from a time of small screen sizes, without sub-pixel font smoothing, or GPU-accelerated window compositing using transparency effects.

Thankfully, TightVNC introduced a VNC encoding called “Tight Encoding” that uses small JPEG images to compress parts of the image. Another VNC implementation called TurboVNC also brought significant speed improvements in the JPEG compression with its libjpeg-turbo library. The end result is a flavour of VNC that works well with modern Linux desktops, at great speed and reasonable visual quality, even over a slow internet connection.

Annoyingly, Tight encoding is not widely implemented, neither in VNC servers or clients. For example, on iOS, the only VNC client that I found to be compatible with Tight encoding is Ripple VNC. An alternative web-based client called noVNC not only supports Tight encoding, but also works on all modern browsers, including touch controls on Safari for iOS and Chrome on Android. noVNC can be a little bit difficult to set up (you have to host your own web server), but the provided script novnc-proxy is a good start for most servers.

The approach of encoding JPEG blocks and then have a way to “move” parts of the image elsewhere makes the VNC protocol feel like an early version of MPEG-1. This led the TurboVNC developers to explore the use of H264 video compression for remote desktop, and their conclusion was that this would tax too much the CPU, unless hardware acceleration (both for the server and client) can be used. This was written in 2014, and seven years later H264 hardware compression and decompression are widely available. Even the Raspberry Pi 4 now has hardware-accelerated H264 compression.

Many remote desktop solutions now support some H264-accelerated protocol, as proprietary extensions of VNC or as a separate protocol altogether. For example Remotix’s “NEAR” or Jump Desktop’s “Fluid”.

But using H264 for a remote screen is more widely used today for playing video games remotely. There is Steam Remote Play for the Steam store. If you have an NVIDIA GPU, there is NVIDIA GameStream, which also works quite well with the Moonlight open-source client. Even if this takes more bandwidth than VNC (in most scenarios), there are now many game streaming services that simply stream the video using H264.

Published on August 1, 2021 at 18:50 EDT

Older post: Upgrading to the Pi 400

Newer post: Modern Command-Line Tools