1

I am trying to connect to Debian 10 machine with KDE from Windows 10 using RDP. I am able to connect as root, but not as a less privileged user. The connection drops after I type the correct credentials in the login screen

Example

I've done a standard xrdp installation on my Debian machine, which is:

$ sudo apt install xrdp
$ sudo adduser xrdp ssl-cert
$ sudo systemctl restart xrdp

I wasn't able to find the solution online and turns out there were several problems, so I'm posting the solution below for everyone's use.

0

TL;DR:

  1. The user you're connecting with must be logged out
  2. xrdp must be running on system startup, not when you're logged in
  3. Your network connection should be available to all users (i.e. at the system startup)

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.