LXDE & XRDP: Can't get a connection.

Hi,

I am trying to establish a remote connection to my lxde Desktop at my raspberry 4.

Should this just working?

I installed a fresh dietpi, with the software lxde and xrdp. I manage the autostart and autologin of lxde via dietpi-autostart. The connected monitor to my raspberry shows the lxde Desktop. Now I thought I could log into the lxde-Desktop via xrdp because my raspberry is normally running headless. But it shows some problems. Do I have to congfiure something?

Kind regards
Image 002.png

I did a test and for me this was working without issues and further configuration. You could do a reboot to clean logs, try to connect a again and check xrdp log files afterwards to see if there is something specific.

journalctl -u xrdp*

OK, it least it should work this way. I wasn´t sure how xrdp works with lxde.

But:

I tried two, or three times to login again. The log shows:

Apr 13 12:00:36 DietPi xrdp[535]: [INFO ] Socket 12: AF_INET6 connection received from ::ffff:192.168.178.16 port 56907
Apr 13 12:00:36 DietPi xrdp[1857]: [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
Apr 13 12:00:36 DietPi xrdp[1857]: [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
Apr 13 12:00:36 DietPi xrdp[1857]: [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied
Apr 13 12:00:36 DietPi xrdp[1857]: [ERROR] libxrdp_force_read: header read error
Apr 13 12:00:36 DietPi xrdp[1857]: [ERROR] Processing [ITU-T T.125] Connect-Initial failed
Apr 13 12:00:36 DietPi xrdp[1857]: [ERROR] [MCS Connection Sequence] receive connection request failed
Apr 13 12:00:36 DietPi xrdp[1857]: [ERROR] xrdp_sec_incoming: xrdp_mcs_incoming failed
Apr 13 12:00:36 DietPi xrdp[1857]: [ERROR] xrdp_rdp_incoming: xrdp_sec_incoming failed
Apr 13 12:00:36 DietPi xrdp[1857]: [ERROR] xrdp_process_main_loop: libxrdp_process_incoming failed
Apr 13 12:00:36 DietPi xrdp[1857]: [ERROR] xrdp_iso_send: trans_write_copy_s failed
Apr 13 12:00:36 DietPi xrdp[1857]: [ERROR] Sending [ITU T.125] DisconnectProviderUltimatum failed
Apr 13 12:00:36 DietPi xrdp[535]: [INFO ] Socket 12: AF_INET6 connection received from ::ffff:192.168.178.16 port 56908
Apr 13 12:00:36 DietPi xrdp[1858]: [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
Apr 13 12:00:36 DietPi xrdp[1858]: [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
Apr 13 12:00:36 DietPi xrdp[1858]: [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied
Apr 13 12:00:36 DietPi xrdp[1858]: [INFO ] Connected client computer name: PC-16L-NUC5I7RY
Apr 13 12:00:36 DietPi xrdp[1858]: [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc006 is unknown (ignored)
Apr 13 12:00:36 DietPi xrdp[1858]: [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc00a is unknown (ignored)
Apr 13 12:00:36 DietPi xrdp[1858]: [INFO ] xrdp_load_keyboard_layout: Keyboard information sent by the RDP client, keyboard_type:[0x04], keyboard_subtype:[0x00], keylayout:[0x00000407]
Apr 13 12:00:36 DietPi xrdp[1858]: [INFO ] xrdp_load_keyboard_layout: model [] variant [] layout [de] options []
Apr 13 12:00:36 DietPi xrdp[1858]: [INFO ] Non-TLS connection established from ::ffff:192.168.178.16 port 56908: encrypted with standard RDP security
Apr 13 12:00:36 DietPi xrdp[1858]: [INFO ] xrdp_caps_process_pointer: client supports new(color) cursor
Apr 13 12:00:36 DietPi xrdp[1858]: [INFO ] xrdp_process_offscreen_bmpcache: support level 1 cache size 10485760 MB cache entries 100
Apr 13 12:00:36 DietPi xrdp[1858]: [INFO ] xrdp_caps_process_codecs: nscodec, codec id 1, properties len 3
Apr 13 12:00:36 DietPi xrdp[1858]: [WARN ] xrdp_caps_process_codecs: unknown codec id 5
Apr 13 12:00:36 DietPi xrdp[1858]: [INFO ] xrdp_caps_process_codecs: RemoteFX, codec id 3, properties len 49
Apr 13 12:00:36 DietPi xrdp[1858]: [INFO ] Loading keymap file /etc/xrdp/km-00000407.ini
Apr 13 12:00:36 DietPi xrdp[1858]: [WARN ] local keymap file for 0x00000407 found and doesn't match built in keymap, using local keymap file
Apr 13 12:00:43 DietPi xrdp[1858]: [INFO ] connecting to sesman ip 127.0.0.1 port 3350
Apr 13 12:00:43 DietPi xrdp-sesman[525]: [INFO ] Socket 8: AF_INET6 connection received from ::1 port 49266
Apr 13 12:00:43 DietPi xrdp[1858]: [INFO ] xrdp_wm_log_msg: sesman connect ok
Apr 13 12:00:43 DietPi xrdp[1858]: [INFO ] sesman connect ok
Apr 13 12:00:43 DietPi xrdp[1858]: [INFO ] sending login info to session manager, please wait...
Apr 13 12:00:43 DietPi xrdp-sesman[525]: [INFO ] ++ reconnected session: username root, display :10.0, session_pid 1262, ip ::ffff:192.168.178.16:56908 - socket: 12
Apr 13 12:00:43 DietPi xrdp[1858]: [INFO ] xrdp_wm_log_msg: login successful for display 10
Apr 13 12:00:43 DietPi xrdp[1858]: [INFO ] login successful for display 10
Apr 13 12:00:43 DietPi xrdp-sesman[1859]: [INFO ] Starting session reconnection script on display 10: /etc/xrdp/reconnectwm.sh
Apr 13 12:00:43 DietPi xrdp-sesman[525]: [ERROR] sesman_data_in: scp_process_msg failed
Apr 13 12:00:43 DietPi xrdp-sesman[525]: [ERROR] sesman_main_loop: trans_check_wait_objs failed, removing trans
Apr 13 12:00:43 DietPi xrdp[1858]: [INFO ] loaded module 'libxup.so' ok, interface size 10296, version 4
Apr 13 12:00:43 DietPi xrdp[1858]: [INFO ] started connecting
Apr 13 12:00:43 DietPi xrdp[1858]: [INFO ] lib_mod_connect: connecting via UNIX socket
Apr 13 12:04:06 DietPi xrdp[535]: [INFO ] Socket 12: AF_INET6 connection received from ::ffff:192.168.178.16 port 56985
Apr 13 12:04:06 DietPi xrdp[1886]: [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
Apr 13 12:04:06 DietPi xrdp[1886]: [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
Apr 13 12:04:06 DietPi xrdp[1886]: [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied
Apr 13 12:04:06 DietPi xrdp[1886]: [ERROR] libxrdp_force_read: header read error
Apr 13 12:04:06 DietPi xrdp[1886]: [ERROR] Processing [ITU-T T.125] Connect-Initial failed
Apr 13 12:04:06 DietPi xrdp[1886]: [ERROR] [MCS Connection Sequence] receive connection request failed
Apr 13 12:04:06 DietPi xrdp[1886]: [ERROR] xrdp_sec_incoming: xrdp_mcs_incoming failed
Apr 13 12:04:06 DietPi xrdp[1886]: [ERROR] xrdp_rdp_incoming: xrdp_sec_incoming failed
Apr 13 12:04:06 DietPi xrdp[1886]: [ERROR] xrdp_process_main_loop: libxrdp_process_incoming failed
Apr 13 12:04:06 DietPi xrdp[1886]: [ERROR] xrdp_iso_send: trans_write_copy_s failed
Apr 13 12:04:06 DietPi xrdp[1886]: [ERROR] Sending [ITU T.125] DisconnectProviderUltimatum failed
Apr 13 12:04:06 DietPi xrdp[535]: [INFO ] Socket 12: AF_INET6 connection received from ::ffff:192.168.178.16 port 56986
Apr 13 12:04:06 DietPi xrdp[1887]: [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
Apr 13 12:04:06 DietPi xrdp[1887]: [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
Apr 13 12:04:06 DietPi xrdp[1887]: [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied
Apr 13 12:04:06 DietPi xrdp[1887]: [INFO ] Connected client computer name: PC-16L-NUC5I7RY
Apr 13 12:04:06 DietPi xrdp[1887]: [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc006 is unknown (ignored)
Apr 13 12:04:06 DietPi xrdp[1887]: [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc00a is unknown (ignored)
Apr 13 12:04:06 DietPi xrdp[1887]: [INFO ] xrdp_load_keyboard_layout: Keyboard information sent by the RDP client, keyboard_type:[0x04], keyboard_subtype:[0x00], keylayout:[0x00000407]
Apr 13 12:04:06 DietPi xrdp[1887]: [INFO ] xrdp_load_keyboard_layout: model [] variant [] layout [de] options []
Apr 13 12:04:06 DietPi xrdp[1887]: [INFO ] Non-TLS connection established from ::ffff:192.168.178.16 port 56986: encrypted with standard RDP security
Apr 13 12:04:06 DietPi xrdp[1887]: [INFO ] xrdp_caps_process_pointer: client supports new(color) cursor
Apr 13 12:04:06 DietPi xrdp[1887]: [INFO ] xrdp_process_offscreen_bmpcache: support level 1 cache size 10485760 MB cache entries 100
Apr 13 12:04:06 DietPi xrdp[1887]: [INFO ] xrdp_caps_process_codecs: nscodec, codec id 1, properties len 3
Apr 13 12:04:06 DietPi xrdp[1887]: [WARN ] xrdp_caps_process_codecs: unknown codec id 5
Apr 13 12:04:06 DietPi xrdp[1887]: [INFO ] xrdp_caps_process_codecs: RemoteFX, codec id 3, properties len 49
Apr 13 12:04:06 DietPi xrdp[1887]: [INFO ] Loading keymap file /etc/xrdp/km-00000407.ini
Apr 13 12:04:06 DietPi xrdp[1887]: [WARN ] local keymap file for 0x00000407 found and doesn't match built in keymap, using local keymap file
Apr 13 12:04:11 DietPi xrdp[1887]: [INFO ] connecting to sesman ip 127.0.0.1 port 3350
Apr 13 12:04:11 DietPi xrdp-sesman[525]: [INFO ] Socket 8: AF_INET6 connection received from ::1 port 49268
Apr 13 12:04:11 DietPi xrdp[1887]: [INFO ] xrdp_wm_log_msg: sesman connect ok
Apr 13 12:04:11 DietPi xrdp[1887]: [INFO ] sesman connect ok
Apr 13 12:04:11 DietPi xrdp[1887]: [INFO ] sending login info to session manager, please wait...
Apr 13 12:04:11 DietPi xrdp-sesman[525]: [INFO ] ++ reconnected session: username root, display :10.0, session_pid 1262, ip ::ffff:192.168.178.16:56986 - socket: 12
Apr 13 12:04:11 DietPi xrdp[1887]: [INFO ] xrdp_wm_log_msg: login successful for display 10
Apr 13 12:04:11 DietPi xrdp[1887]: [INFO ] login successful for display 10
Apr 13 12:04:11 DietPi xrdp[1887]: [INFO ] loaded module 'libxup.so' ok, interface size 10296, version 4
Apr 13 12:04:11 DietPi xrdp[1887]: [INFO ] started connecting
Apr 13 12:04:11 DietPi xrdp-sesman[1888]: [INFO ] Starting session reconnection script on display 10: /etc/xrdp/reconnectwm.sh
Apr 13 12:04:11 DietPi xrdp[1887]: [INFO ] lib_mod_connect: connecting via UNIX socket
Apr 13 12:04:11 DietPi xrdp-sesman[525]: [ERROR] sesman_data_in: scp_process_msg failed
Apr 13 12:04:11 DietPi xrdp-sesman[525]: [ERROR] sesman_main_loop: trans_check_wait_objs failed, removing trans
Apr 13 12:04:13 DietPi xrdp[1858]: [INFO ] connection problem, giving up
Apr 13 12:04:13 DietPi xrdp[1858]: [INFO ] some problem
Apr 13 12:04:13 DietPi xrdp[1858]: [ERROR] xrdp_sec_send_fastpath: xrdp_fastpath_send failed
Apr 13 12:04:13 DietPi xrdp[1858]: [ERROR] xrdp_rdp_send_fastpath: xrdp_sec_send_fastpath failed
Apr 13 12:04:13 DietPi xrdp[1858]: [ERROR] xrdp_orders_send: xrdp_rdp_send_fastpath failed
Apr 13 12:04:13 DietPi xrdp[1858]: [ERROR] xrdp_sec_send_fastpath: xrdp_fastpath_send failed
Apr 13 12:04:13 DietPi xrdp[1858]: [ERROR] xrdp_rdp_send_fastpath: xrdp_sec_send_fastpath failed
Apr 13 12:04:13 DietPi xrdp[1858]: [ERROR] xrdp_orders_send: xrdp_rdp_send_fastpath failed
Apr 13 12:04:13 DietPi xrdp[1858]: [ERROR] xrdp_sec_send_fastpath: xrdp_fastpath_send failed
Apr 13 12:04:13 DietPi xrdp[1858]: [ERROR] xrdp_rdp_send_fastpath: xrdp_sec_send_fastpath failed
Apr 13 12:04:13 DietPi xrdp[1858]: [ERROR] xrdp_orders_send: xrdp_rdp_send_fastpath failed
Apr 13 12:04:13 DietPi xrdp[1858]: [ERROR] xrdp_sec_send_fastpath: xrdp_fastpath_send failed
Apr 13 12:04:13 DietPi xrdp[1858]: [ERROR] xrdp_rdp_send_fastpath: xrdp_sec_send_fastpath failed
Apr 13 12:04:13 DietPi xrdp[1858]: [ERROR] xrdp_orders_send: xrdp_rdp_send_fastpath failed
Apr 13 12:04:13 DietPi xrdp[1858]: [ERROR] xrdp_sec_send_fastpath: xrdp_fastpath_send failed
Apr 13 12:04:13 DietPi xrdp[1858]: [ERROR] xrdp_rdp_send_fastpath: xrdp_sec_send_fastpath failed
Apr 13 12:04:13 DietPi xrdp[1858]: [ERROR] xrdp_orders_send: xrdp_rdp_send_fastpath failed
Apr 13 12:04:13 DietPi xrdp[1858]: [ERROR] xrdp_iso_send: trans_write_copy_s failed
Apr 13 12:04:13 DietPi xrdp[1858]: [ERROR] xrdp_mcs_send: xrdp_iso_send failed
Apr 13 12:04:13 DietPi xrdp[1858]: [ERROR] xrdp_sec_send: xrdp_mcs_send failed
Apr 13 12:04:13 DietPi xrdp[1858]: [ERROR] xrdp_rdp_send_data: xrdp_sec_send failed
Apr 13 12:04:13 DietPi xrdp[1858]: [ERROR] Sending [MS-RDPBCGR] TS_SHUTDOWN_DENIED_PDU failed
Apr 13 12:04:13 DietPi xrdp[1858]: [ERROR] xrdp_sec_recv: xrdp_mcs_recv failed
Apr 13 12:04:13 DietPi xrdp[1858]: [ERROR] xrdp_rdp_recv: xrdp_sec_recv failed
Apr 13 12:04:13 DietPi xrdp[1858]: [ERROR] libxrdp_process_data: xrdp_rdp_recv failed
Apr 13 12:04:13 DietPi xrdp[1858]: [ERROR] xrdp_process_data_in: xrdp_process_loop failed
Apr 13 12:04:13 DietPi xrdp[1858]: [ERROR] xrdp_iso_send: trans_write_copy_s failed
Apr 13 12:04:13 DietPi xrdp[1858]: [ERROR] Sending [ITU T.125] DisconnectProviderUltimatum failed

Did you install LXDE as well as XRDP via dietpi-software? I’m asking since e.g. on Buster there is a known issue with XRDP on ARM which we work around, aside of some other issues, like failing mouse/keyboard input and such.

ah just as side not, not related. XRDP will create a virtual desktop. It will not be the physical desktop you will see once connected via RDP. Means, if you like to get the physical desktop, you would need to look into VNC. If you like to get XRDP/ virtual desktop only, there would ne no need to start into LXDE using autostart.

I have the same problem or “same” error message.

Since when?
Played around with the Kodi installation. Then wanted to do a reboot. Reboot was then done through the console via the xrdp connection to LXDE.

Since the reboot I can no longer connect to the root user via xrdp.

The login works with the dietpi user, then of course without root rights. But it works.

What went wrong here with the root user? Otherwise there are no problems with all applications and ssh login.

What I had done, xrdp and lxde uninstalled and reinstalled.

Likewise, one of the VNC connections tries to install, but the VNC services are not started…

RPI-4 (8GB), Dietpi v8.3.1

Edit, Logs:

xrdp.log:

[20220430-19:44:08] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:192.168.178.21 port 59763
[20220430-19:44:08] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20220430-19:44:08] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20220430-19:44:08] [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied
[20220430-19:44:08] [ERROR] libxrdp_force_read: header read error
[20220430-19:44:08] [ERROR] Processing [ITU-T T.125] Connect-Initial failed
[20220430-19:44:08] [ERROR] [MCS Connection Sequence] receive connection request failed
[20220430-19:44:08] [ERROR] xrdp_sec_incoming: xrdp_mcs_incoming failed
[20220430-19:44:08] [ERROR] xrdp_rdp_incoming: xrdp_sec_incoming failed
[20220430-19:44:08] [ERROR] xrdp_process_main_loop: libxrdp_process_incoming failed
[20220430-19:44:08] [ERROR] xrdp_iso_send: trans_write_copy_s failed
[20220430-19:44:08] [ERROR] Sending [ITU T.125] DisconnectProviderUltimatum failed
[20220430-19:44:08] [INFO ] Socket 12: AF_INET6 connection received from ::ffff:192.168.178.21 port 59764
[20220430-19:44:08] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20220430-19:44:08] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20220430-19:44:08] [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied
[20220430-19:44:08] [INFO ] Connected client computer name: DANA4
[20220430-19:44:08] [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc006 is unknown (ignored)
[20220430-19:44:08] [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc00a is unknown (ignored)
[20220430-19:44:08] [INFO ] xrdp_load_keyboard_layout: Keyboard information sent by the RDP client, keyboard_type:[0x04], keyboard_subtype:[0x00], keylayout:[0x00000407]
[20220430-19:44:08] [INFO ] xrdp_load_keyboard_layout: model [] variant [] layout [de] options []
[20220430-19:44:08] [INFO ] Non-TLS connection established from ::ffff:192.168.178.21 port 59764: encrypted with standard RDP security
[20220430-19:44:08] [INFO ] xrdp_caps_process_pointer: client supports new(color) cursor
[20220430-19:44:08] [INFO ] xrdp_process_offscreen_bmpcache: support level 1 cache size 10485760 MB cache entries 100
[20220430-19:44:08] [INFO ] xrdp_caps_process_codecs: nscodec, codec id 1, properties len 3
[20220430-19:44:08] [WARN ] xrdp_caps_process_codecs: unknown codec id 5
[20220430-19:44:08] [INFO ] xrdp_caps_process_codecs: RemoteFX, codec id 3, properties len 49
[20220430-19:44:08] [INFO ] Loading keymap file /etc/xrdp/km-00000407.ini
[20220430-19:44:08] [WARN ] local keymap file for 0x00000407 found and doesn't match built in keymap, using local keymap file
[20220430-19:44:15] [INFO ] connecting to sesman ip 127.0.0.1 port 3350
[20220430-19:44:15] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20220430-19:44:15] [INFO ] sesman connect ok
[20220430-19:44:15] [INFO ] sending login info to session manager, please wait...
[20220430-19:44:15] [INFO ] xrdp_wm_log_msg: login successful for display 16
[20220430-19:44:15] [INFO ] login successful for display 16
[20220430-19:44:15] [INFO ] loaded module 'libxup.so' ok, interface size 10296, version 4
[20220430-19:44:15] [INFO ] started connecting
[20220430-19:44:15] [INFO ] lib_mod_connect: connecting via UNIX socket
[20220430-19:47:45] [INFO ] connection problem, giving up
[20220430-19:47:45] [INFO ] some problem

xrdp-sesman.log:

[20220430-19:44:15] [INFO ] Socket 8: AF_INET6 connection received from ::ffff:127.0.0.1 port 44266
[20220430-19:44:15] [INFO ] ++ reconnected session: username root, display :16.0, session_pid 59157, ip ::ffff:192.168.178.21:59764 - socket: 12
[20220430-19:44:15] [INFO ] Starting session reconnection script on display 16: /etc/xrdp/reconnectwm.sh
[20220430-19:44:15] [ERROR] sesman_data_in: scp_process_msg failed
[20220430-19:44:15] [ERROR] sesman_main_loop: trans_check_wait_objs failed, removing trans

fehler.png

Hi,
today I have tested TigerVNC with LXDE-Desktop. Works pretty good.

As client for Windows 11 I have downloaded the binary vncviewer64-1.12.0.exe: https://sourceforge.net/projects/tigervnc/
(Portable version)

Thank you

Kind regards