after installing wsl-setup WSLG GUI apps stopped working
Bug #1987970 reported by
Fiz
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
wsl-setup (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Installed this in a fresh instance of Windows 11 WSL2, systemd is working, but the GUI apps are not working and produces "Error: Can't open display: :0"
Here is the versions
C:\WINDOWS\
WSL version: 0.66.2.0
Kernel version: 5.15.57.1
WSLg version: 1.0.42
MSRDC version: 1.2.3401
Direct3D version: 1.606.4
DXCore version: 10.0.25131.
Windows version: 10.0.22000.708
summary: |
- after installing this, WSLG stopped working + after installing wsl-setup WSLG GUI apps stopped working |
To post a comment you must log in.
That bug is most likely unrelated to Ubuntu or wsl-setup itself. Current version of WSL/WSLg creates incremental named symlinks to the X11 socket inside `/tmp/.X11-unix/` (X0, X1, X2...) as one launches different distros, thus the DISPLAY environment variable (always set to `:0`) doesn't match the socket. See the following issue in MS repo: https:/ /github. com/microsoft/ wslg/issues/ 818 .
You can confirm that by running `ls -l /tmp/.X11-unix/` across different distros.
One workaround would be setting the DISPLAY environment variable according to the socket name found. See https:/ /github. com/microsoft/ wslg/issues/ 818#issuecommen t-1227756256
# set X server display
export DISPLAY=:$(ls /tmp/.X11-unix/ | cut -d "X" -f2)
I'd appreciate you confirming the case so I can properly close this bug report.