Via @VIEWVIEWVIEW WSL2 under Windows 10 previously and upgraded to Windows 11 via windows update (no clean w11 installation) #337

Open
opened 2025-12-29 00:24:50 +01:00 by adam · 1 comment
Owner

Originally created by @sickcodes on GitHub (Mar 19, 2022).

Hey,

if you used WSL2 under Windows 10 previously and upgraded to Windows 11 via windows update (no clean w11 installation): you need to update your WSL2 VM first.

# Update WSL2 (run powershell with administrator privileges)
wsl --update

# Shut any down all VMs
wsl --shutdown

# Wait at least 8 seconds. See for more info: https://docs.microsoft.com/en-us/windows/wsl/wsl-config#the-8-second-rule

# Start wsl again
wsl

# Test if display output works now
xeyes

# Run your docker container
docker run -it \
--device /dev/kvm \
-p 50922:10022 \
-e "DISPLAY=${DISPLAY:-:0}" \
-v /mnt/wslg/.X11-unix:/tmp/.X11-unix \
sickcodes/docker-osx:latest

Hope this helps :)

Originally posted by @VIEWVIEWVIEW in https://github.com/sickcodes/Docker-OSX/issues/430#issuecomment-1059452630

Originally created by @sickcodes on GitHub (Mar 19, 2022). Hey, if you used WSL2 under Windows 10 previously and upgraded to Windows 11 via windows update (no clean w11 installation): you need to update your WSL2 VM first. ``` # Update WSL2 (run powershell with administrator privileges) wsl --update # Shut any down all VMs wsl --shutdown # Wait at least 8 seconds. See for more info: https://docs.microsoft.com/en-us/windows/wsl/wsl-config#the-8-second-rule # Start wsl again wsl # Test if display output works now xeyes # Run your docker container docker run -it \ --device /dev/kvm \ -p 50922:10022 \ -e "DISPLAY=${DISPLAY:-:0}" \ -v /mnt/wslg/.X11-unix:/tmp/.X11-unix \ sickcodes/docker-osx:latest ``` Hope this helps :) _Originally posted by @VIEWVIEWVIEW in https://github.com/sickcodes/Docker-OSX/issues/430#issuecomment-1059452630_
Author
Owner

@kobimx commented on GitHub (Mar 23, 2022):

Exactly what i needed, i was having a 2 "gtk initialization error" and after updating wsl it works

Thanks

@kobimx commented on GitHub (Mar 23, 2022): Exactly what i needed, i was having a 2 "gtk initialization error" and after updating wsl it works Thanks
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Docker-OSX#337