-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WSL2 Missing X server when running Windows Docker container #529
Comments
How are you running the WSL2 Linux containers? Are you running Docker Desktop for that? AFAIK, you can't run both with the Docker engine, you need to change the docker engine parameters to run either Linux or Windows. |
I don't have Docker Desktop on my system; I installed the Linux Docker Engine on my WSL2 Ubuntu instance (and as mentioned in my original post, I installed the Windows Docker Engine on Windows today). Starting a Windows container on Docker Engine for Windows doesn't have any impact on my running WSL2 containers, and vice versa. Running |
Triaging to the broader team to get more eyes on this. |
This issue has been open for 30 days with no updates. |
2 similar comments
This issue has been open for 30 days with no updates. |
This issue has been open for 30 days with no updates. |
I've been successfully running WSL2 Ubuntu on my company-managed Windows 11 Pro 23H2 (OS build 22631.4037) workstation. For Linux GUI applications, I'm using the following setup (due to some earlier issues with WSLg):
guiApplications=false
in.wslconfig
DISPLAY=:0
LIBGL_ALWAYS_INDIRECT=1
I'm also building and running Linux Docker containers in this WSL2 instance, but I don't think this is related to the issue below.
Today, I installed Docker CE engine on Windows to allow for building and running Windows images, using instructions provided at https://learn.microsoft.com/en-us/virtualization/windowscontainers/quick-start/set-up-environment?tabs=dockerce#windows-server-1. All good so far; after a reboot I can still run X applications from my WSL2 instance.
However, as soon as I run a Windows container, for example by running
docker run --rm -it mcr.microsoft.com/windows/nanoserver:ltsc2022 cmd.exe
from a PowerShell or CMD.exe console, all my WSL2 GUI applications disappear. Attempting to start a new GUI application from my WSL2 instance (in this example Google Chrome) shows the following error messages:Stopping or removing the Windows container doesn't help; the only way I've found so far to recover from this situation is by rebooting my machine. Any ideas as to why this may be happening, or how to troubleshoot or fix this issue?
The text was updated successfully, but these errors were encountered: