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?

  • @BananaTrifleViolin@lemmy.world
    link
    fedilink
    English
    12
    edit-2
    3 months ago

    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.

  • Possibly linux
    link
    fedilink
    English
    53 months 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
    link
    fedilink
    3
    edit-2
    3 months ago

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

  • @notabot@lemm.ee
    link
    fedilink
    23 months ago

    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.