How to Install a Graphical Interface on a VPS with Ubuntu 24

233

The graphical interface can significantly simplify server management, especially if you prefer a visual environment over the command line. In this guide, we will explain how to install a lightweight desktop environment (Xfce) and set up remote access using xrdp.

Comparison: Xfce vs. GNOME

Both environments provide a graphical interface; however, they differ in several key aspects:

  • Xfce: A lightweight desktop environment designed for high speed and low resource consumption. It is ideal for VPS and older hardware, offering a simple, traditional interface and high customizability without placing a significant load on the system.
  • GNOME: A modern and feature-rich environment providing an integrated and polished user experience. While GNOME offers advanced features and a modern design, it requires more system resources, which may impact performance on constrained systems.

Choose Xfce if you value efficiency and performance on resource-limited systems. Use GNOME if you prefer a modern interface and have sufficient hardware capabilities.

System Update

Open the terminal and update the package list, as well as upgrade the installed packages:

sudo apt update && sudo apt upgrade -y

Desktop Environment Installation

  • For the lightweight option, install Xfce and additional packages:
sudo apt install xfce4 xfce4-goodies -y
  • If you prefer the full Ubuntu desktop (GNOME), install it with the command:
sudo apt install ubuntu-desktop -y

Note: The standard environment consumes more resources.

Installing and Configuring xrdp for Remote Access

  1. Install xrdp:

    sudo apt install xrdp -y
  2. Enable and start xrdp:

    sudo systemctl enable xrdp
    sudo systemctl start xrdp
  3. Configure xrdp by creating or editing the file ~/.xsession and adding the line:

    • For Xfce
    echo "xfce4-session" > ~/.xsession
- For **Ubuntu (GNOME)** ```bash echo "gnome-session" > ~/.xsession
  1. If using UFW (Uncomplicated Firewall), open the port for RDP:

    sudo ufw allow 3389/tcp
  2. Connect to the server using an RDP client (e.g., Microsoft Remote Desktop, Remmina, etc.) using the VPS IP address and port 3389.

Additional Options

VNC in a browser: You can access the graphical interface after installation via VNC in the VMmanager control panel, which is available to you after server activation.

Final Notes

The graphical interface simplifies server management; however, it requires additional system resources. Remember to secure remote access by using SSH tunnels or VPN.

We value your privacy

We use cookies and process your IP address to personalize content, detect your location for regional pricing, analyze site traffic, and show relevant ads. We share data with our analytics and advertising partners. Click "Accept All" to consent to all cookies, or "Reject All" to decline non-essential cookies. Some essential cookies will always be used for the site to function. Learn more in our Privacy Policy