Add support for WSL2 Native GUI capability
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
I'd like to see Windows Subsystem for Linux 2 (WSL2) support added so that if/when Systemd becomes possible or hacked in via a PID namespace [1] then GUI snaps can be executed without issue. Currently this works fine for non-GUI applications, but WSL has recently enabled native GUI capability via a sidecar distro running a Wayland+Weston server with PulseAudio.
From an examination of how Microsoft are setting up the WSL2 Native GUI capability, the following are important things to note:
WSL sets the environment variables:
DISPLAY=:0
PULSE_SERVER=
WAYLAND_
XDG_RUNTIME_
WSL exposes the following sockets at: /mnt/wslg/
WSL exposes the .X11-unix tree at: /mnt/wslg/.X11-unix This is by default symlinked to /tmp/.X11-unix causing the snap-confine bind mount attempt to fail.
WSL exposes the following PulseAudio sockets:
/mnt/wslg/
/mnt/wslg/
/mnt/wslg/
/mnt/wslg/
/mnt/wslg/
In addition, WSL2 starts a dbus daemon which creates the following directory with no files within:
/mnt/wslg/
Also, it appears that a dconf daemon is started with the following runtime file:
/mnt/wslg/
[1]: https:/
description: | updated |
description: | updated |
description: | updated |
Changed in snapd: | |
importance: | Undecided → Wishlist |
status: | New → Triaged |
Daniel, thanks for gathering this information and for investigation, this is interesting! I don't know of any immediate plans for supporting this, but this may change in the future of course.
Also, I noticed you later reported a success with https:/ /forum. snapcraft. io/t/gui- snaps-in- wsl2/23880 ; is there anything to update in this bug report with regard to that story?