You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
No output from ls /tmp/.X11-unix when multiple Linux distro are installed #844
I have both Ubuntu 20 and 18 installed on my wsl2. Ubuntu 20 has no problem opening GUI apps, only 18 has problem. For now I am using VcXsrv to open GUIs on Ubuntu 18.
Oleksis Fraga Menéndez (@oleksis), thanks for trying out, WSL 0.70.0 contains the fix for the issue like Jae (@zzehli) mentioned at #844 (comment) where multiple distros are installed, and one distro is working but other is not. But there is still some having missing X11-Unix socket issue after update to 0.70.0 like #853, I will continue to look into such issue, thanks!
changed the title [-]No output from `ls /tmp/.X11-unix`[/-][+]No output from `ls /tmp/.X11-unix` when multiple Linux distro are installed[/+]on Oct 13, 2022
Just update to wsl v1.0.0 from the web options and after few minutes the problem repeat. This time i fix like before. All the steps for Update to WSL v1.0.0
I have the same problem with systemd enabled, All worked until update wsl, I have systemd enabled
PS C:\Users\fernando.ramirez> wsl --version
Versión de WSL: 1.0.0.0
Versión de kernel: 5.15.74.2
Versión de WSLg: 1.0.47
Versión de MSRDC: 1.2.3575
Versión de Direct3D: 1.606.4
Versión DXCore: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Versión de Windows: 10.0.22621.819
:~$ ls -la /tmp/.X11-unix/
total 52
drwxrwxrwt 2 root root 40 Nov 17 03:06 .
drwxrwxrwt 14 root root 49152 Nov 17 03:09 ..
:~$ ls -la /wslg/.X11-unix/
total 0
drwxrwxrwt 2 root root 40 Nov 17 03:06 .
drwxrwxrwt 7 root root 300 Nov 17 03:06 ..
I try editing /etc/tmpfiles.d/wslg.conf with
# 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 - - - - /wslg/.X11-unix
change /mnt/wslg for /wslg , in my system /mnt/wslg exist but is empty ,
Systemd is enable by default. I thinks I have enabled. How verify?
you have to enable it on /etc/wsl.conf
cat /etc/wsl.conf
[boot]
systemd=true
# Automatically mount Windows drive when the distribution is launched
[automount]
# Set to true will automount fixed drives (C:/ or D:/) with DrvFs under the root directory set above. Set to false means drives won't be mounted automatically, but need to be mounted manually or with fstab.
enabled = true
# Sets the directory where fixed drives will be automatically mounted. This example changes the mount location, so your C-drive would be /c, rather than the default /mnt/c.
root = /
( see ajkelsey comment #880 (comment) )
and now :
xeyes -> works
firefox ( from snap ) ->Error: cannot open display: :0
firefox ( from Appimage file ) -> works
C:\>ver
Microsoft Windows [Version 10.0.19045.2311]
C:\>wsl --version
Versión de WSL: 1.0.1.0
Versión de kernel: 5.15.74.2
Versión de WSLg: 1.0.47
Versión de MSRDC: 1.2.3575
Versión de Direct3D: 1.606.4
Versión DXCore: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Versión de Windows: 10.0.19045.2311
C:\>wsl -l -v
NAME STATE VERSION
* Ubuntu Running 2
docker-desktop-data Stopped 2
docker-desktop Stopped 2
Default distro Ububtu
➜ ll /tmp/.X11-unix/
total 4
drwxrwxrwx 2 root root 60 Nov 22 19:30 ./
drwxrwxrwt 15 root root 4096 Nov 22 20:55 ../
srwxrwxrwx 1 oleksis oleksis 0 Nov 22 19:30 X0=
➜ cat /etc/wsl.conf
[boot]
systemd=true
➜ systemctl -t service | grep gdm
gdm.service loaded active running GNOME Display Manager
Note the socket name add the equal sign in the name X0=
I have 3 distributions installed right now (Debian / Ubuntu / openSUSE Tumbleweed).
Both Debian and Ubuntu are working, the openSUSE is the one that breaks after an initial update (works after a fresh install, not after a zypper dup)
For some reason, /tmp won't be populated with the entries listed in usr/lib/tmpfiles.d/x11.conf
Fernando (@imaginabit), would you please check if gdm.service is running on your system by systemctl -t service | grep gdm ? thanks!
systemctl -t service | grep gdm
gdm.service loaded active running GNOME Display Manager
when I stop the service with systemctl stop gdm.service and try to execute firefox ,get again
Error: cannot open display: :0
sudo systemctl disable gdm.service
and
wsl --shutdown
and again get display error but also
:~$ firefox
update.go:85: cannot change mount namespace according to change mount (/var/lib/snapd/hostfs/tmp/.X11-unix /tmp/.X11-unix none bind,ro 0 0): cannot use "/var/lib/snapd/hostfs/tmp/.X11-unix" as bind-mount source: not a directory
update.go:85: cannot change mount namespace according to change mount (/var/lib/snapd/hostfs/usr/share/gimp/2.0/help /usr/share/gimp/2.0/help none bind,ro 0 0): cannot write to "/var/lib/snapd/hostfs/usr/share/gimp/2.0/help" because it would affect the host in"/var/lib/snapd"
update.go:85: cannot change mount namespace according to change mount (/var/lib/snapd/hostfs/usr/share/xubuntu-docs /usr/share/xubuntu-docs none bind,ro 0 0): cannot write to "/var/lib/snapd/hostfs/usr/share/xubuntu-docs" because it would affect the host in"/var/lib/snapd"
Error: cannot open display: :0
remove firefox and install it again with
snap remove firefox
# in other terminal
snap install firefox
and now I get the same Error: cannot open display: :0 again without the other messages
Activity
zzehli commentedon Sep 28, 2022
I have both Ubuntu 20 and 18 installed on my wsl2. Ubuntu 20 has no problem opening GUI apps, only 18 has problem. For now I am using VcXsrv to open GUIs on Ubuntu 18.
oleksis commentedon Sep 29, 2022
I wrote about this issue, having the same behaviour: X server display socket is being deleted
oleksis commentedon Oct 2, 2022
✅ Update the sequence of steps and resolve this issue: Init /tmp/.X11-unix is overwritten by mounts
hideyukn88 commentedon Oct 12, 2022
Please update to WSL 0.70.0 by
wsl --update, and check if this still occurs, we have addressed several X connection issues in this release, thanks!oleksis commentedon Oct 13, 2022
I have updated and the issue continues
➜ ls -la /tmp/.X11-unix/ total 24 drwxrwxrwt 2 root root 40 Oct 13 04:49 . drwxrwxrwt 14 root root 20480 Oct 13 04:49 ..PD: Make this test removing
sudo mv /etc/tmpfiles.d/wslg.conf ~from the previous solution with WSL version 0.68.2.0hideyukn88 commentedon Oct 13, 2022
Oleksis Fraga Menéndez (@oleksis), thanks for trying out, WSL 0.70.0 contains the fix for the issue like Jae (@zzehli) mentioned at #844 (comment) where multiple distros are installed, and one distro is working but other is not. But there is still some having missing X11-Unix socket issue after update to 0.70.0 like #853, I will continue to look into such issue, thanks!
[-]No output from `ls /tmp/.X11-unix`[/-][+]No output from `ls /tmp/.X11-unix` when multiple Linux distro are installed[/+]oleksis commentedon Nov 16, 2022
Just update to
wslv1.0.0 from the web options and after few minutes the problem repeat. This time i fix like before. All the steps for Update to WSL v1.0.0hideyukn88 commentedon Nov 16, 2022
Oleksis Fraga Menéndez (@oleksis), do you have systemd enabled? thanks!
imaginabit commentedon Nov 17, 2022
I have the same problem with systemd enabled, All worked until update wsl, I have systemd enabled
PS C:\Users\fernando.ramirez> wsl --version
Versión de WSL: 1.0.0.0
Versión de kernel: 5.15.74.2
Versión de WSLg: 1.0.47
Versión de MSRDC: 1.2.3575
Versión de Direct3D: 1.606.4
Versión DXCore: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Versión de Windows: 10.0.22621.819
:~$ ls -la /tmp/.X11-unix/
total 52
drwxrwxrwt 2 root root 40 Nov 17 03:06 .
drwxrwxrwt 14 root root 49152 Nov 17 03:09 ..
:~$ ls -la /wslg/.X11-unix/
total 0
drwxrwxrwt 2 root root 40 Nov 17 03:06 .
drwxrwxrwt 7 root root 300 Nov 17 03:06 ..
I try editing /etc/tmpfiles.d/wslg.conf with
change /mnt/wslg for /wslg , in my system /mnt/wslg exist but is empty ,
didn't solve it
oleksis commentedon Nov 17, 2022
Systemd is enable by default. I thinks I have enabled. How verify?
imaginabit commentedon Nov 17, 2022
you have to enable it on /etc/wsl.conf
imaginabit commentedon Nov 17, 2022
Ok now works for me
sudo systemd-tmpfiles --boot --create
sudo ln -sf /mnt/wslg/.X11-unix /tmp/.X11-unix
( see ajkelsey comment #880 (comment) )
and now :
xeyes -> works
firefox ( from snap ) ->Error: cannot open display: :0
firefox ( from Appimage file ) -> works
hideyukn88 commentedon Nov 18, 2022
Fernando (@imaginabit), would you please check if gdm.service is running on your system by
systemctl -t service | grep gdm? thanks!oleksis commentedon Nov 18, 2022
Here my WSL2 configuration
➜ cat /etc/wsl.conf [boot] systemd=true ➜ systemctl -t service | grep gdm gdm.service loaded active running GNOME Display Manageroleksis commentedon Nov 20, 2022
With the gdm service active and the last steps, all keep working. Using Docker 4.14.1 and WSL2
oleksis commentedon Nov 23, 2022
Testing in Windows 10 22H2 (OS Build 19045.2311)
Default distro
Ububtu➜ ll /tmp/.X11-unix/ total 4 drwxrwxrwx 2 root root 60 Nov 22 19:30 ./ drwxrwxrwt 15 root root 4096 Nov 22 20:55 ../ srwxrwxrwx 1 oleksis oleksis 0 Nov 22 19:30 X0= ➜ cat /etc/wsl.conf [boot] systemd=true ➜ systemctl -t service | grep gdm gdm.service loaded active running GNOME Display ManagerNote the socket name add the equal sign in the name
X0=Masamune3210 commentedon Nov 23, 2022
did you mean to do ll instead of ls?
AlphaScorpii-dev commentedon Nov 25, 2022
I have 3 distributions installed right now (Debian / Ubuntu / openSUSE Tumbleweed).
Both Debian and Ubuntu are working, the openSUSE is the one that breaks after an initial update (works after a fresh install, not after a
zypper dup)For some reason, /tmp won't be populated with the entries listed in usr/lib/tmpfiles.d/x11.conf
imaginabit commentedon Nov 28, 2022
when I stop the service with systemctl stop gdm.service and try to execute firefox ,get again
Error: cannot open display: :0
and
and again get display error but also
remove firefox and install it again with
and now I get the same Error: cannot open display: :0 again without the other messages