TL;DR:
- The user you're connecting with must be logged out
- xrdp must be running on system startup, not when you're logged in
- Your network connection should be available to all users (i.e. at the system startup)
- The user you're connecting with must be logged out
The following error is observed in /home/{username}/.xsession-errors
startkde: Starting up...
kdeinit5: preparing to launch '/usr/lib/x86_64-linux-gnu/libexec/kf5/klauncher'
kdeinit5: Launched KLauncher, pid = 3943, result = 0
Waiting for already running klauncher to exit.
Waiting for already running klauncher to exit.
Another instance of klauncher is already running!
kdeinit5: Communication error with launcher. Exiting!
kdeinit5_wrapper: Warning: connect(/run/user/1000/kdeinit5__10) failed: : Connection refused
The KDE session must be unique. This is happening because I'm currently physically logged on in that machine. To solve this we need to log out.
- xrdp must be running on system startup, not when you're logged in
If we're logging out the xrdp server stops running. There's a simple fix:
$ sudo systemctl enable xrdp
$ sudo systemctl restart xrdp
- Your network connection should be available to all users (i.e. at the system startup)
After this is done, there are still problems in connecting. My Debian machine uses a Wifi connection, which is instantiated only after I log in into the system. When I'm at the SDDM Login Screen, the wifi connection is not established.
I had to do the following (from this answer): go into Network Manager > Edit Connections. Select your connection, click Edit and check Available to all users.