In this article, we’ll take a look at how to enable Remote Desktop access to Ubuntu Server using xRDP.
Typically, Linux servers don’t have a graphical desktop interface. Therefore, you first need to install X11 and a lightweight desktop environment that will act as the engine for xRDP.
There are several desktop environments in the Ubuntu repository. In our case, we will be using Xfce. It is a fast, stable, and lightweight desktop environment for Linux.
Update packages to the latest version:
sudo apt update && apt -y dist-upgrade
Install Xfce:
sudo apt -y install xfce4 xfce4-goodies xorg dbus-x11 x11-xserver-utils
Install xRDP:
sudo apt -y install xrdp
Check that the xRDP daemon is installed and running:
sudo systemctl status xrdp
Add your user to the SSL-CERT group:
sudo adduser xrdp ssl-cert
The xRDP settings are specified in the xrdp.ini configuration file:
sudo nano /etc/xrdp/xrdp.ini
Add the following line to the end of the file:
exec startxfce4
And restart XRDP:
sudo systemctl restart xrdp
Remember to open port 3389 in the Linux firewall. The following command allows RDP connections to the server from the specified network:
sudo ufw allow from 192.168.1.0/24 to any port 3389
successfully connect remote desktop but find blank screen. I have issue this sudo ufw allow from 192.168.1.240/24 to any port 3389. Is it correct then what i miss? please guide.
Check if the account you are using to login via the RDP client is not currently logged on locally on the Ubuntu target host. Perform a logout operation
same blank screen
Perhaps XFCE session is not running.
Check for it after startxfce4
BR
Joe.