-
Notifications
You must be signed in to change notification settings - Fork 822
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
Can't open Windows app from WSL 2 anymore #4567
Comments
I've noticed that |
|
I encountered this error previously, although I didn't move my WSL2 to another drive. Have you tried runing |
Yes, without any lucks :( |
What is the contents of your $PATH environment variable? Can you share the output of
|
Also my $PATH:
|
@chickyd3v - your path does not contain the Windows paths. Likely /etc/profile is overriding it. |
|
This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment. Thank you for your contributions to WSL! |
I am facing the same issue on my WSL2 instance. it was working before, suddenly it stopped working with this error. i am trying to launch VS Code. |
After doing "wsl --shutdown" and starting WSL again - it started working. |
Please re-open. I am having the same problem and doing |
@sharpninja What does it show when you enter this in terminal? echo $PATH |
Im also having the same problem. |
I have the a similar problem: wsl --shutdown does not fix it. Tested windows executables are in my path (code.exe, notepad.exe) ~$ code Maybe the contents of /proc/sys/fs/binfmt_misc/WSLInterop are relevant: ~$ cat /proc/sys/fs/binfmt_misc/WSLInterop /tools/init does not exist |
Here's my /proc/self/mountinfo: ~$ cat /proc/self/mountinfo |
Also having the same issue, and no /tools/init. |
having the same problem here... |
:~$ file /bin/cp |
Following an older installation steps inadvertently i had added |
I had also installed some additional packages... |
I also ran into this problem (e.g. error message "run-detectors: unable to find an interpreter for /mnt/c/Windows/explorer.exe"). It turned out that my problem was that I installed nuget package manager in the wsl2-container, and nuget required mono-runtime, which registered another entry (named cli) with /proc/sys/fs/binfmt_misc . I was able to confirm this by disabling the cli interpreter using the command: After that nuget did not work from within the wsl2 container, but I was able to start explorer.exe |
This worked for me!! |
That's worst case scenario. Doing cross platform dotnet is my primary WSL use case.
|
Hello! I had a similar issue. After a bit of searching I checked [interop]
appendWindowsPath = false Setting it to true and then forcing a restart of wsl ( I can't figure what changed this though. |
This happened to me after I had
and
and some other simple operation using |
This happened to me after i exported my wsl2 instance from drive C to an external SSD. |
It should be caused by the conflict with systemd.Please check the file For more info, please refer to https://learn.microsoft.com/en-us/windows/wsl/wsl-config#per-distribution-configuration-options-with-wslconf |
This worked for me too |
That worked for me, but every time I restart my WSL I need to run this command again |
That's fine, I just set this property and I can set it back to false. But what if I want to actually enable |
…mono-runtime is installed and systemd is enabled. Trying to run "explorer.exe" from a WSL/Ubuntu command prompt, for example, would result in the following error: run-detectors: unable to find an interpreter for /mnt/c/Windows/explorer.exe The fix was taken from microsoft/WSL#4567 (comment). (I confirmed that the mono-runtime package added the cli entry that caused the problem by running "update-binfmts --display".) I'd tried the following but they didn't work for me: microsoft/WSL#8843 (comment) (Create /usr/lib/binfmt.d/WSLInterop.conf.) microsoft/WSL#8843 (comment) (sudo systemctl mask systemd-binfmt.service)
Your Windows build number: [Version 10.0.18990.1]
What you're doing and what's happening:
Not sure when but I think after I moved WSL 2 to another drive using LxRunOffline, I couldn't open any Windows app from WSL bash anymore. This error would appears everytime I tried to open .exe app:
EXE apps should runs flawlessly.
The text was updated successfully, but these errors were encountered: