How to Install a Desktop Environment on My Ubuntu VPS
Leave a comment on How to Install a Desktop Environment on My Ubuntu VPS
When managing a VPS (Virtual Private Server), most users rely on the command line through SSH. However, for those who are more comfortable with a graphical interface or need to run GUI-based applications.This guide walks you through the steps to set up a desktop GUI and access it remotely.

In this guide we use a ubuntu 22.04 server.
Step 1 – Update Your VPS
Update all the System Packages to make sure your Ubuntu server is up-to-date.
sudo apt update && sudo apt upgrade -y
Step 2 – Choose a Desktop Environment
Ubuntu supports several lightweight desktop environments ideal for VPS setups. Here are some popular choices:
|
Desktop Environment |
Package Name |
RAM Usage |
Notes |
|
XFCE |
xfce4 |
Low |
Lightweight and fast |
|
LXDE |
lxde |
Very Low |
Great for low-resource servers |
|
MATE |
ubuntu-mate-core |
Medium |
A classic GNOME 2 fork |
|
GNOME |
ubuntu-desktop |
High |
Full-featured but resource-heavy |
Based upon your requirement. Choose the appropriate package. Here, we are Installing XFCE
Installing XFCE
sudo apt install xfce4 -y
Install a Remote Desktop Server
To access the desktop GUI remotely, you need a Remote Desktop Protocol (RDP) server or VNC.
Install XRDP (RDP server)
XRDP allows you to connect using the built-in Remote Desktop Connection app on Windows or any RDP client.
sudo apt install xrdp -y
Start and enable XRDP:
sudo systemctl enable xrdp sudo systemctl start xrdp
Check the status:
sudo systemctl status xrdp
Configure XRDP with XFCE
Set XFCE as the default session for XRDP:
echo “startxfce4” > ~/.xsession
Restart the XRDP service:
sudo systemctl restart xrdp
Connect to Your VPS GUI
On Windows: Use Remote Desktop Connection, enter your VPS IP and connect.
On macOS/Linux: Use an RDP client like Remmina, Microsoft Remote Desktop, or KRDC.
Log in using your VPS username and password. You should now see the XFCE desktop environment!
Conclusion
Installing a desktop environment on your Ubuntu VPS opens up a new range of possibilities, especially if you’re not comfortable with the command line. While not suitable for all production scenarios, it’s an excellent option for remote GUI access or specific use cases like remote administration or development environments.
If you’re looking for a lightweight, fast setup, XFCE + XRDP is a great combination. Just remember to monitor your VPS resource usage, especially on lower-tier plans.