Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to find interpreter for launching .exe files using Interop after enabling systemd #10239

Closed
1 of 2 tasks
fyndor opened this issue Jun 26, 2023 · 3 comments
Closed
1 of 2 tasks

Comments

@fyndor
Copy link

fyndor commented Jun 26, 2023

Windows Version

Microsoft Windows [Version 10.0.22621.1848]

WSL Version

1.2.5.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.90.1

Distro Version

Ubuntu-22.04

Other Software

Visual Studio Code, version 1.79.2

Repro Steps

Add the following lines to /etc/wsl.conf:

[boot]
systemd=true

Shutdown WSL using the following command:
wsl --shutdown

Restart WSL and now Windows exes like VSCode will no longer start with the error:

run-detectors: unable to find an interpreter for /mnt/c/Users/MyUserName/AppData/Local/Programs/Microsoft VS Code/Code.exe

To fix this, I found on the internet that I could create a file /usr/lib/binfmt.d/WSLInterop.conf and set it's contents to the following:

:WSLInterop:M::MZ::/init:PF

Once I create that file containing the above text, and rebooted WSL, Windows exe would start as expected when running inside WSL

Expected Behavior

I expect that when I enable systemd support in WSL, I should be able to continue to run Windows exes inside WSL, just as they had worked before enabling systemd

Actual Behavior

By enabling systemd support in WSL, I no longer was able to run Windows exes

Diagnostic Logs

No response

@oldium
Copy link

oldium commented Jun 27, 2023

This looks like a a dup of #8843

@OneBlue
Copy link
Collaborator

OneBlue commented Jun 27, 2023

/dupe 8843

Copy link
Contributor

This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants