A draft guide for activating WSL2 on Windows 10 (Version 20H2, OS Build 19042.746). This post serves as a notebook documenting the trial and error process. Note that it might contain minor errors as it is taken directly from my personal notes.
winver in the Windows search bar and check your version.Version 20H2 (OS Build 19042.746).wsl -l -vwsl --set-version Ubuntu-18.04 2 (Replace Ubuntu-18.04 with your installed version).wsl --set-default-version 2Follow the official documentation if needed: WSL Installation Guide
Enable WSL Component:
Open PowerShell as Administrator and run:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Enable Virtual Machine Feature:
Run the following in PowerShell as Administrator:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
sudo apt update && sudo apt upgradesudo apt install xrdpsudo apt install -y xfce4gdm3 or lightdm.sudo apt install -y xfce4-goodiessudo 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=64/#max_bpp=64\nmax_bpp=128/g' /etc/xrdp/xrdp.ini
sudo sed -i 's/xserverbpp=24/#xserverbpp=24\nxserverbpp=128/g' /etc/xrdp/xrdp.ini
echo xfce4-session > ~/.xsession
Edit Startup Script:
Open the startup script:
sudo nano /etc/rdp/startwm.sh
Add the following line before the last two lines:
startxfce4
sudo /etc/init.d/xrdp start
This will allow you to connect via the Windows Remote Desktop Connection tool using localhost:3390.Summary This setup took some time to figure out, but it provides full control over the Ubuntu environment with a graphical interface.
Shamrat Published: 17.01.2021
References
Powered by Jekyll and Minimal Light theme.