I have a fresh install of XRDP on a virtual Ubuntu 18.04 machine, and I cannot connect to it via a Windows 10 laptop (the only piece of test equipment I have at the moment.)
The error message from Windows 10 is:
Remote Desktop can't connect to the remote computer for one of the following reasons:
1) Remote access to the server is not enabled
2) The remote computer is turned off
3) The remote computer is not available on the network.Probably more telling is the status of XRDP on the Ubuntu machine, where I have indicated one line that seems wrong:
____________:~$ sudo systemctl status xrdp
● xrdp.service - xrdp daemon Loaded: loaded (/lib/systemd/system/xrdp.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2020-08-29 20:47:56 CDT; 4s ago Docs: man:xrdp(8) man:xrdp.ini(5) Process: 2551 ExecStop=/usr/sbin/xrdp $XRDP_OPTIONS --kill (code=exited, status=0/SUCCESS) Process: 2566 ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS (code=exited, status=0/SUCCESS) Process: 2558 ExecStartPre=/bin/sh /usr/share/xrdp/socksetup (code=exited, status=0/SUCCESS) Main PID: 2567 (xrdp) Tasks: 1 (limit: 4682) CGroup: / └─2567 /usr/sbin/xrdp
Aug 29 20:47:55 novakvm systemd[1]: Starting xrdp daemon...
Aug 29 20:47:55 novakvm xrdp[2566]: (2566)(139886408361792)[DEBUG] Testing if xrdp can listen on 0.0.0.0 port 3389.
Aug 29 20:47:55 novakvm xrdp[2566]: (2566)(139886408361792)[DEBUG] Closed socket 7 (AF_INET6 :: port 3389)
-----> Aug 29 20:47:55 novakvm systemd[1]: xrdp.service: Can't open PID file /var/run/xrdp/xrdp.pid (yet?) after start: No such file or directory <----- THIS ONE
Aug 29 20:47:56 novakvm systemd[1]: Started xrdp daemon.
Aug 29 20:47:57 novakvm xrdp[2567]: (2567)(139886408361792)[INFO ] starting xrdp with pid 2567
Aug 29 20:47:57 novakvm xrdp[2567]: (2567)(139886408361792)[INFO ] listening to port 3389 on 0.0.0.0What is this file, what is meant to be there, is this potentially causing my problem, and what can I do about it?
(Other notes: Port 3389 on the Ubuntu machine is open, and even turning the firewall completely off on the Windows machine and running remote desktop as admin does not help.
42 Answers
I think it's because xrdp doesn't allow multiple sessions with the same user, and when you open the VM via the virtual manager, it's already consumed. Just for the sake of the test, could you create a new user and try to open a session with it?
It seems the hint is in "No such file or directory". The path might be a wrong destination or a destination the xRDP-Server can not find.
I do have a similar problem with almost the same messages we receive from trying the status out of xRDP with sudo systemctl status xrdp. It says
xrdp.service: Can´t open PID file /run/xrdp/xrdp.pid (yet?) after start: Operation not permittedMaybe try this path for your problem: /run/xrdp/xrdp.pid