This guide provides a complete, step-by-step process for installing and configuring xRDP on Linux Mint to allow you to connect to your Linux desktop remotely using the Remote Desktop Protocol (RDP). The steps here include configuring the desktop session to avoid common issues with the Cinnamon desktop environment.
-
Update the system package repositories:
sudo apt update && sudo apt upgrade
-
Install xRDP and necessary dependencies:
sudo apt install xrdp xorgxrdp -y
-
Enable xRDP to start on boot and verify its status:
sudo systemctl enable xrdp sudo systemctl status xrdp
-
Configure the firewall to allow RDP connections:
sudo ufw allow 3389/tcp
-
Create the proper
.xsession
file to fix issues with the Cinnamon desktop:echo "cinnamon-session" > ~/.xsession
-
Make the
.xsession
file executable (critical step):chmod +x ~/.xsession
-
Restart the xRDP service to apply the changes:
sudo systemctl restart xrdp
-
Find your Linux Mint machine's IP address:
ip addr show | grep inet
-
Restart your computer to ensure that all changes take effect:
sudo reboot
- Open Remote Desktop Connection (mstsc.exe).
- Enter your Linux Mint machine's IP address.
- Click Connect and enter your Linux username and password when prompted.
-
Session Management: You must log out of your local GUI session before connecting via RDP. Leave the Linux Mint machine at the login screen for successful remote connections.
-
Multiple Sessions: Unlike Windows RDP, you cannot have multiple active RDP sessions simultaneously. Disconnect from your current session before connecting from another device.
-
Desktop Environment: This guide is specifically for the Cinnamon desktop environment. For other desktops, adjust step 5 accordingly.
-
If the Desktop Crashes After Login: The
~/.xsession
file is key to resolving this issue. Use "cinnamon-session" instead of "cinnamon-session-cinnamon" for better compatibility across various Linux Mint versions. -
Display Issues: If you encounter display problems (missing icons, wrong theme colors), make sure your
~/.xsession
file contains exactly "cinnamon-session" and that it is executable. -
Alternative Solution: For a system-wide configuration rather than per-user, you can edit
/etc/xrdp/startwm.sh
and replace the last two lines withcinnamon-session
.
For more detailed xRDP configuration, you can edit its configuration file:
sudo nano /etc/xrdp/xrdp.ini
Common settings to modify include:
max_bpp
: color depth (16, 24, 32)port
: default is 3389security_layer
: RDP security level
Save the changes and restart xRDP after modifications.
Now you should be able to remotely access your Linux Mint machine via RDP from Windows or other systems with an RDP client.
Is there something missing here? Step 4 opening the ini file does not seem to have a use.