wslg: Attempting to run GUI apps returns an error
Environment
Windows build number: Microsoft Windows [Version 10.0.21364.1]
Your Distribution version: Ubuntu 20.04
Your WSLg version: 1.0.17.1
Steps to reproduce
- Update to Windows build 21364.
- Install special NVIDIA 470.14 driver.
- Run
wsl --update
. - Reboot.
- Create new Ubuntu 20.04 WSL2 instance.
- Install GUI applications (
x11-apps
, Chrome, etc.). - Attempt to run the applications.
WSL logs:
pulseaudio.log weston.log versions.txt
Expected behavior
GUI applications should open when run.
Actual behavior
Attempting to launch from the CLI returns the error: Error: Can't open display: :0
.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 6
- Comments: 43 (1 by maintainers)
I’m having the same issue.
I made a javascript-based (electron) game engine for 2d games, mainly for my Collectible card game (https://store.steampowered.com/app/723410/Doomtrooper_CCG/) but I’ve been making a few short horror titles too.
Great! I can’t wait. I have it all setup so I’ll watch this thread for news.
Appreciate you guys’ hard work on this. WSL2 (and now WSLg) has done the impossible… brought me back from my Linux box to Windows 10 gasp
“College me” would be pissed, for sure!
We’ll have an update out by early next week.
Thanks @zacharee, we understand the problem and will have the fix in the next version of WSLg.
We’ll repro this locally and fix this… can you try moving monitor 1 to be on the right of 2… i suspect it will fix your issue
@pahosler could you take a peek at: https://github.com/microsoft/wslg/wiki/Diagnosing-"cannot-open-display"-type-issues
My system also has both
/tmp/.X11-unix
and/mnt/wslg/.X11-unix
. I think @pecigonzalo’s issue might be unrelated.Here’s the command output:
We appreciate the kind words 😃, glad this is working out for you. The thanks for the multi-mon fix goes to @hideyukn88.
@spronovo just wanted to drop in and high five you. My dev machine just leveled up majorly, being able to do GUI apps without any hacks and SOUND IS BACK.
Thanks for all your hard work, and the implementation is so nice for a first release!)
Thanks for fixing the monitor configuration issues!
@spronovo As a last resort, I
rm -rf
ed the socket and the symlink, and now I get the expected contents for the folder (and I no longer get the display not found error). I’m not sure what the cause of this was but I can say I had previously installed kali-linux and X410 as means of getting the experience that wslg now provides.Agreed, after a bit more research it looks like it’s actually our init that is processing these… so we should be able to swap the order to address this i think. Will chat about this with @benhillis next week. Please go ahead and split this into a separate issue.
Also if you could try recreating the link to see if that’s the only problem.
Do X11 app start after that? If you can help us understand how the link get wiped on your system that would be much appreciated as we don’t see this on our end 😃.