This recipe provides steps to add a desktop user interface to a vanilla Linux virtual machine in the cloud, and then connect to the UI using Remote Desktop Protocol (RDP).
1. First, SSH to Linux VM.
2. Install xfce4 desktop environment.
sudo apt update
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install xfce4
3. Install and configure an xrdp server.
sudo apt -y install xrdp
sudo systemctl enable xrdp
4. Tell RDP to use xfce as your desktop environment.
echo xfce4-session >~/.xsession
5. Restart the RDP server to make the above take effect.
sudo service xrdp restart
6. Set up a local Linux user account password. This password must be 8 characters or less.
sudo passwd <your-userid>
7. Open port 3389 on your VM.
8. Connect to your VM using RDP client from Windows.
9. Login using your local Linux user name and password.