How To Install A Gui On Ubuntu Server: Step-By-Step Desktop Setup

You Just Installed Ubuntu Server and Miss the Desktop

You chose Ubuntu Server for its lean performance and stability. The command line is powerful, but sometimes you need a visual interface. Maybe you’re managing files more intuitively, running a specific application that requires a display, or you simply prefer the familiarity of a desktop environment for certain tasks.

Installing a graphical user interface (GUI) on Ubuntu Server is a straightforward process. It transforms your text-only terminal into a full desktop experience. This guide walks you through the entire process, from choosing the right desktop environment to troubleshooting common post-installation issues.

Understanding Your Options: Desktop Environments

Before you start typing commands, it’s helpful to know what you’re installing. A desktop environment is a complete bundle of graphical components. It includes the window manager, panels, system menus, and a suite of default applications like file managers and text editors.

Ubuntu’s official repositories offer several choices. Your selection depends on your server’s resources and your personal preference for simplicity versus features.

GNOME: The Modern Ubuntu Experience

This is the default desktop for standard Ubuntu Desktop editions. It offers a clean, modern interface with an activities overview and strong integration. It’s relatively resource-heavy but provides the most polished and feature-complete experience.

Xubuntu Core (XFCE): Lightweight and Efficient

XFCE is renowned for being fast and low on system resources while remaining fully functional and customizable. It’s an excellent choice for servers where you want a GUI without significant overhead. Installing the “xubuntu-core” package gets you the essentials without extra applications.

Lubuntu Core (LXQt): The Featherweight Option

LXQt is even lighter than XFCE, designed to run on very old hardware or systems with minimal RAM. It uses fewer resources, leaving more available for your server’s primary workloads. The “lubuntu-core” package provides the core desktop.

Kubuntu Core (KDE Plasma): Feature-Rich and Customizable

KDE Plasma is known for its visual polish, extensive customization options, and a wealth of built-in features. It’s more resource-intensive than XFCE or LXQt but offers a highly configurable environment for power users.

Prerequisites Before You Begin

A smooth installation requires a few checks. First, ensure your system is up to date. Connect to your server via SSH or directly at the console and run the standard update commands.

You need a stable internet connection for downloading packages, which can be several hundred megabytes depending on your choice. Also, verify you have sufficient disk space. A minimal desktop environment requires at least 2-3 GB of free space, with GNOME or KDE needing more.

Most importantly, know that installing a GUI will install a display manager, which is a login screen service. This service will typically be configured to start automatically on boot. If you always want to boot to the command line, you may need to adjust the system’s default target after installation.

The Core Installation Process

The installation is performed entirely from the command line using the apt package manager. The general pattern is the same for any desktop environment.

Step 1: Update Your Package Lists

Begin by refreshing your local package database to ensure you install the latest available versions. This is a critical first step for any software installation.

Step 2: Install the Desktop Environment Package

This is the main command. You will choose one of the following based on your earlier decision. The installation will pull in all necessary dependencies, including the X11 display system, the desktop environment itself, and a display manager.

For the standard Ubuntu GNOME desktop:

sudo apt install ubuntu-desktop

For a minimal GNOME installation without many extra applications:

sudo apt install gnome-core

how to install gui for ubuntu server

For the lightweight XFCE desktop (Xubuntu core):

sudo apt install xubuntu-core

For the ultra-lightweight LXQt desktop (Lubuntu core):

sudo apt install lubuntu-core

For the feature-rich KDE Plasma desktop (Kubuntu core):

sudo apt install kubuntu-core

Step 3: Wait for the Installation to Complete

The apt command will show you a list of packages to be installed and ask for confirmation. Press ‘Y’ and then Enter to proceed. The download and installation process can take 10 to 30 minutes, depending on your internet speed and the chosen desktop.

During the installation, you might see a configuration prompt for the display manager. The most common choices are ‘gdm3’ for GNOME and ‘sddm’ for KDE Plasma. If you’re unsure, you can select the default option or configure it later.

Step 4: Reboot Your System

Once the installation finishes, restart the server to load the new graphical system and start the display manager service.

sudo reboot

