xrdp with x11vnc - a very niche use case and speedup when viewing complex graphics (e.g. raw VM consoles, photos)
Posted by will_try_not_to@reddit | linux | View on Reddit | 4 comments
We have a mixed Windows and Linux environment, and a number of the Linux machines run GUIs that are intended to be accessed remotely. In order to play nice with Windows, we use xrdp on the Linux boxes, which allows connecting with the native Windows mstsc and RDCman clients.
This works quite well, and the Linux desktops are just as fast/responsive over the network as the Windows ones (if not more so), except for one special use case - when running a Windows VM on a Linux host using libvirt and virt-manager, viewing the GUI console of that VM over xrdp is slow and laggy.
I suspect this is because VM consoles like that are pretty much displayed as one giant picture, so the various optimisations xrdp uses can't really work, and/or there's no jpeg encoding support in the Xvnc & xrdp packages these Linux boxes have (mostly Fedora & Red Hat).
However, I discovered that the x11vnc package does have jpeg encoding support, and the two are easy to combine: when connected to an RDP session and something comes up that would be faster in vnc, you can run x11vnc within that existing RDP session, then connect to it with vncviewer (e.g. the one from the tigervnc package supports jpeg) over an ssh tunnel, that is very fast and responsive, even if it's an annoying Windows 11 VM in the console with all the animations and eye candy turned on.
One oddity about this workaround - if you disconnect the RDP session, VNC gets laggy. I'm guessing there's an optimisation in xrdp to de-prioritise the session when it thinks no one is looking at it :)
(Obviously the ideal solution would be to recompile xrdp and its associated Xvnc instance so that those support jpeg out of the box, but that could get complicated - we would want a way of explicitly enabling/disabling it during a session, because most of the time we don't want UI elements looking jpeggy...)
dddurd@reddit
So xorgxrdp is faster? X11vnc was super slow in my experience and had to use x11 module instead.
Skinkie@reddit
Or use spice? https://www.spice-space.org/index.html
QuackdocTech@reddit
remote spice is atrociously slow
will_try_not_to@reddit (OP)
I tested that as well; it was actually slower, even on Windows VMs that had the spice drivers installed.