Enable a GUI on Ubuntu 22.04 Server and Connect via Remote Desktop (RDP)
Are you looking to enable a Graphical User Interface (GUI) on your Ubuntu 22.04 server? Do you want a user-friendly graphical desktop and the ability to connect remotely using Remote Desktop Protocol (RDP)? This guide will walk you through installing a GUI, setting up remote access, and connecting from another machine.
Understanding Ubuntu Server vs. Desktop
Ubuntu Desktop comes pre-configured with a GUI, designed for personal or professional use. In contrast, Ubuntu Server and Ubuntu Core editions, commonly used for hosting and server environments, do not include a GUI by default. This lightweight design optimizes performance but requires additional steps to enable a desktop environment.
What is xrdp?
Remote Desktop Protocol (RDP), developed by Microsoft, enables users to access machines remotely. To facilitate RDP access for Ubuntu servers, the open-source software xrdp is used. It allows seamless integration between Linux servers and RDP clients, such as the Remote Desktop Connection tool on Windows.
Step-by-Step Guide
1. Add a Non-Root User
The KDE GUI does not allow root logins. Follow these steps to create a new user:
Create the user:
sudo adduser <username>
Replace <username>
with your preferred username.
Grant superuser privileges:
sudo usermod -aG sudo <username>
Note: You can switch to the root user in KDE using the su root
command if necessary.
2. Update and Upgrade the System
Keep your system up-to-date to avoid compatibility issues:
sudo apt update && sudo apt upgrade -y
3. Install the KDE Desktop Environment
Several KDE packages are available:
- kde-plasma-desktop: Minimal setup with essential features.
- kde-standard: Standard KDE package.
- kubuntu-desktop: Full-featured KDE environment.
For this guide, we recommend installing the full kubuntu-desktop
package:
sudo apt install kubuntu-desktop -y
4. Install xrdp for Remote Access
Install the xrdp package to enable RDP functionality:
sudo apt install xrdp -y
Verify that xrdp is running:
sudo systemctl status xrdp
By default, xrdp is configured to work seamlessly on Ubuntu 22.04.
5. Connect Using Remote Desktop
- Open Remote Desktop Connection on a Windows PC (search for “RDP” in the Start menu).
- Enter your server’s IP address.
- Leave the “User name” field blank and click Connect.
- On the xrdp login screen, select Xorg as the session type, enter your username and password, and click OK.
Your KDE desktop environment should load.
Example Screenshots
Below are screenshots to guide you through the process:
The KDE Desktop Environment via RDP: 
xrdp Login Screen:

Troubleshooting
With this guide, you can successfully set up a GUI on your Ubuntu 22.04 server and access it remotely. Let me know if you need further assistance!