WSL: Can't open windows programs in WSL2 that is not under the /mnt/c directory
Version
Microsoft Windows [Version 10.0.19042.1348]
WSL Version
- WSL 2
- WSL 1
Kernel Version
5.10.16
Distro Version
Ubuntu-20.04
Other Software
Any Windows software that you can launch with WSL2
Aka the commands like code
Repro Steps
- Leave PC on for a very long time (Around a few hours)
- Then try to run
code - Program does not launch open and you have to
Ctrl Cout of it.
Expected Behavior
Program should launch open, even when leaving my computer on for a very long time.
Actual Behavior
When running a command like code, it will show no message nor the windows program will appear.
Diagnostic Logs
No response
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 7
- Comments: 15 (1 by maintainers)
frhun told me to check to see if mono is installed on ubuntu. They told me that mono installs a binary handler.
I was told to do
apt list --installed | grep monoto see if mono was installed. This is the output I then got:After that I was then told to run this command
sudo apt remove ubuntu-monoNow I can run windows programs again on wsl2 anywhere. I’m not sure if this will work for other people.
Adding what I’ve found:
wsl --shutdownorwsl --terminatedoes not helpwsl --unregisterdoes not help/mnt/c) and non-working (/home/) showed nothing but an exec and then output stopsNow some good news however, I’ve narrowed it down to
Windows Subsystem for Linux Previewfrom the Microsoft Store. If you go into apps, uninstall it and reboot then launching apps from non-Windows dirs will stay working. I’m at 12+ hours of exe’s launching.