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.
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 Xfce and the xfce4-goodies pacakge, which includes additional software and artwork that are related to the Xfce desktop.
apt update apt install xfce4 xfce4-goodies
Before the installation, you are often prompted to confirm the disk space this operation will use. Input "y" to continue the installation.
During the installation, you will be prompted to choose a default display manager - gdm3 or Lightdm - for Xfce. Choose either one and press enter to continue.
Issue the commands below to install xrdp service.
apt install xrdp -y
After installing xrdp, verify the status of xrdp using the following command.
systemctl status xrdp
Now, we will configure that xfce4-session is used as a session manager upon graphical login request. If you don’t write this information into the .xsession file, no session manager is chosen, and the RDP session will fail to connect to the graphical display. Use the echo command and then restart xrdp service.
echo "xfce4-session" | tee .xsession 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.