Return to site

 

Install GUI Desktop in WSL2 Ubuntu 20.04 LTS inWindows 10 

 

· DevOps

 

broken image

Firstcheck if you Windows 10 Version supports WSL 2 or not checkout the link [Link] 

 

broken image

Setup 

Once you are done withinstallation, you can set wsl2 to be default using command: 

wsl --set-default-version 2 

you can check the version ofthe distro using command (our case ubuntu 2) 

wsl -l -v 

 

broken image

You can change the version using command if its WSL version 1 wsl --set-version 2 

Onceyour distro is up and running you can setup either Xfce 

1 .Update the Distro installation and remove previous install of xrdp 

$sudo apt-get update && sudoapt-get -y upgrade
$sudo apt-get purge xrdp 

broken image

2. Install Xfce , select lightdm or gdm3 as per your preference whenasked # install xfce
sudo apt-get install -y xfce4 xfce4-goodies 

3.Install Xrdp # install xrdp
sudo apt-get install xrdp 

4. Openthe file in location and edit as shown in the image sudo nano /etc/xrdp/startwm.sh 

and add comment the last 2 lines and add the following in the end # xce4
Startxfce4 

 

broken image

5. No run the following to set the port and other settings $sudo cp /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.bak
$sudo sed -i 's/3389/3390/g' /etc/xrdp/xrdp.ini
$sudo sed -i 's/max_bpp=32/#max_bpp=32\nmax_bpp=128/g' /etc/xrdp/xrdp.ini
$sudo /etc/init.d/xrdp start 

 

broken image
broken image