[Fixed]WSLg Gtk-Warning: cannot open display: :0 Windows 11

Опубликовано: 04 Октябрь 2024
на канале: Techy Cricketer
7,686
40

#WSL
Chapters
00:15 - WSLg Gtk-Warning: cannot open display: :0 "The problem"
01:05 - WSL --update "To update the WSL supported WSLg features"
01:30 - Optional features required for WSLg to work
02:14 - wsl --install -d Ubuntu-18.04 to install new WSL instance as older may not support WSLg
03:11 - x-11-apps to test WSLg with xeyes apps in ubuntu
03:57 - cannot open display problem resolved

Old Method for x server in wsl
export DISPLAY=$(grep nameserver /etc/resolv.conf | awk '{print $2}'):0.0
export DISPLAY=$(route.exe print | grep 0.0.0.0 | head -1 | awk '{print $4}'):0.0

Error this will resolve
cannot open display wsl
Error: Can't open display: 0 xeyes
xeyes not opening in wsl windows 11
WSL2 can't open display
how to open GUI in WSL?
Why WSLg not working?
xhost unable to open display in windows 11
gtk-warning cannot open display in windows WSLg
xeyes can't open display in windows 11 latest update
error: can't open display: :0
error can t open display ubuntu
Trying to run WSLg apps and get "Cannot Open Display"
how to launch any graphical application on linux or X11