Is there a way to get a wayland/plasma desktop remotely over ssh?

In ancient times I was able to run the KDE on a windows box using cygwin/x and openssh. That doesn’t seem to work with wayland and plasma. I’ve looked for solution, but haven’t been able to get anything to work.

I’ve had problems with some apps running locally under X11 while they work under wayland, so I would prefer not to use X11. I’ve seen people talking about something called waypipe, but I’m not even sure how to get it for MS windows.

I have tailscale for establishing remote connections but I haven’t used it much. I’d like to know if anyone is successfully accessing a plasma/wayland desktop remotely.

If you want a full Plasma desktop from Windows, the recommended approach is to use KDE Plasma’s built-in RDP remote desktop server.

Waypipe facilitates forwarding individual Wayland applications over SSH and is primarily intended for Linux-to-Linux use, so not suitable for accessing via a Windows host AFAIU.

I tried. But using windows rdp resulted in a black screen and nothing more. At least I think I tried what you are suggesting. Is that xrdp?

Are you in a position to check with a Linux host?

Also on the plasma host (I assume the session was active?) check
journalctl --user -b | grep -i rdp

No, different things. Xrdp runs in an X11 session. KDE Plasma RDP is built-in. Go to System Settings and enable there.

Not installed by default, package is called krdp6, once installed one sees it in Systemsettings. Thanks @deano_ferrari , did not know that one.

Yes, krdp6 is the requisite package. I couldn’t remember explicitly installing it, but I have used it for remote access of the active desktop session a couple of times. :wink:

Should I be able to run a session remotely at the same time a local session is active? Conversely, do I have to be logged in locally to use it remotely? Do you know if it works? It keeps crashing on me as soon as I give it my credentials remotely. After I get some sleep I will file a bug report.

ul 02 05:18:13 USS-Liberty krdpserver[3301]: Filter queue is full, dropping frame 135606
Jul 02 05:18:13 USS-Liberty krdpserver[3301]: Filter queue is full, dropping frame 135623
Jul 02 05:18:13 USS-Liberty krdpserver[3301]: Filter queue is full, dropping frame 135641
Jul 02 05:18:13 USS-Liberty krdpserver[3301]: Filter queue is full, dropping frame 135659
Jul 02 05:18:13 USS-Liberty krdpserver[3301]: [h264_vaapi @ 0x7f4564759300] Failed to end picture encode issue: 24 (internal encoding error).
Jul 02 05:18:13 USS-Liberty krdpserver[3301]: [h264_vaapi @ 0x7f4564759300] Encode failed: Input/output error.
Jul 02 05:18:13 USS-Liberty krdpserver[3301]: Error sending a frame for encoding: Input/output error
Jul 02 05:18:13 USS-Liberty krdpserver[3301]: Assertion pic->nb_dpb_pics < 16 failed at libavcodec/hw_base_encode.c:62
Jul 02 05:18:13 USS-Liberty krdpserver[3301]: KCrash: Application 'krdpserver' crashing... crashRecursionCounter = 2
Jul 02 05:18:14 USS-Liberty systemd-coredump[9196]: Process 3301 (krdpserver) of user 1000 dumped core.
                                                    #9  0x000055df98568756 n/a (/usr/bin/krdpserver + 0x9756)
                                                    #12 0x000055df98568b85 n/a (/usr/bin/krdpserver + 0x9b85)
                                                    #4  0x00007f45b8dc32be n/a (libKRdp.so.6 + 0x382be)
                                                    #6  0x00007f45b865fc6f n/a (libfreerdp-server3.so.3 + 0x39c6f)
                                                    #6  0x00007f45b863c39d n/a (libfreerdp-server3.so.3 + 0x1639d)
                                                    #6  0x00007f45b8db1833 _ZN4KRdp13RdpConnection3runESt10stop_token (libKRdp.so.6 + 0x26833)
                                                    #7  0x00007f45b8da7f27 n/a (libKRdp.so.6 + 0x1cf27)
                                                    #6  0x00007f45b6157ee0 n/a (libfreerdp3.so.3 + 0x157ee0)
                                                    #6  0x00007f45b6157ee0 n/a (libfreerdp3.so.3 + 0x157ee0)
Jul 02 05:18:14 USS-Liberty systemd[2857]: app-org.kde.krdpserver.service: Main process exited, code=dumped, status=6/ABRT
Jul 02 05:18:14 USS-Liberty systemd[2857]: app-org.kde.krdpserver.service: Failed with result 'core-dump'.
Jul 02 05:18:14 USS-Liberty systemd[2857]: app-org.kde.krdpserver.service: Scheduled restart job, restart counter is at 1.
Jul 02 05:18:14 USS-Liberty systemd[2857]: Starting KRDP Server...
Jul 02 05:18:14 USS-Liberty systemd[2857]: Started KRDP Server.
Jul 02 05:18:14 USS-Liberty drkonqi-coredump-launcher[9211]: KCrash metadata not marked complete. Please file a bug at bugs.kde.org giving as much detail about the crash as possible and maybe include the file "/home/hattons/.cache/kcrash-metadata/krdpserver.5078842613174a979e8432c3021f0e08.3301.ini"
Jul 02 05:18:14 USS-Liberty krdpserver[9210]: Listening for connections on QHostAddress(QHostAddress::Any) 3389
Jul 02 05:18:14 USS-Liberty krdpserver[9210]: Failed to register with host portal QDBusError("org.freedesktop.portal.Error.Failed", "Could not register app ID: App info not found for 'org.kde.krdp-server'")
Jul 02 05:18:14 USS-Liberty drkonqi-coredump-processor[3244]: "/usr/bin/krdpserver" 49439 "/var/lib/systemd/coredump/core.krdpserver.1000.2b41fa64b6fc4204a7c3ed7d835abbdf.49439.1782963846000000.zst"
Jul 02 05:18:14 USS-Liberty drkonqi-coredump-processor[3244]: "/usr/bin/krdpserver" 49592 "/var/lib/systemd/coredump/core.krdpserver.1000.2b41fa64b6fc4204a7c3ed7d835abbdf.49592.1782963905000000.zst"
Jul 02 05:18:14 USS-Liberty drkonqi-coredump-launcher[9311]: Unable to find file for pid 49439 expected at "kcrash-metadata/krdpserver.2b41fa64b6fc4204a7c3ed7d835abbdf.49439.ini"
Jul 02 05:18:14 USS-Liberty drkonqi-coredump-launcher[9314]: Unable to find file for pid 49592 expected at "kcrash-metadata/krdpserver.2b41fa64b6fc4204a7c3ed7d835abbdf.49592.ini"
Jul 02 05:18:15 USS-Liberty drkonqi-coredump-processor[3244]: "/usr/bin/krdpserver" 3291 "/var/lib/systemd/coredump/core.krdpserver.1000.163eed2b0ec742dc9f8564f47ce8b716.3291.1782983017000000.zst"
Jul 02 05:18:15 USS-Liberty drkonqi-coredump-processor[3244]: "/usr/bin/krdpserver" 34525 "/var/lib/systemd/coredump/core.krdpserver.1000.163eed2b0ec742dc9f8564f47ce8b716.34525.1782983099000000.zst"
Jul 02 05:18:15 USS-Liberty drkonqi-coredump-launcher[9320]: Unable to find file for pid 3291 expected at "kcrash-metadata/krdpserver.163eed2b0ec742dc9f8564f47ce8b716.3291.ini"
Jul 02 05:18:15 USS-Liberty drkonqi-coredump-processor[3244]: "/usr/bin/krdpserver" 34656 "/var/lib/systemd/coredump/core.krdpserver.1000.163eed2b0ec742dc9f8564f47ce8b716.34656.1782983233000000.zst"
Jul 02 05:18:15 USS-Liberty drkonqi-coredump-launcher[9323]: Unable to find file for pid 34525 expected at "kcrash-metadata/krdpserver.163eed2b0ec742dc9f8564f47ce8b716.34525.ini"
Jul 02 05:18:15 USS-Liberty drkonqi-coredump-processor[3244]: "/usr/bin/krdpserver" 3301 "/var/lib/systemd/coredump/core.krdpserver.1000.5078842613174a979e8432c3021f0e08.3301.1782983893000000.zst"
Jul 02 05:18:15 USS-Liberty drkonqi-coredump-launcher[9326]: Unable to find file for pid 34656 expected at "kcrash-metadata/krdpserver.163eed2b0ec742dc9f8564f47ce8b716.34656.ini"

