Pengwin
Pengwin copied to clipboard
run-detectors: unable to find an interpreter for /mnt/c/Program Files/Microsoft VS Code/Code.exe
Describe the bug
During using Pengwin Linux a while (few months). I can't open Windows app from Pengwin Linux in WSL now.
To Reproduce Steps to reproduce the behavior:
-
Open WSL 2 (Pengwin Linux)
-
cd ~
-
code .
-
See error
$ code . run-detectors: unable to find an interpreter for /mnt/c/Program Files/Microsoft VS Code/Code.exe
Expected behavior
Download VSCode server and open VSCode with Remote - WSL2 extension in Windows.
Screenshots
Additional context
I can fix this problem by using the following update-binfmts command that I found here.
sudo update-binfmts --disable cli
It takes me a while to find this workaround. I don't know why this problem happening. Is it avoidable?
Basic Troubleshooting Checklist
[x] I have searched Google for the error message. [x] I have checked official WSL troubleshooting documentation: https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#confirm-wsl-is-enabled. [x] I have searched the official Microsoft WSL issues page: https://github.com/Microsoft/WSL/issues. [x] I have searched the Pengwin issues page: https://github.com/WhitewaterFoundry/Pengwin/issues. [x] I have reset Pengwin: Settings->Apps->Apps & features->Pengwin->Advanced Options->Reset. [x] I have disabled and re-enabled WSL in Windows Features. [x] I have run Windows 10 updates and restarted.
What other troubleshooting have you attempted?
Insert here:
Pengwin Version
Find: Settings->Apps->Apps & features->Pengwin->Advanced Options->Version.
Insert here: 20.8.3.0
Windows Build
Run 'systeminfo | findstr /C:"OS"' in Command Prompt and insert here:
OS Name: Microsoft Windows 10 Professional
OS Version: 10.0.19041 N/A Build 19041
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
OS Build Type: Multiprocessor Free
BIOS Version: American Megatrends Inc. 0401, 2018/8/31
For help on retrieving: https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#check-your-build-number
@doggy8088
Try running wsl --shutdown on powershell then starting WSL2 again.
I did this and I think it's what fixed it for me.
Try just this first, but my exact steps were deleting my .vscode-server folder, running wsl --shutdown in powershell, doing a sudo apt-get update && sudo apt-get upgrade, then running code . inside a WSL2 project folder again.
After this it re-installed/set up my vscode-server; I of course then had to reinstall all my extension on WSL side.
Hope this helps, Julio
it is so useful, thank you
It should be caused by the conflict with systemd.
Please check the file /etc/wsl.conf
and see if the systemd = true
flag was added under [boot]
settings as shown below. If so, please switch it to false.
For more info, please refer to https://learn.microsoft.com/en-us/windows/wsl/wsl-config#per-distribution-configuration-options-with-wslconf
Disabling systemd boot worked for me. Not sure what happens, prior of updating WSL2 everything was going smoothly with systemd usage,
Before disabling SystemD give it a try to wsl --shutdown
or even reboot the PC. This error happens because sometimes the Interop get disconnected. This issue is worse with the Store version of WSL.
me too, the problem was with systemd=true
Hello,
I have been doing exhaustive testing and I can corroborate the behavior. The good thing is that is happening with every distro so, Microsoft will fix it soon.
Meanwhile, I'll find a workaround
We made a change in pengwin-base to minimize this impact can you make a test?
pengwin-setup update
Then activate SystemD and terminate Pengwin.
See if now exes can be executed
Regards