Pengwin icon indicating copy to clipboard operation
Pengwin copied to clipboard

run-detectors: unable to find an interpreter for /mnt/c/Program Files/Microsoft VS Code/Code.exe

Open doggy8088 opened this issue 4 years ago • 8 comments

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:

  1. Open WSL 2 (Pengwin Linux)

  2. cd ~

  3. code .

  4. 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

image

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 avatar Sep 19 '20 03:09 doggy8088

@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

juliosegarra avatar Sep 20 '20 02:09 juliosegarra

it is so useful, thank you

jan6055 avatar Jun 19 '22 15:06 jan6055

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.

Snipaste_2023-01-12_11-45-09

For more info, please refer to https://learn.microsoft.com/en-us/windows/wsl/wsl-config#per-distribution-configuration-options-with-wslconf

j1nxxn1j avatar Jan 12 '23 03:01 j1nxxn1j

Disabling systemd boot worked for me. Not sure what happens, prior of updating WSL2 everything was going smoothly with systemd usage,

p1-ra avatar Mar 27 '23 05:03 p1-ra

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.

crramirez avatar Mar 27 '23 06:03 crramirez

me too, the problem was with systemd=true

japita-se avatar Mar 29 '23 17:03 japita-se

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

crramirez avatar Mar 29 '23 18:03 crramirez

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

crramirez avatar Apr 06 '23 10:04 crramirez