Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
deb13:xrdp [2026/07/10 23:05] – created Bernard Condraudeb13:xrdp [2026/07/11 22:49] (current) – [Windows 11 Client] Bernard Condrau
Line 1: Line 1:
 ====== XRDP ====== ====== XRDP ======
 +===== Debian Host =====
   * Step 1: Install Xfce4 and xRDPFirst, open your terminal and install the desktop environment and xRDP packages (these examples use Debian/Ubuntu-based distributions):<code>sudo apt update   * Step 1: Install Xfce4 and xRDPFirst, open your terminal and install the desktop environment and xRDP packages (these examples use Debian/Ubuntu-based distributions):<code>sudo apt update
 sudo apt install xfce4 xfce4-goodies xrdp -y</code> sudo apt install xfce4 xfce4-goodies xrdp -y</code>
-  * Step 2: Configure the Desktop Session. You need to tell the xRDP server to load the Xfce desktop environment instead of the default Linux desktop. Set Xfce4 as the default for your active user by running:<code>echo "xfce4-session" > ~/.xsession</code> +  * Step 2: Configure the Desktop Session. You need to tell the xRDP server to load the Xfce desktop environment instead of the default Linux desktop. Set Xfce4 as the default for your active user, then make the file executable:<code>echo "xfce4-session" > ~/.xsession 
-  * Make the file executable:<code>chmod +x ~/.xsession</code> +chmod +x ~/.xsession</code> 
-  * Step 3: Edit the xRDP Startup ScriptTo prevent session dropouts, update the global xRDP configuration file:Open the file with your preferred text editor (e.g.nano):<code>sudo nano /etc/xrdp/startwm.sh</code> +  * Step 3: Edit the xRDP Startup ScriptTo prevent session dropouts, update the global xRDP configuration file:Open the file with your preferred text editor, comment out the last 2 lines and add as follows:<code>sudo nano /etc/xrdp/startwm.sh 
-  * Comment out the last two lines by adding a # at the beginning, so they look like this:<code># test -x /etc/X11/Xsession && exec /etc/X11/Xsession +# test -x /etc/X11/Xsession && exec /etc/X11/Xsession 
-# exec /bin/sh /etc/X11/Xsession</code> +# exec /bin/sh /etc/X11/Xsession 
-  * Add startxfce4 right before the last line of the file (usually exit 0), ensuring your file ends similarly to this:<code>startxfce4+startxfce4
 exit 0</code> exit 0</code>
 +  * Step 4: Add the xRDP User to the SSL Cert Group.  On some systems (like newer Debian versions), the xrdp user needs permission to read the SSL certificates, otherwise, you might experience black screen issues:<code>sudo adduser xrdp ssl-cert</code>
 +  * Step 5: Enable the Service:<code>sudo systemctl enable xrdp
 +sudo ufw allow 3389</code>
 +  * Step 6: Restart the Service and open the Firewall. Restart the xRDP service to apply all configuration changes:<code>sudo systemctl restart xrdp
 +sudo ufw allow 3389</code>
 +  * Step 7: You can now open the Remote Desktop Connection app on Windows or the Microsoft Remote Desktop app on Linux. Enter your Linux computer's IP address and log in using your standard Linux username and password.
  
-Use code with caution.Save and close the file (in nano, press Ctrl+O, Enter, then Ctrl+X).Step 4: Add the xRDP User to the SSL Cert GroupOn some systems (like newer Ubuntu versions), the xrdp user needs permission to read the SSL certificates, otherwise, you might experience black screen issues:bashsudo adduser xrdp ssl-cert +===== Windows 11 Client ===== 
-Use code with caution.Step 5: Restart the Service and Open the FirewallRestart the xRDP service to apply all configuration changes:bashsudo systemctl restart xrdp +  * Open the built-in //Remote Desktop Connection// 
-Use code with caution.If you are using a firewall (such as ufw), make sure to open the RDP port so your remote device can connect:bashsudo ufw allow 3389 +  * Disable Persistent Bitmap Caching? 
-Use code with caution.Step 6: ConnectYou can now open the Remote Desktop Connection app on Windows or the Microsoft Remote Desktop app on macOS/Linux. Enter your Linux computer's IP address and log in using your standard Linux username and password.If you're having trouble connecting or seeing black screen, let me know:What Linux distribution and version are you using (e.g., Ubuntu 24.04, Debian 12)?Are you connecting from Windows, Mac, or Linux client?15 sitesHow to switch from gnome to xfce for xrdp?To switch from Gnome to xfce for xrdp on Debian, you can try these steps: 1. Modify `/etc/xrdp/startwm.sh` 2. Comment out the last...RedditCannot connect to Xfce with remote desktopIf you're having trouble connecting to Xfce with remote desktop on Xubuntu, you can try these steps: * **Edit /etc/xrdp/startwm.sh...Ask UbuntuInstall and configure xrdp to use Remote Desktop with UbuntuInstall a desktop environment on your Linux VM * ssh azureuser@myvm.chinanorth2.cloudapp.chinacloudapi.cn. If you're using Windows...Azure.cn+    * Click //Show Options// at the bottom 
 +    * Switch to the //Experience// tab 
 +    * Uncheck the box for //Persistent bitmap caching// and try logging in 
 +  * Log Out of the Local Machine. If you are logged into the physical Debian machine (or a local VM consolewith the same user account, the remote RDP session will fail instantlyGo to the physical monitor/console of your Debian host and completely Log Out of the desktop session. 
 +  * Create SSH tunnel with different port than 3389 on the client and port 3389 on the host 
 +===== Self-signed certificates =====
  
 +  * If you get a //xrdp certificate mismatch//
  
-  xrdp certificate mismatch+==== Trust the Existing Self-Signed Certificate ==== 
 +  Launch your //Remote Desktop Connection// and enter the server's hostname. 
 +  * Click //View Certificate// on the security warning prompt. 
 +  * Go to the Details tab and click //Copy to File//. 
 +  * Save the ''.cer'' file to your local computer. 
 +  * Double-click the saved .cer file, click //Install Certificate//, choose //Local Machine//, and select //Place all certificates in the following store//. Browse and pick the **Trusted Root Certification Authorities** store, then finish the import. 
 + 
 +==== Hostname changed ==== 
 +  * If the hostname has changed you need to re-issue the self-signed certificate:<code>sudo make-ssl-cert generate-default-snakeoil --force-overwrite</code>