Teaching VNC to Speak RDP
· 265 words · 1 min read
Screens 5 only speaks VNC, my Ubuntu box only speaks RDP. So I built a translator.
I wanted to control my Ubuntu desktop from my phone with Screens 5, which only speaks VNC until 5.9 ships. Modern GNOME went the other way: the VNC backend died back in GNOME 44, so my Ubuntu 26.04 box only speaks RDP, and the classic x11vnc trick is dead too because a Wayland session has no X screen to grab.
The workaround is a bridge. x11vnc serves a headless Xvfb display, and inside that display xfreerdp3 runs fullscreen, connected over loopback RDP to gnome-remote-desktop mirroring the real session. Screens connects like nothing changed, and the pixels it gets are my actual monitor at native 4K.
Screens 5 ──VNC:5900──> x11vnc ──> Xvfb :20 <── xfreerdp3 ──RDP:3389──> gnome-remote-desktop (live session)
Getting it working took an evening of log reading. The nastiest find: since GNOME 46, stock Ubuntu ships a system-level gnome-remote-desktop daemon that owns port 3389 and resets every connection at negotiation, silently, before auth even starts. It looks exactly like a firewall until you notice the port stays bound with the user daemon stopped. Disabling the system unit lets the session daemon bind the port directly, and everything works. Smaller traps: systemd user services inherit WAYLAND_DISPLAY and x11vnc refuses to start until you unset it, gnome-remote-desktop only speaks 32-bit color, and the sharing stream comes out at physical panel resolution, so the whole chain has to run at 3840x2160 or text turns to mush.
Full recipe in the gist, installable version at wayland-vnc-bridge. And if you got here by typing "ubuntu rdp connection reset" into a search bar at 1am: it's the system daemon.
Comments
Loading comments...