Skip to the content.

wslWithGUI


Run Ubuntu Desktop GUI on Windows Subsystem Linux 2 on Windows 10 —

Step 1: Activate Windows Subsystem Linux Feature

Open Powershell or CMD as administrator:


Step 2: Update to Windows Subsystem Linux

Download WSL2 Update Package: Download Package

Now Set WSL default to version 2 using the following command In CMD or Powershell

wsl --set-default-version 2

If you have already installed linux, update its version by:

wsl --set-version <linuxName> 2

Now, if everything done correctly wsl will be updated and set default for linux installations


Step 3: Install Ubuntu

Download the LTS version of Ubuntu from the Microsoft Store : Link

After downloading, open the Ubuntu app it’ll install the linux subsystem. Follow the instructions and enter your unix username and password, when the linux is setup install the updates the system.

sudo apt update && sudo apt upgrade

Step 4: Install xrdp service and Ubuntu Gnome Desktop

We’ll be using the Remote Desktop Protocol to connect to the display

sudo apt install xrdp ubuntu-gnome-desktop

During installation if prompted to configure display manager, select gdm


Step 5: Configure XRDP

The rdp connection will be local so why not better image quality

sudo sed -i 's/max_bpp=32/#max_bpp=32\nmax_bpp=128/g' /etc/xrdp/xrdp.ini
sudo sed -i 's/xserverbpp=24/#xserverbpp=24\nxserverbpp=128/g' /etc/xrdp/xrdp.ini

Done!!

Now run the xrdp service using (in shell)

sudo /etc/init.d/xrdp start

Open Windows Remote Desktop Service

search for rdp in start menu

Use Computer as : localhost:3390 or localhost:3389 if you didn’t change the port.

Then click Connect

You’ll be asked for the unix username and password and keep the session type to xorg


That’s it. Thank you for reading!