After the reboot, instead of the text-based login prompt, you should see a graphical login screen. Enter your username and password to access your new desktop environment.

Post-Installation Configuration and Tips

You’re now at the desktop. Here are the first things to do and settings to consider for a server environment.

Enabling Remote Desktop Access (Optional)

If you accessed your server via SSH, you might want graphical remote access. You can install a remote desktop server like xrdp, which uses the standard RDP protocol.

sudo apt install xrdp

sudo systemctl enable xrdp –now

After this, you can connect to your server’s IP address using an RDP client like Remmina on Linux, Microsoft Remote Desktop on Windows, or the Remote Desktop app on macOS.

Controlling the Boot Behavior

By default, installing a desktop changes the system to boot into the graphical target. If you prefer to boot to the multi-user text console and only start the GUI when needed, you can change the default target.

how to install gui for ubuntu server

To boot to the command line:

sudo systemctl set-default multi-user.target

To start the GUI from the command line after login, type:

sudo systemctl start gdm3

Or use ‘startx’ if you have a more minimal setup.

To revert to booting into the GUI:

sudo systemctl set-default graphical.target

Installing Additional Software

Your core desktop installation may lack common tools. You can easily install a web browser, terminal emulator, or other utilities from the command line or using the graphical software center if it was included.

For example, to install the Firefox web browser:

sudo apt install firefox

Troubleshooting Common GUI Issues

Sometimes, things don’t go perfectly. Here are solutions to frequent problems.

The GUI Fails to Start After Reboot

If you reboot and see a blank screen or fall back to a text console, the display manager might not be running. First, check its status. For GNOME’s gdm3:

sudo systemctl status gdm3

If it’s not active, try to start it manually:

sudo systemctl start gdm3

If it fails, check the logs for errors:

sudo journalctl -u gdm3 -b

how to install gui for ubuntu server

Common causes include conflicts with existing display configurations or insufficient video memory. For servers without a dedicated GPU, ensure the system has enough shared RAM allocated in the BIOS/UEFI settings.

High Memory or CPU Usage

If your server is sluggish, the desktop environment might be using more resources than expected. Use the system monitor application or the ‘htop’ command in a terminal to identify the culprit.

Consider switching to a lighter desktop environment like XFCE or LXQt if resource consumption is critical for your server’s primary role. You can have multiple desktop environments installed and choose between them at the login screen.

Resolving Display Manager Conflicts

Having multiple display managers installed (e.g., gdm3 and sddm) can cause problems. You should disable and mask the one you are not using.

To disable sddm if you are using gdm3:

sudo systemctl disable sddm

sudo systemctl mask sddm

Then enable and start your preferred one:

sudo systemctl enable gdm3 –now

When to Use a GUI on a Server

A GUI introduces overhead. It consumes RAM, CPU cycles, and requires security updates. For a production server running web, database, or application services, a pure command-line interface is almost always the recommended, more secure, and efficient choice.

The ideal use case for a GUI on Ubuntu Server is for a personal or development server, a home lab machine, or a system where you frequently use graphical administration tools. It’s also helpful for learning if you’re more comfortable in a visual environment before mastering the command line.

You can achieve the best of both worlds. Keep the GUI installed but set the system to boot to the command line by default. When you need the desktop, start it manually with ‘startx’ or by starting the display manager service. This keeps your server lean for automated reboots while giving you visual access on demand.

Your Server, Now with a Visual Interface

You have successfully navigated the choice, installation, and configuration of a desktop environment on your Ubuntu Server. Whether you opted for the sleekness of GNOME, the efficiency of XFCE, or the minimalism of LXQt, you now have a flexible system that can be managed both visually and through the powerful command line.

The key takeaway is control. You control the boot behavior, the resource trade-off, and the tools you run. Use the GUI for the tasks where it saves you time and stick to the terminal for everything else. This hybrid approach lets you leverage the server’s stability while enjoying desktop convenience when you need it.

Your next step is to explore your new desktop. Open the system settings to configure your display, network, and user accounts. Install the specific graphical tools you need, and remember that underneath it all, the robust, reliable Ubuntu Server continues to run.

Leave a Comment

close