microsoft / wslg

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

Cannot open display :0. Installed wsl on W11 and try to start grafical application kstars but say Cannot open display :0 #1296

Open twinkeldonk opened 1 month ago

twinkeldonk commented 1 month ago

Windows Version

Microsoft Windows [Version 10.0.22621.1848]

WSL Version

WSL version: 2.3.24.0

Are you using WSL 1 or WSL 2?

Kernel Version

No response

Distro Version

Linux version 5.15.153.1-microsoft-standard-WSL2 (root@941d701f84f1) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37) microsoft/WSL#1 SMP Fri Mar 29 23:14:13 UTC 2024

Other Software

kstars-bleeding-data/noble,now 6:3.7.3+202410080857~ubuntu24.04.1 all [installed,automatic]

Repro Steps

After setting up WSL I instaalled kstars with the instruction on https://www.indilib.org/forum/general/14409-instructions-to-run-kstars-ekos-indi-under-windows-wsl.html . So mainly with Installation Kstars: WSL command prompt > sudo apt-add-repository ppa:mutlaqja/ppa WSL command prompt > sudo apt-get update WSL command prompt > sudo apt-get install indi-full gsc kstars-bleeding

After that the starticon on my desktopp was pointing to

weston.log.txt

But starting that give no result.

The logs say this cat /mnt/wslg/versions.txt

WSLg ( x86_64 ): 1.0.65+Branch.main.Sha.25d8697d5049e1994baa6ba542f507347b608ad4 Built at: Wed Aug 14 21:11:14 UTC 2024 Mariner: VERSION="2.0.20240609" DirectX-Headers: mesa: pulseaudio: 6f045ff0dca233a939a2aba815f84d177e294122 FreeRDP: c4030980b29322a9cb2190711a5fadeeeb8b6a33 weston: f227edd681479ec3cb2290a25d84d2d3462aebfa

wslg [ /mnt/c/Users/WIL_VREE ]$ ls -la /tmp/.X11-unix total 0 drwxrwxrwx 2 root root 40 Oct 19 23:05 . drwxrwxrwt 1 root root 80 Oct 19 23:05 .. wslg [ /mnt/c/Users/WIL_VREE ]$


wil_vree@BMAX1:~$ ls -la /mnt/wslg/.X11-unix total 0 drwxrwxrwx 2 root root 40 Oct 19 23:05 . drwxrwxrwt 7 root root 300 Oct 19 23:05 .. wil_vree@BMAX1:~$


and attached is the weston log file

Expected Behavior

I expect to see the screen of the kstars app. Just like that happens on my other windows pc with wsl installed.

Actual Behavior

When I click the icon there is only a short pause and the no sign anymore.

When I then go to the wsl prompt and try to start kstars by typing it in, I get the error Cannot open display. But I do noit know if this is supposed to work this way anyhow.

Diagnostic Logs

No response

github-actions[bot] commented 1 month ago

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs Download and execute [collect-wsl-logs.ps1](https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-wsl-logs.ps1) in an **administrative powershell prompt**: ``` Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1 Set-ExecutionPolicy Bypass -Scope Process -Force .\collect-wsl-logs.ps1 ``` The script will output the path of the log file once done. If this is a networking issue, please use [collect-networking-logs.ps1](https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-networking-logs.ps1), following the instructions [here](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues) Once completed please upload the output files to this Github issue. [Click here for more info on logging](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs-recommended-method) If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

twinkeldonk commented 1 month ago

WslLogs-2024-10-19_23-35-27.zip

github-actions[bot] commented 1 month ago
Diagnostic information ``` Detected appx version: 2.3.24.0 ```
clouds56 commented 1 month ago

See https://github.com/microsoft/wslg/issues/1291#issuecomment-2416869718, and this https://github.com/microsoft/wslg/wiki/Diagnosing-%22cannot-open-display%22-type-issues-with-WSLg The wiki doesn't mention wayland, and it's necessary if your gui start slowly.