Dedicated servers with AMD EPYC™ 9254 and 9554 processors are now available in our stock. Click here to order.

Blog

How to Install and Set Up a Graphical interface Desktop (GUI) on Ubuntu 24.04

  • Friday, April 4, 2025

When setting up a VPS, you might notice it doesn’t have a GUI (Graphical User Interface), meaning you must manage everything through the command line. This standard setup conserves system resources, making it ideal for server tasks. However, it’s not always practical, especially if you need to run applications that require a graphical interface.

For example, tools like Wireshark can technically run in the terminal, but their full functionality is only available through a GUI. Likewise, a graphical interface can make file management, software development, and specific system monitoring tasks much more manageable.

In this guide, we’ll install a GUI on a BaCloud VPS running Ubuntu 24.04, walking you through the process step by step.

 

Prerequisites

Before getting started, make sure your BaCloud VPS meets the following requirements:

● Ubuntu 24.04 Installed – This guide is specifically for Ubuntu 24.04.

● Sufficient VPS Resources – A GUI can run on a 1GB VPS, but at least 2GB is recommended for smoother performance, especially if you plan to use multiple applications.

● An RDP Client for Remote Access – Once the GUI is installed, you’ll need an RDP client to connect:

○ Windows users: Use Remote Desktop Connection.

○ Linux/macOS users: Use Remmina or another compatible RDP client.

 

Step 1: Update Your System

Before installing a GUI, it’s best to update your system to ensure compatibility and avoid conflicts. Connect to your VPS via SSH and run:

sudo apt update && sudo apt upgrade -y

This ensures you have the latest package versions before proceeding.

 

Step 2: Choose the Right Desktop Environment

Ubuntu supports multiple desktop environments, but we need a lightweight option that runs smoothly with limited resources for a VPS. Here’s a quick comparison of common choices:

● XFCE – One of the lightest desktop environments, making it fast and efficient. Best for performance and minimal resource usage.

● MATE is a bit heavier than XFCE but still lightweight. It is best for users who prefer a traditional, polished desktop experience.

● LXQt – Even lighter than XFCE but lacks some features. Suitable for extremely low-resource VPS setups.

● GNOME/KDE – Not recommended for VPS. They are feature-rich but too heavy, causing lag and high CPU usage.

For this guide, we’ll be installing XFCE because it offers the best balance of speed and usability on low-resource setups.

 

Step 3: Install XFCE

To install XFCE, you have two options depending on your needs:

1. Minimal Installation

This installs only the essential components of XFCE, keeping your VPS lightweight and efficient:

sudo apt install xubuntu-core -y

 

2. Full XFCE Installation

This installs XFCE along with additional tools like file managers, text editors, and system utilities for a more complete desktop experience:

sudo apt install xfce4 xfce4-goodies -y

This version provides a more feature-rich interface but uses more system resources.

 

Step 4: Install and Configure XRDP for Remote Access

Since a VPS doesn’t have a physical display, we need a way to access the GUI remotely. XRDP is a lightweight Remote Desktop Protocol (RDP) server that lets you connect to your VPS GUI from any computer.

1. Install XRDP

First, install XRDP using the following command:

sudo apt install xrdp -y

 

This installs XRDP and its necessary dependencies.

2. Enable and Start XRDP

After installation, enable XRDP to start automatically on boot:

sudo systemctl enable --now xrdp

 

The --now flag ensures that XRDP starts immediately, so you don’t have to reboot your VPS.

3. Fix Permission Issues

XRDP needs additional permissions to function correctly. Add the xrdp user to the ssl-cert group to prevent login issues:

sudo adduser xrdp ssl-cert

This ensures XRDP has the necessary permissions to handle remote connections securely.

4. Set XFCE as the Default Session for XRDP

When you connect to your VPS using XRDP, it needs to know which desktop environment to start. If this isn’t specified, XRDP might log you out immediately after connecting because it doesn’t know which desktop environment to load. To prevent this, set XFCE as the default session by running:

echo "xfce4-session" > ~/.xsession

This ensures that when you connect via RDP, your VPS launches XFCE instead of failing to start a session.

Finally, restart XRDP to apply all changes:

sudo systemctl restart xrdp

 

Step 5: Allow Remote Connections in the Firewall

Ubuntu’s Uncomplicated Firewall (UFW) blocks incoming RDP connections by default. We need to open port 3389, which Xrdp uses, to allow remote access.

Run the following commands:

sudo ufw allow 3389/tcp
sudo ufw reload

● The first command allows traffic on port 3389, which RDP requires.

● The second command reloads the firewall rules to apply the changes.

 

Step 6: Connect to Your VPS GUI

Now that everything is set up, you can log in to your GUI using an RDP client.

For Windows Users:

1. Open Remote Desktop Connection (mstsc in the Run dialog).

2. Enter your VPS IP address and click Connect.

 

3. Log in with your Ubuntu username and password.

 

For Linux/macOS Users:

Use Remmina or FreeRDP. Example command:

xfreerdp /u:your-username /v:your-vps-ip

After logging in, you’ll be greeted with the XFCE desktop.

 

 

Conclusion

Now that you’ve successfully installed a GUI on your VPS, you can finally see what’s happening. Instead of relying solely on the command line, you can now navigate your system more efficiently and run applications like Wireshark with full functionality. This guide walked you through each step, from choosing the right desktop environment to setting up remote access. With everything in place, you can now enjoy a more flexible way to interact with your VPS.

 

 

« Back