This article provides a step-by-step guide for installing and configuring XRDP on Ubuntu VPS for Remote Desktop connections.
What is XRDP?
XRDP is a free and open-source implementation of Microsoft RDP (Remote Desktop Protocol) server that enables operating systems other than Microsoft Windows (such as Linux and BSD-style operating systems) to provide a fully functional RDP-compatible remote desktop experience
Installing and Configuring XRDP on Ubuntu VPS for Remote Desktop Connections
This guide will walk you through installing and configuring XRDP on your Ubuntu VPS, enabling you to access your server from a graphical interface, similar to a local desktop session.
Prerequisites
Before proceeding, ensure you have:
- A Ubuntu VPS set up with Ubuntu 20.04 or 22.04.
- Root or sudo privileges on the server.
- A stable internet connection.
Step 1: Update Your Ubuntu VPS
First, login to your VPS as root user, then update your package list and upgrade all your installed packages to their latest versions to ensure a smooth installation:
sudo apt update && sudo apt upgrade -y
Step 2: Install XRDP on Ubuntu
- Install XRDP:
sudo apt install xrdp -y
- Once installed, the XRDP service will start automatically. To verify, use:
sudo systemctl status xrdp
- Enable XRDP to start on boot:
sudo systemctl enable xrdp
Step 3: Configure XRDP
- Configure the XRDP session:
For a better desktop experience, you can install a desktop environment. XFCE is a lightweight option:sudo apt install xfce4 xfce4-goodies -y
- Configure XRDP to use XFCE:
echo xfce4-session > ~/.xsession
- Restart the XRDP service:
sudo systemctl restart xrdp
Step 4: Connect to Your Ubuntu VPS from a Remote Desktop
- From Windows:
- Launch Remote Desktop Connection.
- Enter your VPS’s IP address and click Connect.
- When prompted, enter your Ubuntu username and password.
- From macOS:
- Install the Microsoft Remote Desktop app from the App Store.
- Open the app and click Add Desktop.
- Enter your VPS’s IP address and add your user credentials.
- From Linux:
- You can use Remmina or another RDP client.
- Enter your VPS’s IP address and connect using your credentials.
Troubleshooting Common Issues
- If you cannot connect, ensure the XRDP service is running and your firewall is configured to allow RDP connections (default port 3389).
- For display issues, verify the
.xsession
file is correctly configured with your chosen desktop environment.
Conclusion
You’ve now successfully installed and configured XRDP on Ubuntu VPS, enabling remote desktop access. This setup enhances your ability to manage your server remotely with a graphical interface, streamlining tasks and administration. Explore XRDP’s advanced configurations and desktop environments to tailor your remote desktop experience further.
This guide ensures you have a clear path to setting up XRDP on Ubuntu VPS, providing a foundation for remote management and efficiency improvements.