Xrdp package is available in the default Ubuntu repositories. To install it, run:
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
go to source for more info