How to install the Xfce graphical user interface (GUI) on Ubuntu?

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:

  • Run sudo nano /etc/X11/Xwrapper.config
  • Add the line: allowed_users=anybody
  • Save with Ctrl+O, press Enter, then exit with Ctrl+X

Set 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

Additional steps for GPU-enabled servers

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

Connect via Remote Desktop

Use the Windows Remote Desktop Connection client:

  • Enter your virtual machine's public IP address;
  • Log in with the username (e.g., 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.

Updated Date 18.12.2025