ubuntu-wsl2-systemd-script
ubuntu-wsl2-systemd-script copied to clipboard
breaks wslg
Running the script works to enable systemd. In both 18.04 and 20.04 , this breaks the environment variables that enable wsl gui apps provided by microsoft.
Intead you get display errors when starting from the terminal:
**graham@GrahamBook:~$** sudo virt-manager
[sudo] password for graham:
**graham@GrahamBook:~$** \
(virt-manager:387): Gtk-WARNING **: 08:41:36.307: cannot open display: :0
When running using the wslg shortcuts, it works:
C:\Windows\System32\wslg.exe ~ -d Ubuntu-18.04 virt-manager
Perhaps the environment variables mentioned here: https://github.com/microsoft/wslg#wslg-system-distro
Need to be be added here:
https://github.com/DamionGans/ubuntu-wsl2-systemd-script/blob/master/ubuntu-wsl2-systemd-script.sh#L61-L66
I can confirm that it does not work with wslg. Tried using it following this approach containing the script and added the error I got there and I think the solution to THE PARENT INIT PROCESS AND SHARED DBUS INSTANCE PROBLEM should finally make this script obsolete for wslg.
There are a few more things you have to do to get WSLg fully operational under systemd. Here's a description of how I solved it for genie:
https://github.com/microsoft/wslg/discussions/144#discussioncomment-685578
Same issue all microsoft apps crashing had to uninstall Kali from app store and reinstall Win 10 Pro 19042.985