microsoft / wslg

Enabling the Windows Subsystem for Linux to include support for Wayland and X server related scenarios
MIT License
10.14k stars 303 forks source link

Can't open display error when trying to launch apps #134

Closed mickaelchanrion closed 3 years ago

mickaelchanrion commented 3 years ago

Environment

Windows build number: Microsoft Windows [Version 10.0.21370.1]
Your Distribution version: Ubuntu 20.04
Your WSLg version: 1.0.17.1

Steps to reproduce

Thinking that there might be a misconfig in my distro, I tried to test wslg with a fresh ubuntu distro, but same result...

Please note: I followed this blog post 2 months ago to try to get google-chrome running https://techcommunity.microsoft.com/t5/windows-dev-appconsult/running-wsl-gui-apps-on-windows-10/ba-p/1493242 I could launch basic apps like xcalc but couldn't launch google-chrome Then I uninstalled VcXsrv.

WSL logs:

Expected behavior

Launch the gui apps

Actual behavior

Gettings errors

smallst commented 3 years ago

do you restart your wsl?

mickaelchanrion commented 3 years ago

Yes, I even restarted the computer

spronovo commented 3 years ago

Thanks for your report. You are hitting a known issue in version 1.0.17 with monitor configuration (see #19)

weston: ../libweston/backend-rdp/rdpdisp.c:481: disp_monitor_validate_and_compute_layout: Assertion `isConnected_V == true' failed.

Good new is this is fixed in 1.0.19 that we just released moments ago. Open an elevated command prompt in Windows and type

wsl --shutdown
wsl --update

That should pick up 1.0.19 and your config should start working.

mickaelchanrion commented 3 years ago

After the update, I still have the same issue :/

lateau commented 3 years ago

@mickaelchanrion Which kernel version does it have now? I solved this issue by updating & force restarting WSL as he described.

Reproduce:

  1. Run Powershell as Administrator
  2. Execute wsl --shutdown and wsl --update
  3. Launch Ubuntu
C:\Users\***> wsl --status
Default Distribution: Ubuntu
Default Version: 2

Windows Subsystem for Linux was last updated on 5/4/2021
The Windows Subsystem for Linux kernel can be manually updated with 'wsl --update', but automatic updates cannot occur due to your system settings.
To receive automatic kernel updates, please enable the Windows Update setting: 'Receive updates for other Microsoft products when you update Windows'.
For more information please visit https://aka.ms/wsl2kernel.

Kernel version: 5.10.16
mickaelchanrion commented 3 years ago

Yes I did that, and I have the same version as you. But still not working for me

sukehiro-San commented 3 years ago

Screenshot 2021-05-27 100451

windows build 21370 wsl 2

spronovo commented 3 years ago

@sukehiro-San could you take a peek at the following wiki to see where things are failing for you:

https://github.com/microsoft/wslg/wiki/Diagnosing-%22cannot-open-display%22-type-issues-with-WSLg