I have a computer running KDE Plasma 6.1 at home and have enabled the Remote Desktop server on it.
Now I’d like to connect to it remotely via KRDC over VPN but it does not work, I can connect to the computer with the VPN and access it with SSH. Does the RDP server only work when you are actually logged into kde?
Is there a way to start the rdp server via the cli over ssh?
As far as I know, the user’s specific system setting Remote Desktop → Enable RDP server will enable the RDP server for the logged in user. I’m not actually sure what it does if you have multiple users logged in, but if you are not logged in - there is no server running.
The Plasma “Remote Desktop” RDP server is implemented using a systemd user service. You can check it status by running systemctl --user status plasma-krdp_server.service.
If you are not logged in to a graphical session, and you try to start the service (for example by running systemctl --user start plasma-krdp_server.service, it will error out and complain that it “could not connect to a display” - which should explain the issue: the RDP service is not a graphical login session, it exposes remote access to an existing graphical login session.
Ah ok, thanks.
The idea is to log into a remote computer that was started with a magic packet. (so no one logged into the graphical environment)
That works on a windows computer even without anyone logged in, I just thought I could recreate that with my linux pc.
Basically I would need to (via ssh) start a KDE graphical session targeted to either the physically connected display of the target computer or a (local on the rdp servers computer) virtual output device. (and supply the login credentials in the start command) Is that possible?
For example (totally made up):
systemctl start kde-session --target (v)display1 --user username --password xxx
This kind of use case - login remotely to a machine without any user logged in - used to be implemented on Linux using the X11 remote session protocol XDMCP. The current KDE display manager - SDDM - does not imlement XDMCP and it is not a target for KDE developers because the XDMCP protocol is considered outdated as it cannot be used to run a Wayland desktop, with KDE development focused on Wayland as the display protocol. Wayland is a local display protocol and does not lend itself to remoting very well.
One may envision a remote desktop service - using the VNC or RDP protocol (or both) that when a user connects and authenticates, a Plasma session gets started using the Kwin backend “virtual”.
As far as I know no one is working on this kind of use case. There used to be a project called Ogon that aimed in creating that kind of use case (in a more general fashion, not specifically for Plasma) but it seems to be dead in the water with no work done in over 3 years. The Kwin “virtual” backend was created to automate testing and it is unclear how suitable it is for running a full workspace that is shared over a remote desktop session. In short - there is a lot of stuff to be done to support remote log in to a modern Linux desktop.
One thing you can do, is to set up auto-login on your machine, so that once it boots it immediately logs in to a user account that has remote desktop enabled, then you can connect to that.