My laptop:
- Processor AMD Ryzen 9 6900HX with Radeon Graphics
- Installed RAM 32GB
- System type 64-bit operating system, x64-basedprocessor
- Windows 11 Home 22H2
I want to run the Ubuntu xfce4 GUI, I'm following this guide: https://hub.tcno.co/windows/wsl/desktop-gui/
In summary it instructs to:
- Install Ubuntu using WSL2
- Update/Upgrade Ubuntu
- Install xfce4
- Open Ubuntu GUI with Remote Desktop
Upon opening remote desktop at localhost:3390, it gives me a login GUI.I enter the credentials and then it goes black for a second, and then exits.
Checking on the logs, I get this:
From xrdp-sesman.log
[20230627-14:59:56] [INFO ] Socket 8: AF_INET6 connection received from ::1 port 33992[20230627-14:59:56] [INFO ] Terminal Server Users group is disabled, allowing authentication[20230627-14:59:56] [INFO ] ++ created session (access granted): username raul, ip ::1:47816 - socket: 12[20230627-14:59:56] [INFO ] starting Xorg session...[20230627-14:59:56] [INFO ] Starting session: session_pid 30536, display :8.0, width 1280, height 1024, bpp 24, client ip ::1:47816 - socket: 12, user name raul[20230627-14:59:56] [INFO ] [session start] (display 8): calling auth_start_session from pid 30536[20230627-14:59:56] [ERROR] sesman_data_in: scp_process_msg failed[20230627-14:59:56] [ERROR] sesman_main_loop: trans_check_wait_objs failed, removing trans[20230627-14:59:56] [INFO ] Starting X server on display 8: /usr/lib/xorg/Xorg :8 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log[20230627-14:59:56] [INFO ] Found X server running at /tmp/.X8-lock[20230627-14:59:56] [INFO ] Found X server running at /tmp/.X8-lock[20230627-14:59:56] [INFO ] Found X server running at /tmp/.X8-lock[20230627-14:59:56] [INFO ] Session started successfully for user raul on display 8[20230627-14:59:56] [INFO ] Starting the xrdp channel server for display 8[20230627-14:59:56] [INFO ] Starting the default window manager on display 8: /etc/xrdp/startwm.sh[20230627-14:59:56] [INFO ] Session in progress on display 8, waiting until the window manager (pid 30537) exits to end the session[20230627-14:59:57] [WARN ] Window manager (pid 30537, display 8) exited with non-zero exit code 139 and signal 0. This could indicate a window manager config problem[20230627-14:59:57] [WARN ] Window manager (pid 30537, display 8) exited quickly (1 secs). This could indicate a window manager config problem[20230627-14:59:57] [INFO ] Calling auth_stop_session and auth_end from pid 30536[20230627-14:59:57] [INFO ] Terminating X server (pid 30538) on display 8[20230627-14:59:57] [INFO ] Terminating the xrdp channel server (pid 30541) on display 8[20230627-14:59:57] [INFO ] X server on display 8 (pid 30538) returned exit code 0 and signal number 0[20230627-14:59:57] [INFO ] xrdp channel server for display 8 (pid 30541) exit code 0 and signal number 0[20230627-14:59:57] [INFO ] cleanup_sockets:[20230627-14:59:57] [INFO ] ++ terminated session: username raul, display :8.0, session_pid 30536, ip ::1:47816 - socket: 12
From what I can see, the interesting bit is this:
Session in progress on display 8, waiting until the window manager (pid 30537) exits to end the session[20230627-14:59:57] [WARN ] Window manager (pid 30537, display 8) exited with non-zero exit code 139 and signal 0. This could indicate a window manager config problem[20230627-14:59:57] [WARN ] Window manager (pid 30537, display 8) exited quickly (1 secs). This could indicate a window manager config problem
This is from xrdp.log
[20230627-16:12:42] [INFO ] Socket 12: AF_INET6 connection received from ::1 port 44834[20230627-16:12:42] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem[20230627-16:12:42] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem[20230627-16:12:42] [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied[20230627-16:12:42] [ERROR] libxrdp_force_read: header read error[20230627-16:12:42] [ERROR] Processing [ITU-T T.125] Connect-Initial failed[20230627-16:12:42] [ERROR] [MCS Connection Sequence] receive connection request failed[20230627-16:12:42] [ERROR] xrdp_sec_incoming: xrdp_mcs_incoming failed[20230627-16:12:42] [ERROR] xrdp_rdp_incoming: xrdp_sec_incoming failed[20230627-16:12:42] [ERROR] xrdp_process_main_loop: libxrdp_process_incoming failed[20230627-16:12:42] [ERROR] xrdp_iso_send: trans_write_copy_s failed[20230627-16:12:42] [ERROR] Sending [ITU T.125] DisconnectProviderUltimatum failed[20230627-16:12:42] [INFO ] Socket 12: AF_INET6 connection received from ::1 port 44838[20230627-16:12:42] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem[20230627-16:12:42] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem[20230627-16:12:42] [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied[20230627-16:12:42] [INFO ] Connected client computer name: RAUL-CSA-PC[20230627-16:12:42] [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc006 is unknown (ignored)[20230627-16:12:42] [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc00a is unknown (ignored)[20230627-16:12:42] [INFO ] xrdp_load_keyboard_layout: Keyboard information sent by the RDP client, keyboard_type:[0x04], keyboard_subtype:[0x00], keylayout:[0x00000409][20230627-16:12:42] [INFO ] xrdp_load_keyboard_layout: model [] variant [] layout [us] options [][20230627-16:12:42] [INFO ] Non-TLS connection established from ::1 port 44838: encrypted with standard RDP security[20230627-16:12:42] [INFO ] xrdp_caps_process_pointer: client supports new(color) cursor[20230627-16:12:42] [INFO ] xrdp_process_offscreen_bmpcache: support level 1 cache size 10485760 MB cache entries 100[20230627-16:12:42] [INFO ] xrdp_caps_process_codecs: nscodec, codec id 1, properties len 3[20230627-16:12:42] [WARN ] xrdp_caps_process_codecs: unknown codec id 5[20230627-16:12:42] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini[20230627-16:12:42] [WARN ] local keymap file for 0x00000409 found and doesn't match built in keymap, using local keymap file[20230627-16:15:08] [INFO ] connecting to sesman ip 127.0.0.1 port 3350[20230627-16:15:08] [INFO ] xrdp_wm_log_msg: sesman connect ok[20230627-16:15:08] [INFO ] sesman connect ok[20230627-16:15:08] [INFO ] sending login info to session manager, please wait...[20230627-16:15:08] [INFO ] xrdp_wm_log_msg: login successful for display 8[20230627-16:15:08] [INFO ] login successful for display 8[20230627-16:15:08] [INFO ] loaded module 'libxup.so' ok, interface size 10296, version 4[20230627-16:15:08] [INFO ] started connecting[20230627-16:15:08] [INFO ] lib_mod_connect: connecting via UNIX socket[20230627-16:15:08] [INFO ] lib_mod_log_peer: xrdp_pid=30794 connected to X11rdp_pid=30797 X11rdp_uid=1000 X11rdp_gid=1000 client_ip=::1 client_port=44838[20230627-16:15:08] [INFO ] connected ok[20230627-16:15:36] [INFO ] Socket 12: AF_INET6 connection received from ::1 port 50928[20230627-16:15:36] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem[20230627-16:15:36] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem[20230627-16:15:36] [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied[20230627-16:15:36] [ERROR] libxrdp_force_read: header read error[20230627-16:15:36] [ERROR] Processing [ITU-T T.125] Connect-Initial failed[20230627-16:15:36] [ERROR] [MCS Connection Sequence] receive connection request failed[20230627-16:15:36] [ERROR] xrdp_sec_incoming: xrdp_mcs_incoming failed[20230627-16:15:36] [ERROR] xrdp_rdp_incoming: xrdp_sec_incoming failed[20230627-16:15:36] [ERROR] xrdp_process_main_loop: libxrdp_process_incoming failed[20230627-16:15:36] [ERROR] xrdp_iso_send: trans_write_copy_s failed[20230627-16:15:36] [ERROR] Sending [ITU T.125] DisconnectProviderUltimatum failed[20230627-16:15:36] [INFO ] Socket 12: AF_INET6 connection received from ::1 port 50934[20230627-16:15:36] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem[20230627-16:15:36] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem[20230627-16:15:36] [ERROR] Cannot read private key file /etc/xrdp/key.pem: Permission denied[20230627-16:15:36] [INFO ] Connected client computer name: RAUL-CSA-PC[20230627-16:15:36] [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc006 is unknown (ignored)[20230627-16:15:36] [WARN ] Received [MS-RDPBCGR] TS_UD_HEADER type 0xc00a is unknown (ignored)[20230627-16:15:36] [INFO ] xrdp_load_keyboard_layout: Keyboard information sent by the RDP client, keyboard_type:[0x04], keyboard_subtype:[0x00], keylayout:[0x00000409][20230627-16:15:36] [INFO ] xrdp_load_keyboard_layout: model [] variant [] layout [us] options [][20230627-16:15:36] [INFO ] Non-TLS connection established from ::1 port 50934: encrypted with standard RDP security[20230627-16:15:36] [INFO ] xrdp_caps_process_pointer: client supports new(color) cursor[20230627-16:15:36] [INFO ] xrdp_process_offscreen_bmpcache: support level 1 cache size 10485760 MB cache entries 100[20230627-16:15:36] [INFO ] xrdp_caps_process_codecs: nscodec, codec id 1, properties len 3[20230627-16:15:36] [WARN ] xrdp_caps_process_codecs: unknown codec id 5[20230627-16:15:36] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini[20230627-16:15:36] [WARN ] local keymap file for 0x00000409 found and doesn't match built in keymap, using local keymap file[20230627-16:15:38] [ERROR] xrdp_sec_recv: xrdp_mcs_recv failed[20230627-16:15:38] [ERROR] xrdp_rdp_recv: xrdp_sec_recv failed[20230627-16:15:38] [ERROR] libxrdp_process_data: xrdp_rdp_recv failed[20230627-16:15:38] [ERROR] xrdp_process_data_in: xrdp_process_loop failed
Which ironically says this (as opposed to the display conflict error above)
[20230627-16:15:08] [INFO ] sesman connect ok[20230627-16:15:08] [INFO ] sending login info to session manager, please wait...[20230627-16:15:08] [INFO ] xrdp_wm_log_msg: login successful for display 8[20230627-16:15:08] [INFO ] login successful for display 8
I can't seem to get around this issue, earlier I tried another tutorial where VcXsrv Windows X Server was used, with the same error basically, that the display was already in use.
It's like no matter which of these types of approaches I attempt, I always get the display issue.
To fix this I've tried:
- Searching for any X related process in Ubuntu, it never finds any
- Searching for any X related process in Windows, it never finds any
And yet, according to the logs, there's always some display conflict making everything shut down.
This is from the xrdp service itself
● xrdp.service - xrdp daemon Loaded: loaded (/lib/systemd/system/xrdp.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2023-06-27 16:06:31 PDT; 27min ago Docs: man:xrdp(8) man:xrdp.ini(5) Process: 30709 ExecStartPre=/bin/sh /usr/share/xrdp/socksetup (code=exited, status=0/SUCCESS) Process: 30717 ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS (code=exited, status=0/SUCCESS) Main PID: 30718 (xrdp) Tasks: 1 (limit: 18731) Memory: 876.0K CGroup: /system.slice/xrdp.service└─30718 /usr/sbin/xrdpJun 27 16:15:36 RAUL-CSA-PC xrdp[30912]: [INFO ] xrdp_caps_process_pointer: client supports new(color) cursorJun 27 16:15:36 RAUL-CSA-PC xrdp[30912]: [INFO ] xrdp_process_offscreen_bmpcache: support level 1 cache size 10485760 M>Jun 27 16:15:36 RAUL-CSA-PC xrdp[30912]: [INFO ] xrdp_caps_process_codecs: nscodec, codec id 1, properties len 3Jun 27 16:15:36 RAUL-CSA-PC xrdp[30912]: [WARN ] xrdp_caps_process_codecs: unknown codec id 5Jun 27 16:15:36 RAUL-CSA-PC xrdp[30912]: [INFO ] Loading keymap file /etc/xrdp/km-00000409.iniJun 27 16:15:36 RAUL-CSA-PC xrdp[30912]: [WARN ] local keymap file for 0x00000409 found and doesn't match built in keym>Jun 27 16:15:38 RAUL-CSA-PC xrdp[30912]: [ERROR] xrdp_sec_recv: xrdp_mcs_recv failedJun 27 16:15:38 RAUL-CSA-PC xrdp[30912]: [ERROR] xrdp_rdp_recv: xrdp_sec_recv failedJun 27 16:15:38 RAUL-CSA-PC xrdp[30912]: [ERROR] libxrdp_process_data: xrdp_rdp_recv failedJun 27 16:15:38 RAUL-CSA-PC xrdp[30912]: [ERROR] xrdp_process_data_in: xrdp_process_loop failed
Please, any other direction is much appreciated.