this post was submitted on 20 Mar 2025
24 points (96.2% liked)

Linux

6600 readers
285 users here now

A community for everything relating to the GNU/Linux operating system

Also check out:

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

founded 2 years ago
MODERATORS
 

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?

top 44 comments
sorted by: hot top controversial new old
[–] BananaTrifleViolin@lemmy.world 12 points 2 days ago* (last edited 2 days ago) (2 children)

The reality is what youre asking for is very complex - you're asking for lagless streaming for a desktop. That is running a GUI on remote hardware, and then streaming that video to another computer with low latency so you have no perception of lag in moving the mouseor interaction, and continuous streaming of desktop updates.

There are lots of factors at play that can make it a poor experience.

You can have what you want if:

  • The server you SSH in to has the resources to run X well
  • The server you SSH in to has the hardware to be able to then convert that to video (with some tricks) and stream it
  • The internet connection between you and the remote server is stable and high enough bandwidth to stream the desktop
  • the internet connection between you and the remote desktop is low latency.

Its very hard to achieve all those things even when youre creating machines that are dedicated for remote desktop streaming. I have done that in my work with Windows devices and to get good quality streaming we needed dedicated hardware, dedicated software and high quality internet. And even then some of our users had bad experiences.

Most remote servers are definitely not set up to provide what you want. Dedicated software for the task will help as there are lits of tricks that they apply to make a streaming desktop appear latency free versus simpler solutions that just stream the actual desktop.

VNC is not a good solution - its basically just taking screenshots and streaming those to you. It works with fast devices on a local network, but is very limited in your use.

If you really want to solve this look at software optimised for low latency uses such as gaming. For example Moonlight/Sunshine are for game streaming but work with desktops. They are designed to be low latency high quality. But to achieve that you need the video hardware on your server, and the good low latency stable internet connection.

Real world high quality desktop streaming also needs good graphics hardware and optimised tools. It can be achieved with open source software but you need the hardware to to do the heavy lifting.

[–] FizzyOrange@programming.dev 2 points 2 days ago* (last edited 2 days ago) (1 children)

I'm just asking for the same level of lag as I get from basic modern remote desktop solutions like Rustdesk, VMware VDI, Chrome, etc. As far as I know these all just capture the desktop, feed it into a standard low latency video codec and bob's your uncle. They achieve very good latency.

I currently use VMware VDI and it runs fine. All of these complex factors you've mentioned are not an issue at all. The only complexity is the actual integration with X/Wayland.

[–] possiblylinux127@lemmy.zip 1 points 2 days ago (1 children)

What's wrong with VMware VDI? Except for the price it should be fine.

[–] FizzyOrange@programming.dev 1 points 2 days ago

You have to launch an app, log in twice and then you get an annoying VNC-style remote desktop, not native windows. Also it doesn't run at all on Wayland. Apart from that it works pretty well - fast, and stuff like copy/paste works. I would just like something that is as convenient as remote X, but not dog slow.

[–] umbrella@lemmy.ml 1 points 2 days ago

Its very hard to achieve all those things even when youre creating machines that are dedicated for remote desktop streaming.

to be fair, i can do this quite easily with a standard fiber connection and a somewhat old laptop-grade cpu/igpu.

if OP is self-hosting, their hardware is probably capable, it would be that hard if hes paying for a VPS where gpu acceleration is not a thing unless you pay for it.

[–] refalo@programming.dev 4 points 2 days ago* (last edited 2 days ago) (1 children)

xrdp and x11vnc is rootless

[–] FizzyOrange@programming.dev 1 points 2 days ago (2 children)
[–] possiblylinux127@lemmy.zip 3 points 2 days ago (1 children)

I highly doubt you can find anything better than XRDP. What do you mean horribly slow? What is the output of a iperf test? What is your GPU?

[–] FizzyOrange@programming.dev 1 points 2 days ago (1 children)

Sorry I misread, VNC is slow. RDP is a lot better. Does not appear to be rootless though, even though IIRC the RDP protocol does support that? I might have misremembered.

[–] possiblylinux127@lemmy.zip 1 points 2 days ago (1 children)

I don't think that is possible based on what you are asking.

Also rootless is the wrong word for what you are looking for. You are looking to forward a window to the desktop. Rootless is used commonly to describe things like podman

[–] FizzyOrange@programming.dev 2 points 2 days ago* (last edited 2 days ago)

WPRS uses the term rootless like this. I didn't come up with it. But I agree it is not a great term. If you can think of a better one I will happily use it. Parallels calls it "coherence mode", which also isn't great.

Actually Xprs uses "seamless mode" which is probably better.

[–] refalo@programming.dev 2 points 2 days ago* (last edited 2 days ago)

Proof? And by what metric? That has not been my experience whatsoever, nor have I heard any complaints about either of them.

[–] possiblylinux127@lemmy.zip 4 points 2 days ago

Yes that's to much to ask

You are adding a ton of overhead and complexity. Expecting it to just work is underestimating the difficulty of it all. With that being said, Xpra is probably what you are looking for. However, I would suggest that you take a look at your use case as there is probably a better solution. What app are you trying to use?

Also, Xorg is a bit of a dinosaur at this point. It isn't going away but gnome and kde have both made plans to drop support long term. We still have a few years but from a longevity perspective I would start thinking about new solutions. KDE and Gnome both support RDP and there are plenty of modern web interfaces for managing servers like Cockpit.

[–] toothbrush@lemmy.blahaj.zone 3 points 2 days ago* (last edited 2 days ago) (1 children)

Im searching for a solution too. You mentioned wprs, have you tried its predecessor xpra?

And theres always stuff like teamviever, rustdesk, and my personal favorite moonlight/sunshine, although all of these are for a slightly different usecase(full access to a remote desktop).

