microsoft / microsoft/wslg

Trouble getting GUI application to properly connect to WSLg X server

Open
#976 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug GPU
Dominant language
C++
Stars
11.9k
Forks
429
PR merge metrics
No merged PRs in 30d

Description

Windows build number:

Microsoft Windows [Version 10.0.22621.1194]

Your Distribution version:

22.04

Your WSL versions:

WSL version: 1.0.3.0
Kernel version: 5.15.79.1
WSLg version: 1.0.47
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.1194

Steps to reproduce:

Not sure if this issue is specific to my environment or is faced by others, however I have followed steps to completely wipe-out WSL (i.e. uninstall everything) and fresh installation starting from wsl --install

Few other details;
echo $DISPLAY
:0

ls -la /tmp/.X11-unix
No link is shown, it is just the . & .. entries. Attempt the sudo rm -r /tmp/.X11-unix, and recreate the link fails with:
rm: cannot remove '/tmp/.X11-unix': Device or resource busy

ls /tmp/.X11-unix
Results are empty (attached weston.log below)

WSL logs:

pulseaudio.log
weston.log
stderr.log

WSL dumps:

core.Xwayland.zip

Expected behavior:

xeyes & command to display the GUI, and not Error: Can't open display: :0

Actual behavior:

Error: Can't open display: :0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the reported WSLg versions and the attached pulseaudio.log, weston.log, stderr.log, and core.Xwayland.zip files; reproduce with DISPLAY=:0 and inspect /tmp/.X11-unix. Done means identifying the cause of the X server connection failure so that running xeyes displays the GUI instead of returning "Can't open display: :0".

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop-dev, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.