Using XRDP to remote desktop from Windows to Ubuntu

Page Contents

Caveats:

  • Disable Ubuntu Sharing options. They are not compatible with XRDP.
  • Make sure you are logged out of the desktop session at the server, before logging in with RDP.

Setup

  1. Install xrdp and gnome-session
    sudo apt update
    sudo apt install xrdp gnome-session
    
  2. Tell xrdp to launch GNOME desktop when user logins with RDP
    echo "gnome-session" | tee ~/.xsession
    
  3. Setup X session type and auth keys
    echo "export XAUTHORITY=${HOME}/.Xauthority" | tee ~/.xsessionrc
    echo "export GNOME_SHELL_SESSION_MODE=ubuntu" | tee -a ~/.xsessionrc
    echo "export XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/ xdg" | tee -a ~/.xsessionrc
    
  4. enable and restart
    sudo systemctl enable --now xrdp
    sudo systemctl restart xrdp
    
  5. [Optional] Reboot server
    sudo reboot
    
  6. Login from remote client using RDP (windows) or Reminna (Linux)

Leave a Reply

Your email address will not be published. Required fields are marked *