Ubuntu 20.04 Remote Desktop Access from Windows 10 - LinuxConfig.org

In this tutorial we will be sharing a Ubuntu 20.04 desktop with a Windows 10 client.
This is a companion discussion topic for the original entry at https://linuxconfig.org/ubuntu-20-04-remote-desktop-access-from-windows-10

Wondering why this tutorial is not working on a fresh install of 20.04? Any other prerequisites?

Yes - I just tried on a brand new 20.04 install and it failed on second step…

Hi Ieoseccia,

Welcome to our forums.

Please provide us the relevant journald entries so we can get to know your issue a bit better. You can execute the journalctl -xe your error output suggest to see the journal.

The Windows to Linux XRDP login has been broken since 14.04 or 16.04. You can only have ONE
connection into Linux at a time. That’s why you have to log out of the console X-session before you can do a remote session from Windows. I don’t why Ubuntu has been modified and changed to
almost useless the last years. FYI I have used Linux since version 0.1 in 1991. Sorry to say that 20.04 is very crappy in many ways and I have just started to test this new version. I’m testing now on Raspberry pi 3+ and RPI-4 + Virtual BOX+ Lenovo laptop (Y510P).

Good tutorial thanks but I got the black screen. Strangely, I can Remmina into Windows 10 from UbuntuDDE without any drama…Can’t make it work the other way around though or even Ubuntu to Ubuntu. A tutorial on how to make either of them work would be most welcome,

Hi Harry_Eaton,

Welcome to our forums.

I had my share of hard to find problems too when I had to setup xrdp the last time. I would suggest you check logfiles for any related error messages, in case of Ubuntu /var/log/syslog and /var/log/auth.log are the first two I would look into. You should check for entries at the time the service starts, and/or when you try to connect to it. Journald may also provide information that may be useful debugging the issue.

Thanks for this help.
But a question:
Why I can’t login as root?
I just created a new user and could login with that.

Thank you.

Hi Mohamad_Reza_Ghasemi,

Welcome to our forums.

In case you are using Ubuntu, this is not a bug but a feature. With the default installation, you can’t log in as root by any means, be it ssh, or remote graphical session. This is a safety measure, the root user by default does not have a valid password on Ubuntu systems.

I followed these directions and it works. When I first tried to login I received a blank black screen. Logging off from the actual computer, then logging in remotely solved the black screen problem.

I have found a quite strange issue with my rdp connection to Linux from Windows10. When you are logged in on a remote Linux machine and start a gnome-terminal or a nautilus from it than the Windows RDP version starts to open the terminal and the nautilus GUIs on the remote Linux display and you can’t see them on the RDP Widows display. It also works vice versa, when the terminal or the nautilus were firstly initialized on the remote Windows connection, you can open GUi of terminal/nautilus from your Linux machine on this remote connection without appearing them on the Linux display. Somehow, RDP locks up on the place of the first initialization. Then only logout from remote machine can fix this thing. Has someone met such a strange behavior?

Hallo, I state that I faced the question for a few days. In fact xdrp on ubuntu 20.04 and unable to manage the double session with the same user. So I solved the issue by disabling the automatic account session on startup. This way you can take control of your PC with ubuntu from anywhere on the network. Or you need to create another administrative account to use xrdp at the same time as the active session on the ubuntu pc.

1 Like

saved me.


Install worked just fine, thank you! Connecting from Windows 10 1909 to ubuntu 20.04, have to log off ubuntu first, otherwise get black screen.

I get solved follow below:

echo xfce4-session >~/.xsession sudo vi /etc/xrdp/startwm.sh
mark last line “exec . /etc/X11/Xsession”
and add “startxfce4”

$ sudo service xrdp restart

and fixed , could login with RDP client

Hello , i did follow the instructions and X server was installed successfully.
When I try to login , it is open the session and after that it close.
this is the log:

[20200802-12:36:32] [INFO ] Socket 12: AF_INET6 connection received from ::ffff: port 50857
[20200802-12:36:32] [DEBUG] Closed socket 12 (AF_INET6 ::ffff: port 3389)
[20200802-12:36:33] [DEBUG] Closed socket 12 (AF_INET6 ::ffff: port 3389)
[20200802-12:36:33] [DEBUG] Closed socket 11 (AF_INET6 :: port 3389)
[20200802-12:36:33] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20200802-12:36:33] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20200802-12:36:33] [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied
[20200802-12:36:33] [DEBUG] TLSv1.3 enabled
[20200802-12:36:33] [DEBUG] TLSv1.2 enabled
[20200802-12:36:34] [DEBUG] Security layer: requested 0, selected 0
[20200802-12:36:34] [INFO ] connected client computer name: TOSHO-MSI
[20200802-12:36:34] [INFO ] adding channel item name rdpdr chan_id 1004 flags 0x80800000
[20200802-12:36:34] [INFO ] adding channel item name rdpsnd chan_id 1005 flags 0xc0000000
[20200802-12:36:34] [INFO ] adding channel item name cliprdr chan_id 1006 flags 0xc0a00000
[20200802-12:36:34] [INFO ] adding channel item name drdynvc chan_id 1007 flags 0xc0800000
[20200802-12:36:34] [INFO ] Non-TLS connection established from ::ffff: port 50857: encrypted with standard RDP security
[20200802-12:36:34] [DEBUG] xrdp_00000649_wm_login_mode_event_00000001
[20200802-12:36:35] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini
[20200802-12:36:35] [WARN ] local keymap file for 0x00000409 found and doesn’t match built in keymap, using local keymap file
[20200802-12:36:35] [DEBUG] xrdp_wm_log_msg: connecting to sesman ip port 3350
[20200802-12:36:35] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20200802-12:36:35] [DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait…
[20200802-12:36:35] [DEBUG] return value from xrdp_mm_connect 0
[20200802-12:36:36] [INFO ] xrdp_wm_log_msg: login successful for display 10
[20200802-12:36:36] [DEBUG] xrdp_wm_log_msg: started connecting
[20200802-12:36:40] [DEBUG] Closed socket 17 (AF_UNIX)
[20200802-12:36:40] [INFO ] lib_mod_log_peer: xrdp_pid=1609 connected to X11rdp_pid=1643 X11rdp_uid=1000 X11rdp_gid=1000 client_ip=::ffff: client_port=50857
[20200802-12:36:40] [DEBUG] xrdp_wm_log_msg: connected ok
[20200802-12:36:40] [DEBUG] xrdp_mm_connect_chansrv: chansrv connect successful
[20200802-12:36:41] [DEBUG] Closed socket 16 (AF_INET6 ::1 port 53668)
[20200802-12:36:50] [DEBUG] Closed socket 12 (AF_INET6 ::ffff: port 3389)
[20200802-12:36:50] [DEBUG] xrdp_mm_module_cleanup
[20200802-12:36:51] [DEBUG] Closed socket 17 (AF_UNIX)
[20200802-12:36:51] [DEBUG] Closed socket 18 (AF_UNIX)

Hi Topche,

Welcome to our forums.

Any related messages in your /var/log/auth.log?

Ran into same problem & found easy fix (won’t let me add link). My PCs are “displays” without a keyboard so it’s difficult to logoff before remote desktop session.

edit /etc/xrdp/startwm.sh and add these lines before the lines that test and execute Xsession.


THIS WORKED to eliminate BLACK screen from Win10 on UBUNTU 20LTS (20.04.1)

1 Like

See my other reply for fix that worked for me to prevent black screen and permit multiple RD sessions.

The solution you provided, worked great! I am going to try the solution for black screen provided by @fmgst