I installed Ubuntu 20.04 and then installed xrdp. Whenever i tried to connect, either from another Ubuntu 20.04 box using either xfreerdp or krdc, or from a Mac, a black screen would show up, and then immediately disconnect. i made sure i did not have any other sessions on the server going on at the same time.
After a while, i gave up and tried the script at: https://www.c-nergy.be/products.html it didn't make a difference
this is the only output from /var/log/xrdp.log
[20200529-18:17:16] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:192.168.0.216 port 45006
[20200529-18:17:16] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.0.199 port 3389)
[20200529-18:17:16] [DEBUG] Closed socket 11 (AF_INET6 :: port 3389)
[20200529-18:17:16] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20200529-18:17:16] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20200529-18:17:16] [DEBUG] TLSv1.3 enabled
[20200529-18:17:16] [DEBUG] TLSv1.2 enabled
[20200529-18:17:16] [DEBUG] Security layer: requested 3, selected 1
[20200529-18:17:16] [INFO ] connected client computer name: coruscant
[20200529-18:17:16] [INFO ] adding channel item name cliprdr chan_id 1004 flags 0xc0a00000
[20200529-18:17:16] [INFO ] TLS connection established from ::ffff:192.168.0.216 port 45006: TLSv1.3 with cipher TLS_AES_256_GCM_SHA384
[20200529-18:17:16] [DEBUG] xrdp_00000506_wm_login_mode_event_00000001
[20200529-18:17:16] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini
[20200529-18:17:16] [WARN ] local keymap file for 0x00000409 found and doesn't match built in keymap, using local keymap file
[20200529-18:17:17] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.0.199 port 3389)
[20200529-18:17:17] [DEBUG] xrdp_mm_module_cleanup
thank you very much
I was able to solve this issue by logging out of the desktop session for the machine before trying RDP.
I'd faced the same issue in my local server Ubuntu 20.04 (Installed xubuntu-desktop) and I had fixed it by executing the following command.
If you get a Warning Message [Authentication is required to create a color managed device] while connecting to the Ubuntu server through Xrdp, you need to execute the following commands to ignore it:
It seems to be possible to allow multiple sessions so that you don't have to logout or end up in the blackscreen. Worked on my 20.04 LTS just by adding two lines into the startwm.sh.
Add in the very top:
then:
Credits to Peter Bennett @catch22cats, thanks!
After many tries and some fixes I was able to rdp but:
So I found this xRDP installation script that works perfectly! Credits to Griffon!!
Just download, unzip and run:
1. Remove previously installed xrdp:
2. Re-install xrdp & required packages:
You also need to grant access to the /etc/ssl/private/ssl-cert-snakeoil.key file for xrdp user. It is available to members of the ssl-cert group by default.
3. Reboot system:
4. Firewall configuration:
You need to open access on port 3389.
It is more secure to open it only for your IP address or network. For example:
The best practice is to use an SSH tunnel to connect to the remote desktop and make xRDP listen only for local connections.
5. Setup your RDP-client
Please note that in some cases the user who will connect to xRDP must log out before doing so!
Related commands:
This is a big problem to many useres. I found out an error on my systems. I am using 2 Odroid C2 computers. I had the same issues. I installed from scratch and everything was ok. Then i did something not related to Remotedesktop and after that i could not log anymore. The last time i had the system working fine and i changed the IP adress from xxx.xxx.xxx.094 to xxx.xxx.xxx.096 I could not log in via Remotedesktop. I had the second system running good, so i startet to compare files in my case the /etc/xrdp/startwm.sh had a complete different content. It looked like it was copied over with a different text. Unfortunetly i got not further in it. I restored this file and now it is working fine again. There are so many tips for this problem, so just check that file.
Install Xrdp Server again.
root@ubuntu:~#
apt -y install xrdp tigervnc-standalone-server
Start Xrdp Server.
root@ubuntu:~#
systemctl enable xrdp
Connect from other clients.
Try to install xrdp package by using sudo instead of root user. This works perfectly fine & tested on MAC (Microsoft Remote Desktop) & Window 10.
Link: https://linuxconfig.org/ubuntu-20-04-remote-desktop-access-from-windows-10