Ubuntu – How to setup xRDP for Ubuntu 20.04 in Windows Hyper-V

20.04hyper-vwindows 10xrdp

I want to know how to setup xRDP for Ubuntu 20.04 in Windows Hyper-V? Tutorials for Ubuntu 18.04 doesn't seem to work. I am using the ISO that I downloaded.

These are the tutorials I used. They all basically say the same thing…

Best Answer

Apparently Microsoft haven't added support for 20.04 yet. There is a pull request on GitHub but it is yet to be merged. However, you can use it.

To set up xRDP for Ubuntu 20.04 LTS,

  1. Disable "Auto Login" if you enabled it.

  2. Open a terminal and issue the following commands.

    wget https://raw.githubusercontent.com/Hinara/linux-vm-tools/ubuntu20-04/ubuntu/20.04/install.sh
    sudo chmod +x install.sh
    sudo ./install.sh
    
  3. After you’ve run your scripts, shut down your VM. On your host machine in an Administrator PowerShell prompt, execute this command:

    Set-VM -VMName <your_vm_name> -EnhancedSessionTransportType HvSocket
    
  4. Start your virtual machine and connect. You will be greeted with a connection prompt windows that asks for a screen resolution--this will indicate that everything is installed correctly. vmconnect

  5. This will take you to a Xorg login. This indicates that you've successfully brokered a connection and that the xrdp service is running. Login to begin your session. xrdplogin