Steps to Reproduce:
code-insiders .
Does this issue occur when you try this locally?: Yes
Does this issue occur when you try this locally and all extensions are disabled?: Yes
Do you use tmux in WSL?
No. I'm using bash+zsh

Can you try to run the server script manually in the wsl shell?
Should be something like (Replace 'YourUserName' with your Windows user name)
bash -x /mnt/c/Users/YourUserName/.vscode-insiders/extensions/ms-vscode-remote.remote-wsl-0.31.0/
scripts/wslServer.sh 473af338e1bd9ad4d9853933da1cd9d5d9e07dc9 insider .vscode-remote
I see.
So I realized that I mapped the path in WSL to neglect /mnt/ which causes it not to find the path...
Is there a way to translate this? (this was done because I was trying to sync paths in WSL with windows for docker a long time ago) I guess I wouldn't need to deal with this anymore?
So I tried removing the /mnt/ and it still doesn't work. It seems like as mentioned in #77 it's a zsh issue.
Commenting out the initialization of zsh from bashrc will work. Not otherwise.
Can you try this version?
remote-wsl-0.32.1.vsix (GitHub limitation on files to attach)Install from VSIX...This fixes:
-i, so unexpected commands (such as cd, zsh) in .bash_profile no longer interfere.-i)See https://medium.com/@vinhp/set-and-use-zsh-as-default-shell-in-wsl-on-windows-10-the-right-way-4f30ed9592dc on how to configure the shell in wsl
Please let me know if that solves the issues.
@aeschli I just tried the install steps you outlined for version 0.32.1 but I received this error
Installing extensions...
(node:19772) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Corrupt ZIP: end of central directory record signature not found
Failed Installing Extensions: c:\Users\username\.vscode-insiders\extensions\remote-wsl-0.32.1.vsix
@aeschli not sure what happened (maybe a new update was pushed recently) but 0.32.1 installed on my machine. thanks!
Entertainingly simple fix for me, I couldn't access WSL in a regular terminal either so I rebooted and all is well 馃槑
I was able to get 0.32.1 to work by changing the shebang line to #!/usr/bin/env zsh and manually removing the -i in the wslServer.sh command. Today there was an update to 0.33.0 and it overwrote my changes and also keeps the -i in the command
Now I can't find that same line in the wslServer.sh file and I'm not sure where the command is being executed.
@alexmspina I used search to find and remove the -i from wslDaemon.js.
I only needed to remove the first highlighted -i and it seems to work without changing the shebang to zsh.
@aeschli Manually disabling auto update and install 0.32.1 does fix the issue (running on the latest code insider as well)
@timolinn thanks for finding that. It's running with my zsh environment again.
Yes, the fix that's in 0.32.1 has still to be pushed and published in a real version. Working in it!
You need to use this on your .bashrc file:
# Switch to ZSH shell
if test -t 1; then
exec zsh
fi
Instead of:
exec zsh
If you use the second one the vscode remote server couldn't start...
If you want to change your default shell you should use chsh, not run the other shell in your .bashrc.
Yes! this is the right way... but the error was because it's configured as the other way.
Would be great if some sites like 馃憞 were updated... to avoid this kind of error, because they appear at the top of the search "how to install oh-my-zsh on WSL"
https://www.howtogeek.com/258518/how-to-use-zsh-or-another-shell-in-windows-10/
https://evdokimovm.github.io/windows/zsh/shell/syntax/highlighting/ohmyzsh/hyper/terminal/2017/02/24/how-to-install-zsh-and-oh-my-zsh-on-windows-10.html
You need to use this on your
.bashrcfile:if test -t 1; then exec zsh fiInstead of:
exec zshIf you use the second one the vscode remote server couldn't start...
I was having this exact same issue, only i use fish shell rather than zsh. The above snippet worked perfectly for me just by replacing zsh for fish.
so, changing:
to
if test -t 1; then
fish
fi
was the solution for me.
@proteus-aholt you should change you default shell as in https://github.com/microsoft/vscode-remote-release/issues/27#issuecomment-499082064:
chsh -s <path to fish>
Most helpful comment
You need to use this on your
.bashrcfile:# Switch to ZSH shell if test -t 1; then exec zsh fiInstead of:
exec zshIf you use the second one the vscode remote server couldn't start...