Package Dependencies & WSLg

You don't need a second copy of PulseAudio or XWayland

As I've been testing my way through various (apt, since I'm on Debian, but I suspect the general principles apply elsewhere) packaged applications under WSLg, I have noticed that some of them include dependencies on the pulseaudio and/or xwayland packages, containing the PulseAudio server or the XWayland X server, respectively.

Obviously, these dependencies don't serve any purpose when you're using WSLg; since the PulseAudio and XWayland servers are provided by the system distro, installing them in your user distro as well is at best just a waste of disk space, and at worst installs things - such as configuration files, systemd services, and so forth - that may actually interfere with WSLg's proper functioning.

Fortunately, there's an easy cure:

Fire up equivsas this tutorial describes, and make some dummy packages which provide pulseaudio and xwayland respectively. By installing these, the dependencies will be satisfied, and you can use the applications which demand these dependencies without having to install your own useless copy of the services when you already have a perfectly working one being supplied to you by WSLg.

Source, such as it is, for my version of the dummy packages is here -- and, of course, if you just want things to work, you can install pulseaudio-dummy and xwayland-dummy straight from my WSL-Transdebian repo.