Please refer to the guide How to Connect to a Linux Server Remotely to log in to your Remote Linux Server. Next, input your login password as prompted.
Before the desktop environment installation, you should know which KDE package to install. There are several variants of KDE packages avaiable. They are KDE Full, KDE Standard, and KDE Plasma Desktop.
It is the complete KDE pack that include the KDE Plasma desktop environment and its associated applications and utilities. By installing KDE Full, you have access to the complete KDE Plasma ecosystem, allowing you to have a comprehensive and feature-rich desktop environment. However, the complete pack is around 1GB, it will take some time in downloading and installing. You should also consider if your VPS has enough space for the full package. You can install it using the following command:
apt install kde-full
The KDE Standard includes the KDE Plasma Desktop and a selection of the most common used applications. The focus is generally on providing a functional and user-friendly desktop environment out of the box. Normally, KDE standard is recommended. You can install it using the following command:
apt install kde-standard
The installation of KDE Plasma Desktop refers to a bare-minimum installation. It only includes basic utilities like a file manager, browser, and terminal emulator. You can install it using the following command:
apt install kde-plasma-desktop
As the following several operations require the root permission, we will switch to the root user first using the command below.
sudo -i
After that, issue the commands below to update your list of packages, followed by installing KDE Plasma pacakge. There are several variants of the KDE package. They are KDE Full, KDE Standard, and KDE Plasma Desktop. In this example, we will install the minimal package - KDE Plasma Desktop
apt update -y apt install kde-plasma-desktop
Before the installation, you are often prompted to confirm the disk space this operation will use. Input "y" to continue the installation.
After the installation, you will be prompted to choose the services that need to be restarted. Then, press enter to restart the chosen services.
Issue the commands below to install xrdp service.
apt install xrdp -y
After installing xrdp, you will also be prompted to decide which service should be restarted. Press enter to confirm with your choices.
This command uses sed to replace the "new_cursors=true" line with "new_cursors=false" in the xrdp.ini file. This change is necessary to avoid a cursor issue that can occur with XRDP.
sed -e 's/^new_cursors=true/new_cursors=false/g' \ -i /etc/xrdp/xrdp.ini
Because xrdp need to use /etc/ssl/private/ssl-cert-snakeoil.key whose unix group is ssl-cert , so we need to add xrdp into this group.
adduser xrdp ssl-cert
Now, we will configure that the KDE Plasma session is started when you log in via XRDP. The cat command is used to create a .xsessionrc file with the specified environment variables. After executing these commands, the ~/.xsession and ~/.xsessionrc files will be created or overwritten with the specified content. These files are typically used during the X session startup process to set environment variables and define the startup command or script to be executed.
echo "/usr/bin/startplasma-x11" > ~/.xsession D=/usr/share/plasma:/usr/local/share:/usr/share:/var/lib/snapd/desktop C=/etc/xdg/xdg-plasma:/etc/xdg C=${C}:/usr/share/kubuntu-default-settings/kf5-settings cat <~/.xsessionrc export XDG_SESSION_DESKTOP=KDE export XDG_DATA_DIRS=${D} export XDG_CONFIG_DIRS=${C} EOF
Then, we enable and restart the XRDP service using the following command.
systemctl enable xrdp systemctl restart xrdp
Open RDP service on your local machine. Then, input your Linux Ubuntu server IP in the Computer field and click Connect.
Then, you can see the RDP login interface. Enter your Linux server login username and password and click OK.
With the authentication passed, you should be able to access your Ubuntu Desktop environment.