Fixing WSL X11 Forwarding on Windows Update 23H2 (Windows 11 Home Version 22631.3737)
Windows 11 Home version 23H2, build 22631.3737, introduced a change that prevents users from opening GUI applications using WSL (Windows Subsystem for Linux). This article provides a detailed explanation of the issue and a step-by-step guide to fixing WSL X11 forwarding on the affected Windows update.
What is WSL X11 Forwarding?
WSL X11 forwarding is a feature that allows users to run GUI applications within a WSL environment on Windows 11. It works by forwarding the X11 display from the WSL environment to the Windows host, allowing users to interact with the GUI applications as if they were running natively on Windows.
What Changed in the Recent Windows Update?
In the recent Windows update, Microsoft made changes to the way WSL X11 forwarding works. Specifically, the update introduced a new security feature that prevents users from opening GUI applications within WSL. This change was made to improve the security of the Windows operating system, but it has caused issues for users who rely on WSL X11 forwarding to run GUI applications.
How to Fix WSL X11 Forwarding on Windows Update 23H2
To fix WSL X11 forwarding on Windows Update 23H2, you need to modify the WSL configuration to allow X11 forwarding. Here's a step-by-step guide to fixing the issue:
Open a command prompt as an administrator.
Run the following command to stop the WSL service:
wsl --shutdownRun the following command to open the WSL configuration file:
notepad.exe "$env:USERPROFILE/.wslconfig"Add the following lines to the configuration file:
[wsl2] disabled = false localhostForwarding = trueSave the configuration file and close Notepad.
Run the following command to start the WSL service:
wslLaunch your WSL environment and try opening a GUI application using X11 forwarding.
The recent Windows update, Windows 11 Home version 23H2, build 22631.3737, introduced a change that prevents users from opening GUI applications within WSL using X11 forwarding. To fix the issue, users need to modify the WSL configuration to allow X11 forwarding. By following the steps outlined in this article, users can continue to use WSL X11 forwarding on the affected Windows update.