GUI Ubuntu on Windows 10 with WSL2 Setup Via XRDP Remote Desktop

December 07, 2020
In this blog, we are going to talk about

GUI Ubuntu on Windows 10 with WSL2 Setup Via XRDP Remote Desktop

Plea click here to visit PART 1
Video Version
Step 1- Update the ubuntu
 $ sudo apt-get update && sudo apt-get upgrade  

Step 2- Remvoe Xrdp
  $ sudo apt-get purge xrdp

Step 3- Install Xrdp
  $ sudo apt-get install -y xrdp

Step 4- Install the desktop environment
  $ sudo apt-get install -y xfce4

Select GDM3 and press enter
 $ sudo apt install -y xfce4-goodies 

Step 5- Backup XRDP
  $ sudo cp /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.bak

Step 6- Change the default port
cd /
  $ sudo sed -i 's/3389/3390/g' /etc/xrdp/xrdp.ini

Step 7- Change the resolution of your display
  $ 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 

Step 8- Save every thing to xsession.
  $ echo xfce4-session > ~/.xsession

Step 9- Make changes to RDP script
  $ sudo nano /etc/xrdp/startwm.sh
edit these lines to (last two lines):
# test -x /etc/X11/Xsession && exec /etc/X11/Xsession
# exec /bin/sh /etc/X11/Xsession
Add these lines to the end of the file:
# xfce
startxfce4
CTRL + o to save
and CTRL + X to exit out of nano

Get the username by
 $ whoami

Step 18 Start xrdp
  $ sudo /etc/init.d/xrdp start

Step 19 Search for remote connect on window10 search and paste
localhost:3390

Step 20- Enter your username and password and hit connect.
Cheers

PLEASE SUBSCRIBE EFX TV :)

Uk2blogger