Update your operating system by running the following commands in sequence:
sudo apt update
sudo apt upgrade
Set a password for your user account: sudo passwd ubuntu
Install the Xfce desktop environment and the xrdp remote desktop server: sudo apt install xfce4 xrdp
Allow X server startup for any user: sudo nano /etc/X11/Xwrapper.config =anybody
Note: If you prefer to edit the file manually:
sudo nano /etc/X11/Xwrapper.configallowed_users=anybodySet Xfce as your default desktop session: echo xfce4-session >~/.xsession
Restart xrdp to apply the changes: sudo systemctl restart xrdp
Verify that xrdp is running: sudo systemctl status xrdp
If your virtual machine has a GPU, run these extra commands for better compatibility:
sudo usermod -aG ssl-cert xrdp
sudo apt install xorgxrdp
sudo systemctl restart xrdp
Use the Windows Remote Desktop Connection client:
ubuntu) and the password you set earlier/Important: Hardware GPU acceleration is not available over xrdp. Some graphics-intensive applications may not function correctly or may run in software rendering mode.