-
Notifications
You must be signed in to change notification settings - Fork 822
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 Windows 11 suddenly cannot open display #7950
Comments
Just found something not sure is related. With |
It is an issue with an environment variable that is needed to point to the host machines IP. If doesn't work take a look at #6430 |
Unfortunately, "wsl --update" and "wsl --shutdown" doesn't work for me... I tried to set export DISPLAY="$(grep nameserver /etc/resolv.conf | sed 's/nameserver //'):0" as suggested in #6430, however, still not working. |
Try following the steps outlined here https://github.com/microsoft/wslg/wiki/Diagnosing-%22cannot-open-display%22-type-issues-with-WSLg I was able to get it working using this! |
I followed the steps outlined in this link as a workaround, which I originally tested using WSL 1 on a Windows 10 Home build 19044.1766 Dell Inspiron 15 5000, but which also worked for WSL 2 on a Windows 11 Home build 22000.739 HP Envy. The link does say that you should follow the WSL 2 guide instead if you use WSL 2, but the WSL 1 guide actually works as well. The summary is to have |
Tried this as well. Thank you! |
Im also having the same issue in W10 |
I also followed this article https://docs.microsoft.com/en-us/windows/wsl/tutorials/gui-apps |
@phetdam 你好我想询问一下就是这篇官方教程中并未提到配置ip打开防火墙之类的操作 |
Previously I ran the |
细节我不太清楚,我只用了VcXsrv + WSL1,没有花时间仔细看。 I don't think it's possible to achieve complete Ubuntu desktop however, as the X11 forwarding works on per-application basis. Unless there is a "desktop" program, maybe then it's ok; not sure about performance. |
@phetdam 大致了解了,感谢 |
HI All, this link says https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps You will need to be on Windows 10 Build 19044+ this is my windows version ver Microsoft Windows [Version 10.0.19045.2604] but still i have this error gedit ~/.bashrc (gedit:508): Gtk-WARNING **: 09:51:14.444: cannot open display: @gogog22510 is this working for you? |
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request. Thank you! |
Version
Microsoft Windows [Version 10.0.22000.438]
WSL Version
Kernel Version
5.10.60.1
Distro Version
Ubuntu 20.04
Other Software
No response
Repro Steps
I bought a new Lenovo Legion laptop which came with Windows 11 and I followed this article https://docs.microsoft.com/en-us/windows/wsl/tutorials/gui-apps to install WSL2 and directly running Linux GUI app inside WSL2 which was working fine.
However, not sure what changes, maybe I ran
sudo apt update
, Linux GUI app stop working anymore due to(gedit:742): Gtk-WARNING **: 22:13:35.300: cannot open display: :0
Simply run any gui command in WSL2
Expected Behavior
Expected behavior is described in https://docs.microsoft.com/en-us/windows/wsl/tutorials/gui-apps, which is used to work.
Actual Behavior
The GUI keep complaining cannot open display, even though I tried some solution listed here to get the actual ip, still has no hope.
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: