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

WSL Bash not showing #27

Open
stefanstranger opened this issue Aug 1, 2018 · 7 comments
Open

WSL Bash not showing #27

stefanstranger opened this issue Aug 1, 2018 · 7 comments

Comments

@stefanstranger
Copy link

I configured the settings for the shell launcher as follows:

"shellLauncher.shells.windows": [
        {
            "shell": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
            "label": "PowerShell"
        },
        {
            "shell": "C:\\Program Files\\PowerShell\\6.0.0-beta.8\\powershell.exe",
            "label": "PowerShell Core"
        },
        {
            "shell": "C:\\Windows\\System32\\cmd.exe",
            "label": "cmd"
        },
        {
            "shell": "C:\\Windows\\System32\\bash.exe",
            "label": "WSL Bash"
        }
    ]

When launching the Shell Launcher task it only shows the PowerShell, PowerShell Core and cmd shells.

Why does the WSL Bash option does not show up?

/Stefan

@Tyriar
Copy link
Owner

Tyriar commented Aug 3, 2018

My guess is that this access check is failing:

fs.accessSync(s.shell, fs.constants.R_OK | fs.constants.X_OK);

Maybe wsl.exe will work? This might depend on the version of Windows 10 you're running as I believe in older versions bash.exe was some special executable that I couldn't find on disk.

@stefanstranger
Copy link
Author

stefanstranger commented Aug 8, 2018

I tried wsl, but that failed too.

Output while debugging.

wslerror

Stefan

@Tyriar
Copy link
Owner

Tyriar commented Aug 15, 2018

@stefanstranger what version of Windows 10 are you on?

@Heer-Boaz
Copy link

@Tyriar: I had the same issue as stefanstranger.
I was able to solve it by changing the search-path from "C:\\Windows\\system32\\wsl.exe" to "C:\\Windows\\Sysnative\\wsl.exe".
Note that it points to wsl.exe, but the same problem/solution is valid for bash.exe.

Note that I now run VSCode with the User installation.

My W10 (x64) Version: 10.0.16299 Build 16299

@Tyriar
Copy link
Owner

Tyriar commented Aug 21, 2018

@Heer-Boaz you're probably using the 32-bit version of VS Code on your 64-bit machine if sysnative works, you should switch to the 64-bit version. Merging this into #28

@Tyriar
Copy link
Owner

Tyriar commented Aug 21, 2018

Actually I think @stefanstranger probably is seeing a different issue since cmd worked.

@jabalv
Copy link
Contributor

jabalv commented Nov 9, 2019

Actually I think @stefanstranger probably is seeing a different issue since cmd worked.

Because 32bit vscode is using System32 cmd or SysWOW64 folder( contains 32bit dlls) on 64bit OS. I assume WSL bash is only 64bit application, so it's not there. If "Sysnative" virtual folder will be specified in path then redirection to real System32 folder of 64bit dlls will happen.

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

No branches or pull requests

4 participants