

Try it out and you should get Desktop up and running for your WSL2 environment. With all of that setup out of the way, you should be able to simply launch VcXsrv from the pinned shortcut and everything should work. This sets windowed mode to 1920×1080 for monitor #1 on my machine. I personally added the following to ExtraParams under the XLaunch node of config.xlaunch. Name: vcxsrv or pulseaudio depending which rule you are adding.Program path: %ProgramFiles%\VcXsrv\vcxsrv.exe for VcXsrv and %SystemDrive%\WSL VcXsrv\pulseaudio-1.1\bin\pulseaudio.exe for PulseAudio.Open Windows Defender Firewall with Advanced Security and add two new Inbound Rules as follows: Next you need to allow inbound traffic to Windows for VcXsrv and PulseAudio. Opening Windows Firewall for VcXsrv and PulseAudio Pin the WSL VcXsrv shortcut somewhere convenient like the taskbar.


ubuntu.exe run for when you are using standard uBuntu from the Microsoft Store for WSL.ubuntu1804.exe run if you are using uBuntu 18.04 from the Microsoft Store for WSL.ubuntu2004.exe run in the case you are using uBuntu 20.04 from the Microsoft Store for WSL.Next, edit the startWSLVcXsrv.bat batch file and change the last line that reads ubuntu.exe run to one of: Click Change high DPI settings and choose Override high DPI scaling behavior.Right-click xlaunch.exe and go to Compatibility.Once installed, you’ll want to enable High DPI scaling for VcXsrv in Windows. Run the vcxsrv-64.1.20.8.1.installer.exe installer in this folder, choosing defaults for the install. You should end up with contents under C:\WSL VcXsrv. zip package which contains VcXsrv and PulseAudio along with some configuration and a shortcut to launch.Įxtract it to the root of your C:\ drive. This is up to you, though I personally chose lightdm.ĭownload this. If you’re running Kali you should use: sudo apt install kali-desktop-xfceĭuring the install you’ll be prompted about which display manager to use. Setting up a WSL2 GUI X-Server in Windows There were also a couple of extra tweaks needed for audio passthrough using PulseAudio and setting a windowed resolution. Specifically, the communication to VcXsrv was being blocked by Windows Firewall. I found a guide that runs through the process but found that a few tweaks needed to be made. I needed to set up a WSL2 GUI recently on my machine (WSL2 running uBuntu 20.04.1 LTS).
