My local Ubuntu 20.04 WSL2 setup.
From Windows, as admin:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Install the latest WSL2 kernel.
Restart, then:
wsl --set-default-version 2
- Install X410 from Windows Store
- Launch X410
- Right click tray menu, click "Allow Public Access", then allow through Windows Firewall
- Install Ubuntu 20.04 from Windows Store
- Run the installer and create a username and password
Initial setup inside Ubuntu Bash:
sudo apt-get update
sudo apt-get full-upgrade
# Installing common deps
sudo apt-get install git gpg vim tasksel
# Set up desktop environment
sudo tasksel
# Select "Ubuntu minimal desktop" in tasksel.
# Alternative: Install xfce4 minimal
sudo apt install xfce4 xfce4-terminal
# Alternative: Install gnome minimal
sudo apt install gnome-session gnome-terminal
# Install the Dotnet Core framework repository
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
# Install Genie (for creating a pseudo-systemd-compatible environment to run in)
curl -s https://packagecloud.io/install/repositories/arkane-systems/wsl-translinux/script.deb.sh | sudo bash
sudo apt install -y systemd-genie
# Disable services blocking genie startup
sudo systemctl mask multipathd.socket
sudo systemctl mask systemd-remount-fs.service
- Create file
desktop.sh
in user root (select relevant option below). chmod a+x desktop.sh
- Create a file
launch-desktop.bat
(select relevant option below) - Run the batch script to start up.
Shut down the WSL2 instance by running:
wsl -t Ubuntu-20.04
Misc xfce4 settings
Enable sound (pulseaudio)
https://x410.dev/cookbook/wsl/enabling-sound-in-wsl-ubuntu-let-it-sing/
in
etc/pulse/default.pa
set additional CIDRadd the following line into the
desktop-xfce4.sh
ordesktop-gnome.sh
scriptbatch files will be different
Resolve cryptic error with WSLInterop
Like this
Genie profile script