Set up XFCE and XRDP on Ubuntu (Remote Desktop)
Installation Instructions
1) Update the system
Connect to your VPS via SSH and run:
sudo apt update && sudo apt upgrade -y
2) Install a lightweight desktop environment (XFCE)
Install the graphical environment:
sudo apt install xfce4 xfce4-goodies -y
3) Install XRDP
XRDP is a service that allows remote connections using the Remote Desktop Protocol (RDP):
sudo apt install xrdp -y
sudo systemctl enable xrdp
sudo systemctl start xrdp
4) Configure XRDP to use XFCE
Set XFCE as the session environment:
echo "startxfce4" > ~/.xsession
Add the XRDP user to the SSL group:
sudo adduser xrdp ssl-cert
Restart XRDP to apply the changes:
sudo systemctl restart xrdp
5) Open the RDP port in the firewall (if enabled)
Allow inbound connections on port 3389:
sudo ufw allow 3389/tcp
6) Connect to the VPS via Remote Desktop
- Open the Remote Desktop application on your computer (e.g., mstsc on Windows).
- Enter the public IP address of your VPS.
- Log in using your Linux credentials (username and password).
Verification and Troubleshooting
If the screen stays black or closes:
Ensure that the .xsession file contains:
startxfce4
Restart the server or the XRDP service:
sudo systemctl restart xrdp
If you use a desktop environment other than XFCE, adapt the command (e.g., startmate, gnome-session, etc.).
Conclusion
By following these steps, you will have functional graphical access to your Linux VPS via Remote Desktop. This is especially useful for those who want to manage their server visually or host services like an Assetto Corsa server in a more user-friendly environment.


















