Open mirogl opened 2 years ago
There's a systemd service called systemd-tmpfiles-setup.service that removes the /tmp/.X11-unix link to /mnt/wslg/.X11-unix.
Is totally related with this script, i created a clean ubuntu install with WSL, then tested xclock (x11-apps) to test GUI Apps until this everything OK. After install this script for snapd availability, the GUI apps throws the Error: Can't open display: :0
Is totally related with this script, i created a clean ubuntu install with WSL, then tested xclock (x11-apps) to test GUI Apps until this everything OK. After install this script for snapd availability, the GUI apps throws the Error: Can't open display: :0
Hi, like written by aki-k this is a cleanupscript by systemd - so you can modify them or try the following, which works for me:
can you please try to add the following line at the end of your $HOME/.profile ln -s /mnt/wslg/.X11-unix /tmp/.X11-unix
than shutdown wsl with wsl.exe --shutdown
Does it work after starting WSL again ?
Thanks Miro
Is totally related with this script, i created a clean ubuntu install with WSL, then tested xclock (x11-apps) to test GUI Apps until this everything OK. After install this script for snapd availability, the GUI apps throws the Error: Can't open display: :0
Hi, like written by aki-k this is a cleanupscript by systemd - so you can modify them or try the following, which works for me:
can you please try to add the following line at the end of your $HOME/.profile ln -s /mnt/wslg/.X11-unix /tmp/.X11-unix
than shutdown wsl with wsl.exe --shutdown
Does it work after starting WSL again ?
Thanks Miro
OK,works
Is totally related with this script, i created a clean ubuntu install with WSL, then tested xclock (x11-apps) to test GUI Apps until this everything OK. After install this script for snapd availability, the GUI apps throws the Error: Can't open display: :0
Hi, like written by aki-k this is a cleanupscript by systemd - so you can modify them or try the following, which works for me:
can you please try to add the following line at the end of your $HOME/.profile ln -s /mnt/wslg/.X11-unix /tmp/.X11-unix
than shutdown wsl with wsl.exe --shutdown
Does it work after starting WSL again ?
Thanks Miro
Is this possible without x11?
Is totally related with this script, i created a clean ubuntu install with WSL, then tested xclock (x11-apps) to test GUI Apps until this everything OK. After install this script for snapd availability, the GUI apps throws the Error: Can't open display: :0
Hi, like written by aki-k this is a cleanupscript by systemd - so you can modify them or try the following, which works for me:
can you please try to add the following line at the end of your $HOME/.profile ln -s /mnt/wslg/.X11-unix /tmp/.X11-unix
than shutdown wsl with wsl.exe --shutdown
Does it work after starting WSL again ?
Thanks Miro
You also need to comment out this line in /usr/lib/tmpfiles.d/x11.conf :
Otherwise the wrong link will be recreated upon restart with root permissions and you won't be able to create your link
Hi, I had the same problem like described in https://github.com/microsoft/wslg/issues/238
xclock Error: Can't open display: :0
and the only solution for me was https://github.com/microsoft/wslg/issues/238#issuecomment-847804992
export DISPLAY=:0 sudo rm -rf /tmp/.X11-unix ln -s /mnt/wslg/.X11-unix /tmp/.X11-unix
Then it works. Is this really related to your script ?
thanks for your feedback.
Miro