Edit: rootless
in this context means the remote windows appear like local windows; not in a big "desktop" window. It's nothing to do with the root account. Sorry, I didn't come up with that confusing term. If anyone can think of a better term let's use that!
This should be a simple task. I ssh to a remote server. I run a GUI command. It appears on my screen (and isn't laggy as hell).
Yet I've never found a solution that really works well in Linux. Here are some that I've tried over the years:
- Remote X: this is just unusably slow, except maybe over a local network.
- VNC: almost as slow as remote X and not rootless.
- NX: IIRC this did perform well but I remember it being a pain to set up and it's proprietary.
- Waypipe: I haven't actually tried this but based on the description it has the right UX. Unfortunately it only works with Wayland native apps and I'm not sure about the performance. Since it's just forwarding Wayland messages, similar to X forwarding, and not e.g. using a video codec I assume it will have similar performance issues (though maybe not as bad?).
I recently discovered wprs which sounds interesting but I haven't tried it.
Does anyone know if there is a good solution to this decades-old apparently unsolved problem?
I literally just want to ssh <server> xeyes
and have xeyes
(or whatever) appear on my screen, rootless, without lag, without complicated setup. Is that too much to ask?
I normally just use X forwarding over
ssh
. For simple, X native, apps it usually works nicely, but if you're using something that draws its own UI (electron apps, browsers and the like often do) it'll be extremely painful or just fail.I believe there is, or was, a way to run a vnc client rootless, but I think you needed to configure the server in a specific way too. It's been a long time since I tried though so things will have changed.
I'm using Questa which I believe is a Qt app. Remote X is just waaay too slow. The server is in a different country, but VMware VDI can display apps with no noticeable lag. (But that's pretty much its only redeeming feature.)
You really need to have lead with that. I do what you want all the time, but it's to another port of the same switch.
Your problem is basically latency. X11 used to run fine on local 10Mb/s networks and that's no streth these days for WAN connections. What you won't be able to get past though is latency. How chatty is the protocol.
Anyway, I suggest you try xpra - that was on my list to try at one point but I haven't needed to. But it is meant to be for what you want and optimised for that. I wanted it so I could disconnect from the machine and reconnect later to resume, but I found it simpler to just do most things in the terminal and use tmux instead. I've been happy with that for years now.
You aren't going to get good performance with just X.
I would look into a dedicated solution like KasmVNC or maybe even Rustdesk with your own server.
Another option is Moonshine/Sunlight but it is mostly gaming focused.