Skip to content

Remote WSL: Not working when not using bash/compatible default shell #77242

Closed

Description

@max06

Good evening,

I just tried to setup the remote development extension but it failed because I'm using fish as my default shell in WSL (Ubuntu 18.04/WSL1).

Error:

[2019-07-11 08:24:12.789] Starting VS Code Server inside WSL (Ubuntu-18.04)
[2019-07-11 08:24:12.789] Extension version: 0.38.9, Windows build: 18362. Multi distro support: enabled. WSL path support: enabled
[2019-07-11 08:24:13.093] Probing if server is already installed: C:\WINDOWS\System32\wsl.exe -d Ubuntu-18.04 bash -c "[ -d ~/.vscode-server/bin/2213894ea0415ee8c85c5eea0d0ff81ecc191529 ] && echo found || echo missing"
[2019-07-11 08:24:13.847] Server install found in WSL
[2019-07-11 08:24:13.847] Launching C:\WINDOWS\System32\wsl.exe -d Ubuntu-18.04 bash -c "'$(wslpath -u 'c:/Users/max06/.vscode/extensions/ms-vscode-remote.remote-wsl-0.38.9/scripts/wslServer.sh')' '2213894ea0415ee8c85c5eea0d0ff81ecc191529' 'stable' '.vscode-server' '' 0  " in c:\Users\max06\.vscode\extensions\ms-vscode-remote.remote-wsl-0.38.9
[2019-07-11 08:24:14.623] fish: $(...) is not supported. In fish, please use '(wslpath)'.
[2019-07-11 08:24:14.623] bash -c "'$(wslpath -u 'c:/Users/max06/.vscode/extensions/ms-vscode-remote.remote-wsl-0.38.9/scripts/wslServer.sh')' '2213894ea0415ee8c85c5eea0d0ff81ecc191529' 'stable' '.vscode-server' '' 0  "
[2019-07-11 08:24:14.623]           ^
[2019-07-11 08:24:14.623] VS Code Server for WSL closed unexpectedly.
[2019-07-11 08:24:14.623] For help with startup problems, go to
[2019-07-11 08:24:14.623] https://code.visualstudio.com/docs/remote/troubleshooting#_wsl-tips

wsl.exe $command launches the users default shell (fish) and executes the command in there. But fish doesn't understand your syntax. I was told in microsoft/WSL#4296 wsl.exe -e bash -c "$command" would skip that step and call the binary directly. If I'm not completely mistaken, this would fix my issue.

  • VSCode Version: 1.36.0
  • OS Version: 18362.239

Steps to Reproduce:

  1. Install Ubuntu 18.04 (wsl1).
  2. run sudo apt-get install fish
  3. Set default shell: chsh -s /usr/bin/fish
  4. Install the remote development extension and follow its instructions

Does this issue occur when all extensions are disabled?: Not testable.

Thank you!

Activity

  1. added
    extensions
    on Jul 11, 2019
  2. max06 commented on Jul 12, 2019

    @max06
    ContributorAuthor

    Martin Aeschlimann (@aeschli) - Thanks for closing this. Can I assume this got fixed somewhere else?

  3. aeschli commented on Jul 12, 2019

    @aeschli
    Contributor

    Yes, new version of WSL Remote is on the way.

  4. locked and limited conversation to collaborators on Aug 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

extensions

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions