How to Use Linux Dedicated Server as GUI using HomeRDP
All Linux server operating systems are delivered without a graphical user interface (GUI) by default. A GUI can only be used on a dedicated server with a connected KVM. KVM access is not available as standard for our dedicated servers, it must be ordered separately. This tutorial is a simple guide to installing the two most popular GUIs for CentOS and Ubuntu. In order to be able to use them afterward, you have to connect to your VPS via VNC or via KVM to a dedicated server. Please note that you have to create a new user to log in to the GUI, since logging in as root is not possible.
Please also note that VNC does NOT allow the encrypted connection. If you only want to administrate your server via a GUI, please use xRDP instead.
If you are not sure whether your user has the necessary rights, you can run the following command at the beginning of each SSH session:
sudo -i
After the command has been executed, you receive further (root) permissions without having to precede each command on the command line with the “sudo” command.
Ubuntu 16.04 / 18.04
Please connect to your server via SSH as root, create a new user and enter a password:
useradd -m NewUserName && passwd NewUserName
Now you can install the Ubuntu desktop GUI (it will install updates, install the GUI and restart the server automatically) with the following command:
apt update && apt upgrade -y && apt install ubuntu-desktop -y && init 6
Alternatively, you can install the Kubuntu desktop GUI (it will install updates, install the GUI, and automatically restart the server) with the following command:
apt update && apt upgrade -y && apt install kubuntu-desktop -y && init 6
Now please connect to your VPS via VNC, or to your dedicated server via KVM to be able to use your new GUI.
Ubuntu (from version 18.10)
Please connect to your server via SSH as root, create a new user and enter a password:
useradd -m NewUserName && passwd NewUserName
You can use the “tasksel” tool to choose from various GUIs and install them conveniently.
apt update && apt upgrade -y && tasksel
Some desktop environments require the “lightdm” display manager instead of the “gdm3” manager that comes pre-installed with Ubuntu. Please install this if your desktop environment does not load correctly:
apt install lightdm
Please do not install several desktop environments parallel to each other. Restart your server after successful installation. Now please connect to your VPS via VNC or to your dedicated server via KVM to be able to use your new GUI.
CentOS 6
Please connect to your server via SSH as root, create a new user and enter a password:
useradd -m NewUserName && passwd NewUserName
You have to adjust your “/etc/inittab” so that your server automatically starts runlevel 5 after the reboot:
nano /etc/inittab
Please change the following line:
id:3:initdefault: -> id:5:initdefault:
Save the file and close the editor with ctrl+o, enter, and ctrl+x.
To install the GNOME GUI, please use the following command (it will also install updates and restart the server):
yum update -y && yum -y groupinstall “Desktop” “X Window System” “Fonts” && init 6
Now please connect to your VPS via VNC, or to your dedicated server via KVM to be able to use your new GUI. Alternatively, you can also install the KDE GUI with the following command:
yum update -y && yum -y groupinstall “KDE desktop” “X Window System” “Fonts” && init 6
Now please connect to your VPS via VNC, or to your dedicated server via KVM to be able to use your new GUI.
CentOS 7
Please connect to your server via SSH as root, create a new user and enter a password:
useradd -m NewUserName && passwd NewUserName
You can install the KDE GUI with the following command (it will also install updates and restart the server):
yum update -y && yum -y groupinstall “KDE Plasma Workspaces” && ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target && init 6
Alternatively, you can install the GNOME GUI with the following command (it will also install updates and restart the server):
yum update -y && yum -y groupinstall “GNOME Desktop” “Graphical Administration Tools” && ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target && init 6
Now please connect to your VPS via VNC, or to your dedicated server via KVM to be able to use your new GUI.