Are you looking to use a Graphical User Interface (GUI) on your Debian 12 server? Do you want a graphical desktop for Debian? Do you want to connect to your Debian server with Remote Desktop (RDP/RDC)?
By default, the Desktop flavor of Debian comes pre-packaged with a GUI, and is meant for personal or professional use on a desktop or laptop. However, if you’ve purchased an Debian server from a web hosting company, chances are you’ve received the Debian Server or Debian Core edition. These editions of Debian do not come pre-packaged with a GUI.
Furthermore, Remote Desktop Protocol (RDP) was invented as a priority software, made by Microsoft specifically for Windows. However, the friendly devs at neutrinolabs have developed a non-priority version, for free! It’s called xrdp.
In this guide, first, we will show you how to install KDE (K Desktop Environment). Then, we will go through installing xrdp, Last, you will connect to your Debian 12 server with it’s new KDE desktop using RDP!
Add a User
If your server only has the root user, and no other users created, now is the time to create a new user on the system. By default, the KDE login does not allow login to the user root. xrdp does allow login as root (in case you ignore this warning and skip this step).
In other words: you won’t be able to login as the root user to your server using a plugged-in monitor, or a KVM or VNC console. For this reason, you should add a new user with the same permissions. You can, however, still login as the root user with Remote Desktop after following this guide.
Connect to your server via SSH and add a new user:
sudo adduser <username>
Replace <username> with your username of choice.
Give superuser privileges:
sudo usermod -aG sudo <username>
Now, when you login to KDE as this user, you can then switch to root with
Update & Upgrade
The first step in installing any new software on Ubuntu, is first to update the repo list. This assures us that we receive all of the newest available packages for our system. Run in terminal:
sudo apt update && sudo apt upgrade
There are a few different KDE packages available. kde-plasma-desktop package is somewhat of a minimum package that installs only the bare minimums and nothing else. This is a good option for those who want a smaller download/installation size, or that want to manually choose which packages to install after.
task-kde-desktop is the full KDE release. kde-standard is Debian’s selection of packages. We go with the minimal install. To install KDE:
sudo apt install kde-plasma-desktop
Now it’s time to install the xrdp service so that we can connect to the new GUI. Run this in terminal:
sudo apt install xrdp
That’s it! You now have KDE installed with xrdp.
You may find many guides out there with steps to edit xrdp config settings. By default, this guide, with no additional configuration works on Debian 12 as of the writing of this guide: September 14, 2023.
Connect with Remote Desktop
If you are on a Windows PC, open up Remote Desktop Connection by searching for it in the Windows search bar. Enter in your Ubuntu server’s IP address. You can leave User name blank. Click Connect.
You will be brought up with the xrdp login screen.
You can use the default Xorg session. Input your username (ie. root) and password, click OK, and your new KDE desktop will load!