I'm using Ubuntu 18.04.5 LTS. I installed xrdp but getting the black screen error even after I logged out from remote computer physically. (This happens even though I'm not logged into the device anymore.)
Log file:
[20210826-06:43:46] [DEBUG] Testing if xrdp can listen on 0.0.0.0 port 3389.
[20210826-06:43:46] [DEBUG] Closed socket 7 (AF_INET6 :: port 3389)
[20210826-06:43:48] [INFO ] starting xrdp with pid 2041
[20210826-06:43:48] [INFO ] listening to port 3389 on 0.0.0.0
[20210826-06:53:48] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:192.168.1.100 port 56519
[20210826-06:53:48] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.1.102 port 3389)
[20210826-06:53:48] [DEBUG] Closed socket 11 (AF_INET6 :: port 3389)
[20210826-06:53:48] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20210826-06:53:48] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20210826-06:53:48] [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied
[20210826-06:53:48] [DEBUG] TLSv1.2 enabled
[20210826-06:53:49] [DEBUG] TLSv1.1 enabled
[20210826-06:53:49] [DEBUG] TLSv1 enabled
[20210826-06:53:49] [DEBUG] Security layer: requested 11, selected 0
[20210826-06:53:49] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.1.102 port 3389)
[20210826-06:53:53] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:192.168.1.100 port 56520
[20210826-06:53:53] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.1.102 port 3389)
[20210826-06:53:53] [DEBUG] Closed socket 11 (AF_INET6 :: port 3389)
[20210826-06:53:53] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20210826-06:53:53] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20210826-06:53:53] [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied