Fala meus amigos.
Sou novo no forum, mas estou feliz em embarcar no mundo linux, pois vejo que para quem é curioso, é repleto de possibilidades.
Bom! pela questão do nosso colega, pelo que entendi: Ele quer acessar remotamente o ubuntu via RDP, semelhante ao que se faz com windows.
A tempos atrás passei pela situação e descobri fuçando muito na net. Na teoria não sei explicar mas só sei que funcionou no ubuntu 18 (todas as versões) e mint.
Instalando o xfce
sudo apt update
sudo apt install xfce4 xfce4-goodies xorg dbus-x11 x11-xserver-utils
Instalando o XRDP
sudo apt install xrdp
When the installation process is complete the Xrdp service will automatically start. You can verify that Xrdp is running by typing:
sudo systemctl status xrdp
Configuring Xrdp
sudo nano /etc/xrdp/xrdp.ini
Add the following line at the end of the file:
exec startxfce4
Save the file and restart the Xrdp service:
sudo systemctl restart xrdp
Configuring Firewall
sudo nano /etc/xrdp/xrdp.ini
Add the following line at the end of the file:
exec startxfce4
Save the file and restart the Xrdp service:
sudo systemctl restart xrdp
Configuring Firewall
By default, Xrdp listens on port 3389 on all interfaces. If you run a firewall on your Ubuntu server (which you should always do), you’ll need to add a rule that will enable traffic on the Xrdp port.
To allow access to the Xrdp server from a specific IP address or IP range, in this example 192.168.1.0/24, run the following command:
sudo ufw allow from 192.168.1.0/24 to any port 3389
If you want to allow access from anywhere (which is highly discouraged for security reasons) run:
sudo ufw allow 3389
sudo apt-get update
sudo apt install xrdp xorgxrdp
sudo apt install -y freerdp-x11
echo env -u SESSION_MANAGER -u DBUS_SESSION_BUS_ADDRESS xfce4-session>~/.xsession
sudo reboot
Fiz todos os procedimentos e quando fui testar. Pimba!! funcionou.