How to use GUI Apps on WSL
This Guide still work with latest Windows 10 and windows 11 builds but you should consider using WSL2 instead of WSL1. WSL2 is faster and more stable than WSL1. WSL2 also support GUI apps without any extra configuration on windows 11. but you still need to install a Xserver on windows 10. I recommend GWSL
Requirements:
- A Windows 10 build 16215+ device
- Brain
- Little time
Enable Windows substytem for Linux
Open Powershell with administrator and paste:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Reboot your device
Install distribution from microsoft store
I’m gonna install debian
Install desktop environment and GUI
Install Desktop environment
Install Xserver
- Download and install VcXsvr here
- Run Xlaunch
- Select “One large winow”
- “Start no client”
- Click next again
- you can save settings to easily open it later
- And done. You have something like this:
Connect Susbsystem Xserver
Make a batch script for easy launch
- Open notepad and paste:
@echo off
title debian
config.xlaunch
bash -c "export DISPLAY=:0 && startxfce4"
pause
- Save file WLSGUI.bat
- Put config.xlaunch and WLSGUI.bat in same directory
- Run GUI.bat
Here is my themed Xfce4 Desktop
This post is licensed under CC BY 4.0 by the author.