First, the server should be updated:
// Debian
sudo apt update; sudo apt upgrade -y
// Ubuntu
sudo apt update; sudo apt upgrade -y
After the update, the necessary packages will be installed:
// Debian
sudo apt install xfce4 xfce4-goodies xorg dbus-x11 x11-xserver-utils -y
// Ubuntu
sudo apt install ubuntu-desktop -y
Then xRDP can be installed:
// Debian
sudo apt install xrdp
// Ubuntu
sudo apt install xrdp
After installation, the status should return "active":
If the status is okay, a user still needs to be created. Then the xRDP service has to be restarted:
When finishing the configuration, you can connect to the root or the respective user data of the server via Remote Desktop. The default port is: 3389
The connection can be made via any RDP tool, connected with IP:PORT. When connecting you will be asked for the login data:
After successful login you see the desktop. With Ubuntu it looks a bit different than with Debian:
Ubuntu:
Debian: