Ubuntu – Connect to Ubuntu 18.04 via RDP

remote desktop

It feels like RDPing into my Ubuntu machine depends on the weather, stars or moon. Sometimes it works, sometimes it doesn't. I've tried various fixes that I've found in guides online including:

  • Using RDP from ppa:martinx/xrdp-hwe-18.04
  • Running echo "gnome-session –session=ubuntu-2d" > .xsession
  • Connecting to the X11 RDP session and then the normal RDP session
  • Adding RDP to the ssl-cert group

I've purged RDP, reinstalled, purged again – with no luck.

There is no real error message – just that something went wrong and it sits there.

This is the error message that I get in the Windows RDP client:

Windows RDP Client Error

Here's the output of the log xrdp.log:

[20190411-14:03:25] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:192.168.0.10 port 62096
[20190411-14:03:25] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.0.199 port 3389)
[20190411-14:03:25] [DEBUG] Closed socket 11 (AF_INET6 :: port 3389)
[20190411-14:03:25] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20190411-14:03:25] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20190411-14:03:25] [DEBUG] TLSv1.2 enabled
[20190411-14:03:25] [DEBUG] TLSv1.1 enabled
[20190411-14:03:26] [DEBUG] TLSv1 enabled
[20190411-14:03:26] [DEBUG] Security layer: requested 11, selected 1
[20190411-14:03:26] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.0.199 port 3389)
[20190411-14:03:26] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:192.168.0.10 port 62098
[20190411-14:03:26] [DEBUG] Closed socket 12 (AF_INET6 ::ffff:192.168.0.199 port 3389)
[20190411-14:03:26] [DEBUG] Closed socket 11 (AF_INET6 :: port 3389)
[20190411-14:03:26] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20190411-14:03:26] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20190411-14:03:26] [DEBUG] TLSv1.2 enabled
[20190411-14:03:26] [DEBUG] TLSv1.1 enabled
[20190411-14:03:26] [DEBUG] TLSv1 enabled
[20190411-14:03:26] [DEBUG] Security layer: requested 11, selected 1
[20190411-14:03:26] [INFO ] connected client computer name: JOHN
[20190411-14:03:26] [INFO ] TLS connection established from ::ffff:192.168.0.10 port 62098: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384
[20190411-14:03:26] [DEBUG] xrdp_0000059c_wm_login_mode_event_00000001
[20190411-14:03:26] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini
[20190411-14:03:26] [WARN ] local keymap file for 0x00000409 found and doesn't match built in keymap, using local keymap file
[20190411-14:03:43] [DEBUG] xrdp_wm_log_msg: connecting to sesman ip 127.0.0.1 port 3350
[20190411-14:03:44] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20190411-14:03:44] [DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait...
[20190411-14:03:44] [DEBUG] return value from xrdp_mm_connect 0
[20190411-14:03:44] [INFO ] xrdp_wm_log_msg: login successful for display 10
[20190411-14:03:44] [DEBUG] xrdp_wm_log_msg: started connecting
[20190411-14:03:47] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:03:51] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:03:54] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:03:58] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:04:01] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:04:05] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:04:08] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:04:12] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:04:15] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:04:19] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:04:22] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:04:26] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:04:29] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:04:33] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:04:36] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:04:40] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:04:43] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:04:47] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:04:50] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:04:54] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:04:57] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:05:01] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:05:04] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:05:08] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:05:11] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:05:15] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:05:18] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:05:22] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:05:26] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:05:29] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:05:33] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:05:36] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:05:40] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:05:43] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:05:47] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:05:50] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:05:54] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:05:57] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:06:01] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:06:04] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:06:08] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:06:11] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:06:15] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:06:18] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:06:22] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:06:25] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:06:29] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:06:32] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:06:36] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:06:39] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:06:43] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:06:46] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:06:50] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:06:53] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:06:57] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:07:00] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:07:04] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:07:07] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:07:11] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:07:14] [DEBUG] xrdp_wm_log_msg: connection problem, giving up
[20190411-14:07:14] [DEBUG] Closed socket 19 (AF_UNIX)
[20190411-14:07:14] [DEBUG] xrdp_wm_log_msg: some problem
[20190411-14:07:14] [DEBUG] xrdp_mm_module_cleanup
[20190411-14:07:14] [DEBUG] Closed socket 18 (AF_INET6 ::ffff:127.0.0.1 port 32924)

Best Answer

  • Again, just an idea...maybe you have to check the following configuration file

    /etc/X11/Xwrapper.config

    and ensure that the line

    allowed_user=console
    is changed to

    allowed_user=anybody

    The errors in your logs might indicate that only console users can indeed connect to the X server

    The following link might be useful to debug your issue

    XRDP – HowTo install on Ubuntu Gnome 17.04 – easy way

    Hope this help Till next time See ya

  • Related Question