You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unable to launch Windows applications from WSL #3809
Your Windows build number: Microsoft Windows [Version 10.0.18323.1000]
What you're doing and what's happening: (Copy&paste the full set of specific command-line steps necessary to reproduce the behavior, and their output. Include screen shots if that helps demonstrate the problem.)
skuzzer@skuzlaptop:~$ notepad
What's wrong / what should be happening instead: Notepad should launch, nothing happens instead.
Strace of the failing command, if applicable: notepad.strace
I will say that in at least one instance, I've seen different results in launching Windows EXE files, depending on the starting directory in WSL: whether it is a Windows file system from /mnt/c/... or the WSL linux file system, from ~/... (perhaps related to VoIFS?)
fwiw - cmd.exe does not seem to be affected on my machine:
gojimmypi@MYCOMPUTER: ~
0 $ pwd
/home/gojimmypi
gojimmypi@MYCOMPUTER: ~
0 $ cmd.exe
Microsoft Windows [Version 10.0.17134.648]
(c) 2018 Microsoft Corporation. All rights reserved.
C:\WINDOWS\system32>exit
exit
gojimmypi@MYCOMPUTER: ~
0 $ cd /mnt/c
gojimmypi@MYCOMPUTER: /mnt/c
0 $ cmd.exe
Microsoft Windows [Version 10.0.17134.648]
(c) 2018 Microsoft Corporation. All rights reserved.
C:\>exit
exit
gojimmypi@MYCOMPUTER: /mnt/c
0 $ cd /bin
gojimmypi@MYCOMPUTER: /bin
0 $ cmd.exe
Microsoft Windows [Version 10.0.17134.648]
(c) 2018 Microsoft Corporation. All rights reserved.
C:\WINDOWS\system32>exit
exit
gojimmypi@MYCOMPUTER: /bin
0 $ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic
gojimmypi@MYCOMPUTER: /bin
0 $
I will say that on more than one occasion, I've done a rip-n-replace of WSL Ubuntu, fully removing and installing fresh.
how would one launch it without the warning?
I've been putting 2>/dev/null at the end of my cmd.exe commands, which I think could get me into trouble...
I work-around with pushd /mnt/c ... popd. In many (I'd say most) scenarios >/dev/null won't fly because you lose the actual stdout you want from the command.
The problem is worthy of a standalone new issue / feature request (categorization academic) for someone motivated. [The warning was not the OP submission, which was a failure to launch an interop app period, long addressed some eons back in Feb 2019.] Spewing a warning (however well meaning) is not Linux behavior (or *nix behavior). The warning message is notably incorrect when the command doesn't involve a UNC path to begin with. Whether addressing the problem would be entertained I can't say, but would get my thumbs-up on a well-formed OP from me, anyway. The fix is to have a L:\ drive to go with \\wsl$\ (same G:\ drive for an analogous filesystem product offering). Or in the absence of that, punt with a lame wsl.conf flag "yes we know UNC paths are not supported, don't spew text to the console."
In principle it could be worked-around harder for someone super-motivated enough to do their own binfmt_misc or bash trap, but that's a pretty heavy lift for a spurious warning.
Activity
therealkenc commentedon Jan 29, 2019
I was able to reproduce here on 18323. I guess something went south that roll. Nothing to see in the strace. WSL thinks the
execvesucceeded.On a lark I tried launching
notepad.exewith CWD/mnt/c/Users/kenand it is okay. So there's your variable.Biswa96 commentedon Jan 29, 2019
Something wrong in
/initside. LxCore event log shows:syscall 20 is
writev.If I launch in
~folder,inittranslates into\\wsl$\Ubuntu\root.benhillis commentedon Jan 29, 2019
This is an issue with path translation that will be fixed shortly.
gojimmypi commentedon Feb 20, 2019
fwiw - I am able to launch
notepad.exe(notnotepadwithout the.exe) from WSL, no problem:Microsoft Windows [Version 10.0.17763.253] (older version than 18323 referenced above)
Biswa96 commentedon Mar 18, 2019
Is there any issue in new 20H1 builds? If I type
cmd.exein/binfolder it launches with this message:gojimmypi commentedon Mar 18, 2019
I will say that in at least one instance, I've seen different results in launching Windows EXE files, depending on the starting directory in WSL: whether it is a Windows file system from
/mnt/c/...or the WSL linux file system, from~/...(perhaps related to VoIFS?)fwiw - cmd.exe does not seem to be affected on my machine:
I will say that on more than one occasion, I've done a rip-n-replace of WSL Ubuntu, fully removing and installing fresh.
benhillis commentedon Mar 25, 2019
Biswapriyo Nath (@Biswa96) - This is an expected warning. cmd.exe does not support UNC paths.
skuzzer commentedon May 6, 2019
Just checking, is this expected to still not be working fully in build 18890?
e.g.
notepadworks, butchromedoesn'ttechno-disaster commentedon Nov 9, 2020
Ben Hillis (@benhillis) is there workaround to this?
bessx commentedon May 25, 2021
how would one launch it without the warning?
I've been putting 2>/dev/null at the end of my cmd.exe commands, which I think could get me into trouble...
therealkenc commentedon May 25, 2021
I work-around with
pushd /mnt/c...popd. In many (I'd say most) scenarios>/dev/nullwon't fly because you lose the actualstdoutyou want from the command.The problem is worthy of a standalone new issue / feature request (categorization academic) for someone motivated. [The warning was not the OP submission, which was a failure to launch an interop app period, long addressed some eons back in Feb 2019.] Spewing a warning (however well meaning) is not Linux behavior (or *nix behavior). The warning message is notably incorrect when the command doesn't involve a UNC path to begin with. Whether addressing the problem would be entertained I can't say, but would get my thumbs-up on a well-formed OP from me, anyway. The fix is to have a
L:\drive to go with\\wsl$\(sameG:\drive for an analogous filesystem product offering). Or in the absence of that, punt with a lamewsl.confflag "yes we know UNC paths are not supported, don't spew text to the console."In principle it could be worked-around harder for someone super-motivated enough to do their own
binfmt_miscorbash trap, but that's a pretty heavy lift for a spurious warning.