This is sounding more like MS Windows RDP and less like Linux/UNIX X.

Yes, as it is currently implemented, an already active desktop session s required. I believe there are future plans to incorporate the plasma login manager into the mix and allow remote graphical logins (start a remote session from the login screen). Not there yet though.

If you are willing to use frugal Wayland interface - Weston (reference implementation) supports both headless RDP and headless VNC sessions - no local GUI session or even GPU card needed and you can even run more than one Weston instances on different ports, etc…

Personally I tested VNC - here is my quickstart:

# weston requires certificates to operate VNC: from weston-vnc(7)

# run on any machine - client or server:
openssl genrsa -out tls.key 2048
# when asked for: 'Common Name (e.g. server FQDN or YOUR name' enter exactly
# your SERVER FQDN (that you will use for connection to server)
# on all other questions just press ENTER
openssl req -new -key tls.key -out tls.csr
openssl x509 -req -days 365 -signkey tls.key -in tls.csr -out tls.crt

# now copy certs you neeed:
# on server: tls.crt tls.key
# on client: tls.crt

# on server run:
weston -Bvnc --port 9999 --vnc-tls-cert tls.crt --vnc-tls-key tls.key --width 1440 --height 900

# on client run:
vncviewer -X509CA tls.crt YOUR_SERVER_ADDRESS::9999
# use login and password of user that runs 'weston' on server

I have no issues connecting to Plasma/Wayland system via ssh, and for graphical access I use RustDesk. I have also tried RDP first as I used it before (for X11) and VNC, but couldn’t set it properly.
Performance is not so great, but enough for my use-case. And it’s buggy, sometimes I need to connect 2 or 3 times before I get stable session. You can connect directly via IP, should be a bit faster, and should also work with Tailscale (works with ZeroTier for me)

1 Like

What you describe is more remote control than true remote desktop. True remote desktop supports multiple users all RDP’ing into the same server at the same time and even supports a locally logged in user at the same time. We use that functionality extensively. I prefer KDE but they have really dragged their feet on getting true RDP support with Wayland, whereas GNOME has it working perfectly in my testing.

Of course - I think I explained how it is currently implemented clearly enough. :wink:

As I mentioned earlier, I believe there are plans upstream for remote graphical logins integrated with the Plasma login manager, but you’ll need to follow the upstream development and discussions to see how that progresses.

For now, if remote graphical logins are a requirement, I’d recommend sticking with X11 sessions, or Gnome if that is your thing.

In my workplace we use VNC for graphical access, with VPN connectivity for remote access outside our production network. SSH is used for some of our specialized Linux hosts.

In ancient times one could ssh into a linux box and run a KDM (K Display Manager) and get the entire desktop remotely.

Does that still work ? Even if it did, I have Windows and Linux users RDP’ing into the servers so the Windows users have probably not or rarely used ssh

It was my understanding that VNC also does not currently work with Wayland ?
Are you using VNC and wayland to get a full KDE desktop with multiple users logged in at the same time ?

We use VNC to access Windows servers, and SSH to administer headless Linux servers. We don’t use VNC for Linux desktop sessions.

If all I wanted to do was administer the headless linux servers then sure SSH is great but the headless linux servers primary focus is as a terminal server.

Yes, I get that from the other topic you are discussing the same in.

I too am looking forward to a Plasma login manager implementation to facilitate remote logins and desktop session access.