Skip to content

Instantly share code, notes, and snippets.

@ParkWardRR
Last active May 12, 2025 03:23
Show Gist options
  • Save ParkWardRR/2ab9b5d41bbaceca8471d591755a1898 to your computer and use it in GitHub Desktop.
Save ParkWardRR/2ab9b5d41bbaceca8471d591755a1898 to your computer and use it in GitHub Desktop.
Installing xrdp on Linux Mint 21.2 Victoria

Comprehensive Guide to Setting Up xRDP on Linux Mint

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.

Installation and Basic Configuration

  1. Update the system package repositories:

    sudo apt update && sudo apt upgrade
  2. Install xRDP and necessary dependencies:

    sudo apt install xrdp xorgxrdp -y
  3. Enable xRDP to start on boot and verify its status:

    sudo systemctl enable xrdp
    sudo systemctl status xrdp
  4. Configure the firewall to allow RDP connections:

    sudo ufw allow 3389/tcp

Desktop Environment Configuration

  1. Create the proper .xsession file to fix issues with the Cinnamon desktop:

    echo "cinnamon-session" > ~/.xsession
  2. Make the .xsession file executable (critical step):

    chmod +x ~/.xsession
  3. Restart the xRDP service to apply the changes:

    sudo systemctl restart xrdp

Verification and Connection

  1. Find your Linux Mint machine's IP address:

    ip addr show | grep inet
  2. Restart your computer to ensure that all changes take effect:

    sudo reboot

Connecting from Windows

  1. Open Remote Desktop Connection (mstsc.exe).
  2. Enter your Linux Mint machine's IP address.
  3. Click Connect and enter your Linux username and password when prompted.

Important Notes and Troubleshooting

  • 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 with cinnamon-session.

Advanced Configuration (Optional)

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 3389
  • security_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.

@MenDevNL
Copy link

Is there something missing here? Step 4 opening the ini file does not seem to have a use.

@lucky62
Copy link

lucky62 commented Oct 31, 2024

Configuration done. I can see the login prompt but after authentication the session ends immediately.
This error is in the xrdp-sesman.log:

Window manager (pid 279633, display 12) exited quickly (1 secs). This could indicate a window manager config problem.

Any hint?

@danielg85ro
Copy link

Configuration done. I can see the login prompt but after authentication the session ends immediately. This error is in the xrdp-sesman.log:

Window manager (pid 279633, display 12) exited quickly (1 secs). This could indicate a window manager config problem.

Any hint?

You have to enable xrdp multiple sessions. Follow workaround 2 from here: https://c-nergy.be/blog/?p=16698

@liviodaina
Copy link

ths for your instruction, but what can i do for slow, slow performance ? i've other xrdp with other distro (fedora gnome, fedora xfce) but only with mint i've slow performance. I've set the desktop image as a solid blank color. tks

@danielg85ro
Copy link

I had the same issue with very slow connection using xrdp on Mint. I've tried some workarounds and improvements, but nothing worked. I don't know what to say about this, as I've given up on trying to solve it.

@armenmatoosian
Copy link

At first, I followed all of the steps, and it didn't work. So, I redid some of the steps, restarted RDP as admin on the windows machine, and, voila, it works now. Gotta love technology. Thanks @ParkWardRR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment