xRDP on Ubuntu

Install xrdp and enable:
# apt install xrdp
# systemctl enable xrdp
# systemctl start xrdp

Allow TCP Port 3389:
# ufw allow 3389/tcp
# ufw reload

Check the status of the firewall
# ufw status

For Mate Desktop:
$ sudo apt-get install mate-core mate-desktop-environment

Uninstall and reinstall desktop:
# apt-get autoremove ubuntu-desktop-minimal
$ sudo apt-get install ubuntu-desktop-minimal