Table of Contents
- Step 1: Update Package List
- Step 2: Install XRDP
- Step 3: Start XRDP Service
- Step 4: Enable XRDP Service to Start on Boot
- Step 5: Allow Port 3389 Through the Firewall (if using UFW)
- Step 6: Verify XRDP Status
- Step 7: Install a Desktop Environment (Optional)
- Step 8: Configure Ubuntu to Use Xfce with XRDP
- Step 9: Restart XRDP Service
- Step 10: Connect to Ubuntu from a Remote Desktop Client
- Additional Notes:
To install XRDP (X Remote Desktop Protocol) on Ubuntu 20.04 or 22.04, follow these steps:
Step 1: Update Package List
sudo apt update
Step 2: Install XRDP
sudo apt install xrdp
Step 3: Start XRDP Service
sudo systemctl start xrdp
Step 4: Enable XRDP Service to Start on Boot
sudo systemctl enable xrdp
Step 5: Allow Port 3389 Through the Firewall (if using UFW)
sudo ufw allow 3389
Step 6: Verify XRDP Status
You can check if XRDP is running properly:
sudo systemctl status xrdp
Step 7: Install a Desktop Environment (Optional)
If your Ubuntu system doesn’t have a desktop environment installed, you can install one. For example, you can install Xfce:
sudo apt install xfce4
Step 8: Configure Ubuntu to Use Xfce with XRDP
Create or edit the .xsession
file in your home directory:
echo "xfce4-session" > ~/.xsession
Step 9: Restart XRDP Service
After making changes, restart the XRDP service:
sudo systemctl restart xrdp
Step 10: Connect to Ubuntu from a Remote Desktop Client
Use a remote desktop client (such as Remote Desktop Connection on Windows or Remmina on Linux) to connect to your Ubuntu server using the server’s IP address.
When prompted, enter your Ubuntu username and password.
Additional Notes:
- If you encounter any issues, check the XRDP logs for more information:
journalctl -xe | grep xrdp
- For security reasons, it’s advisable to use SSH tunneling or a VPN when accessing your remote desktop.
Remember that the exact steps may vary based on your specific Ubuntu version and desktop environment preference. Adjust the instructions accordingly if you are using a different Ubuntu version or want to install a different desktop environment.