yuk7 / ArchWSL

ArchLinux based WSL Distribution. Supports multiple install.
https://git.io/archwsl
MIT License
6.91k stars 201 forks source link

can't start wslg #355

Open yuzhegan opened 8 months ago

yuzhegan commented 8 months ago

IMPORTANT Please read README and Docs before creating the issue.

Please fill out the below information: Describe the issue A clear and concise description of what the bug is. can't start wslg
To Reproduce Steps to reproduce the behavior: i had add set -Ux DISPLAY (cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0 to config.fish Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem. 1710405091948.png 1710405271752.png Enviroment:

Additional context Add any other context about the problem here.

wallacewinfrey commented 8 months ago

The fix mentioned here resolves for both Windows-native X11 servers and wslg

dinesh-58 commented 8 months ago

maybe try export DISPLAY=:0 and using the workaround suggested in #342. That worked for me

Qiyue0726 commented 4 months ago

Maybe WSLG needs to install the Wayland package

drannex42 commented 2 months ago

This is what fixes it for me: https://github.com/microsoft/WSL/issues/6999

@/Nahor In the interest of saving others from this unfortunate bad default behaviour who find this GH issue, an easy manual fix is to create /etc/tmpfiles.d/wslg.conf as root with the following contents:

#  This file is part of the debianisation of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.

# See tmpfiles.d(5) for details

# Type Path           Mode UID  GID  Age Argument
L+     /tmp/.X11-unix -    -    -    -   /mnt/wslg/.X11-unix

and then wsl --shutdown and start it again to see the effect.

This results in the symlink being created, and it happens after tmpfs is mounted by systemd.