Optional
GUI
Some time ago, you would need to have a complicated, convoluted and unreliable setup for using GUI apps within WSL. Thankfully, we now have WSLg, which transforms this whole ordeal into a non-pain-in-the-butt experience.
If you use the “official” Distribution, i.e. Ubuntu, it should also work out of the box. As we use ArchWSL, we have to setup the correct symlinks though.
-
The environment variables should already be automagically setup to the correct values at this point.
-
Everything we need, should already be in
/mnt/wslg
, namelyruntime-dir
and.X11-unix
-
Create a
systemd
service that setups the Wayland runtime directory -
Create a
systemd
service that setups the X11 socket -
Enable those services
-
Restart WSL