XRDP is a popular open-source remote desktop protocol server that allows users to connect to a Linux system using RDP clients. However, you may encounter errors when starting an XRDP session. These errors can be frustrating and hinder your remote access capabilities. This guide will walk you through the common error messages you might see and provide detailed solutions to fix them.
Error Details
When attempting to start an XRDP session, you may encounter the following error messages in your logs:
Mar 19 14:48:11 ubuntu22 xrdp-sesman[19218]: [INFO ] starting Xorg session...
Mar 19 14:48:11 ubuntu22 xrdp-sesman[19218]: [INFO ] Starting session: session_pid 59223, display :10.0, width 1360, height 768, bpp 24, client ip ::ffff:192.168.1.10:60591 - socket: 12, user name tecadmin
Mar 19 14:48:11 ubuntu22 xrdp-sesman[19243]: [INFO ] [session start] (display 10): calling auth_start_session from pid 19243
Mar 19 14:48:11 ubuntu22 xrdp-sesman[19218]: [ERROR] sesman_data_in: scp_process_msg failed
Mar 19 14:48:11 ubuntu22 xrdp[19240]: [INFO ] xrdp_wm_log_msg: login successful for display 10
Mar 19 14:48:11 ubuntu22 xrdp[19240]: [INFO ] login successful for display 10
Mar 19 14:48:11 ubuntu22 xrdp-sesman[19218]: [ERROR] sesman_main_loop: trans_check_wait_objs failed, removing trans
Mar 19 14:48:11 ubuntu22 systemd[1]: Started Session c7 of User tecadmin.
Mar 19 14:48:11 ubuntu22 xrdp[19240]: [INFO ] loaded module 'libxup.so' ok, interface size 10296, version 4
Mar 19 14:48:11 ubuntu22 xrdp-sesman[19245]: [INFO ] Starting X server on display 10: /usr/lib/xorg/Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log
Mar 19 14:48:11 ubuntu22 xrdp[19240]: [DEBUG] xrdp_wm_log_msg: started connecting
Understanding the Error
The key error messages here are:
- [ERROR] sesman_data_in: scp_process_msg failed
- [ERROR] sesman_main_loop: trans_check_wait_objs failed, removing trans
These errors indicate that there is an issue with the session management process within XRDP. Specifically, the session manager is having trouble processing messages and maintaining connections, which causes it to fail.
Possible Solution
After some investigation, a solution was found involving the configuration file /etc/X11/Xwrapper.config. By changing the allowed_users
parameter, you can allow any user to start the X server, which resolves the issue.
Steps to Fix:
- Open the configuration file /etc/X11/Xwrapper.config with a text editor of your choice. You might need superuser permissions to edit this file.
sudo nano /etc/X11/Xwrapper.config
- Look for the line that says:
#allowed_users=console
- Change this line to:
allowed_users=anybody
- Save the file and exit the text editor.
Important Note
Make sure you are not using the same user for both the XRDP session and the physical console of the machine. This can cause conflicts. For more information on this, you can refer to the XRDP Tips and FAQ.
Additional Steps if the Issue Persists
If the issue is not resolved with the above steps, you can try the following additional solutions:
Check XRDP and Xorg Logs
Examine the XRDP and Xorg logs for any additional error messages or warnings. These logs can provide more details on what might be causing the issue.
sudo tail -f /var/log/xrdp.log
sudo tail -f /var/log/xrdp-sesman.log
sudo tail -f /var/log/Xorg.10.log
Ensure Correct Permissions
Make sure that the user running the XRDP session has the correct permissions. Incorrect permissions can prevent the XRDP session from starting properly.
sudo chmod 1777 /tmp
Reinstall XRDP and Xorg
Sometimes, reinstalling XRDP and Xorg can resolve configuration issues or missing dependencies that might be causing the problem.
sudo apt-get remove --purge xrdp xorg
sudo apt-get install xrdp xorg
Update Your System
Ensure your system is up to date. Sometimes, updates can resolve underlying issues that affect XRDP.
sudo apt-get update
sudo apt-get upgrade
Check for Conflicting Software
Ensure there is no other software conflicting with XRDP. For example, other remote desktop or VNC servers might interfere with XRDP.
sudo systemctl stop conflicting-service
sudo systemctl disable conflicting-service
By following these additional steps, you should be able to resolve the XRDP session start errors and successfully start your XRDP sessions. If the problem persists, consider seeking help from community forums or the XRDP project’s support resources.