[–] FizzyOrange@programming.dev 2 points 2 days ago (2 children)

I didn't try xpra because it's basically persistent X forwarding, and I already know that is way too slow. As far as I know Rustdesk, etc. are not rootless. I hadn't considered Moonlight/Sunshine (thought it was just for games) but I would guess that isn't rootless either?

[–] toothbrush@lemmy.blahaj.zone 2 points 2 days ago* (last edited 2 days ago) (1 children)

Its not just for games, you can remote any program(or the entire desktop) with it. Not sure why they advertise it like that.

As for rootless: As far as I know you need some elevated Privileges to be able to capture Wayland, but it does not need to run as root. Not 100% sure though.

[–] FizzyOrange@programming.dev 3 points 2 days ago (2 children)

Sorry rootless in this context means it doesn't have a big window showing the whole remote desktop, instead each remote window shows up as if it were a local window. Nothing to do with the root account. Kind of confusing, sorry!

[–] toothbrush@lemmy.blahaj.zone 1 points 2 days ago

Ah okay! No its not rootless, in fact it can only do fullscreen I think, thats why Im still searching for a better solution!

[–] possiblylinux127@lemmy.zip 1 points 2 days ago (1 children)

That makes way more sense.

You aren't going to get the performance you are looking for doing that unfortunately. It just isn't possible to my knowledge.

[–] FizzyOrange@programming.dev 1 points 2 days ago (1 children)

I mean it's totally possible in theory. Do you just mean nobody has actually written something that does this?

[–] possiblylinux127@lemmy.zip 1 points 2 days ago* (last edited 2 days ago) (1 children)

It is much more complex and has more overhead. You can do it but it will be slow.

Why do you want it to be a desktop window? Can't you just run it locally?

[–] FizzyOrange@programming.dev 1 points 2 days ago

Yeah it's more complex. I don't think there's any more overhead though, and there's no reason it will be slow.

Can’t you just run it locally?

No, unfortunately not.

[–] possiblylinux127@lemmy.zip 1 points 2 days ago* (last edited 2 days ago) (1 children)

Xpra is pretty damn performant. It isn't as fast as something dedicated but it gets the job done.

[–] FizzyOrange@programming.dev 1 points 2 days ago (1 children)

Isn't it just basic X forwarding?

[–] possiblylinux127@lemmy.zip 1 points 2 days ago* (last edited 2 days ago)

Not really. It uses compression and some custom algorithms to minimize the data sent.

It will have way more performance than a raw X forward

[–] umbrella@lemmy.ml 3 points 2 days ago* (last edited 2 days ago) (1 children)

i just use sunshine if i want to use gui apps. its annoying to setup in a headless server but it works.

the feasibility of this solution will depend on your usecase.

[–] FizzyOrange@programming.dev 1 points 2 days ago (1 children)
[–] umbrella@lemmy.ml 1 points 2 days ago* (last edited 2 days ago) (1 children)

it can be set up with root for convenience if you want but its generally meant to be rootless, with autologon, yes.

portals support is pending still so its kind of annoying to set up, and it needs the full desktop stack to be installed on your server, but it isnt rocket science to get started with.

[–] FizzyOrange@programming.dev 1 points 2 days ago (1 children)

See my edit to the post. I probably should have clarified that.

[–] umbrella@lemmy.ml 1 points 2 days ago

oh, i get it now. i know X can do it easily and was only aware of waypipe for wayland, but you seem to have had trouble with it.

ill follow this thread because the answer also kind of interests me.

[–] notabot@lemm.ee 2 points 2 days ago (1 children)

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.

[–] FizzyOrange@programming.dev 1 points 2 days ago (2 children)

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.)

[–] camh@programming.dev 2 points 2 days ago

The server is in a different country

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.

[–] possiblylinux127@lemmy.zip 1 points 2 days ago

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.

[–] ExperimentalGuy@programming.dev 1 points 2 days ago (1 children)

This might be dumb, but what if you used parsec on the other machine?

[–] FizzyOrange@programming.dev 1 points 2 days ago (1 children)

Not rootless as far as I can tell.

[–] possiblylinux127@lemmy.zip 1 points 2 days ago (1 children)
[–] hellofriend@lemmy.world 1 points 1 day ago

From what I understand, they're wanting what Cisco does on Windows. Programmes hosted on a server that appear on a remote client when run. Problem is, Cisco is also relatively slow and will never run as fast as a programme hosted on the client machine itself. The biggest hurdle is the network speed of the client.

[–] moonpiedumplings@programming.dev 0 points 2 days ago (1 children)
[–] FizzyOrange@programming.dev 1 points 2 days ago (2 children)

VNC is horribly slow. Also hilariously insecure! I forgot about that...

[–] moonpiedumplings@programming.dev 1 points 2 days ago* (last edited 2 days ago) (1 children)

KasmVNC is basically a completely different solution. It's browser based, has authentication (although regular vnc does as well), and they've made significant improvements to performance by using libjpeg-turbo instead of the normal image libraries.

When using the docker containers (e.g. the webtop linuxservio oned), I noticed no lag for non-gpu accelerated sessions over the internet.

Edit: although it's not your definition of rootless though.

[–] FizzyOrange@programming.dev 1 points 2 days ago (1 children)

Yeah MJPEG isn't going to cut it, and as you say it's not rootless.

Actually I just realized that's not true. it is possible to serve a single app via kasmvnc. It's still web based though.

It's quite fast, I recommend you try it.

https://docs.linuxserver.io/images/docker-webtop/ -- these are all in one docker containers that include kasmvnc and some apps, but you can also deploy kasmvnc independently.

[–] possiblylinux127@lemmy.zip 1 points 2 days ago

KasmVNC isn't really VNC