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

Default shell not launched in remote #38

Closed
aaronpowell opened this issue May 3, 2019 · 8 comments · Fixed by microsoft/vscode#73245
Closed

Default shell not launched in remote #38

aaronpowell opened this issue May 3, 2019 · 8 comments · Fixed by microsoft/vscode#73245
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers ssh Issue in vscode-remote SSH verified Verification succeeded wsl Issue in vscode-remote WSL
Milestone

Comments

@aaronpowell
Copy link

If your default shell is not bash it will still launch bash in the terminal. If I open VS Code in Windows and configure the default terminal is WSL it will launch zsh.

  • VSCode Version: 1.34.0-insider
  • Local OS Version: 10.0.18362 N/A Build 18362
  • Remote OS Version: WSL Ubuntu 18 - Linux DESKTOP-GR5DSKM 4.4.0-18362-Microsoft #1-Microsoft Mon Mar 18 12:02:00 PST 2019 x86_64 x86_64 x86_64 GNU/Linux
  • Remote Extension/Connection Type: WSL

Steps to Reproduce:

  1. Launch WSL with a user who uses a shell other than bash as their default shell (eg: zsh)
  2. Launch VS Code
  3. Open VS Code terminal
  4. See that the shell is bash not the default for the user

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

@aaronpowell
Copy link
Author

A cascading problem that happens here is that because my aliases are in my .zshrc file they don't get loaded and things like docker (which I alias to docker.exe in Windows) don't work.

@TomFrost
Copy link

TomFrost commented May 3, 2019

It's worth note that this is not a WSL problem, as it happens on any local system when you connect to a user@server that has a default shell other than bash. My remote machine is configured as @aaronpowell described -- zsh as the default shell with all my aliases and development tooling in my .zshrc. When I ssh into the box from a standard terminal window, I get zsh. When I connect from VSCode, I get bash and have to launch zsh manually.

@kieferrm
Copy link
Member

kieferrm commented May 3, 2019

I filed #44 for ssh.

@kieferrm kieferrm added the wsl Issue in vscode-remote WSL label May 3, 2019
@Tyriar
Copy link
Member

Tyriar commented May 3, 2019

I've looked into this a little bit and for the meantime the workaround is to open your remote settings and set a shell there.

image

{
  "terminal.integrated.shell.linux": "/bin/zsh"
}

@Tyriar Tyriar added containers Issue in vscode-remote containers ssh Issue in vscode-remote SSH labels May 3, 2019
@Tyriar Tyriar self-assigned this May 3, 2019
@Tyriar Tyriar changed the title Default shell not launched by WSL Default shell not launched in remote May 3, 2019
@Tyriar Tyriar added this to the May 2019 milestone May 3, 2019
@Tyriar Tyriar added the bug Issue identified by VS Code Team member as probable bug label May 3, 2019
Tyriar added a commit to microsoft/vscode that referenced this issue May 3, 2019
pull bot pushed a commit to bobby0809/vscode that referenced this issue May 20, 2019
This was caused by the change to make the shell default to null, debug now needs
to evaluate the default shell itself if the setting is null.

Fixes microsoft#73867
Caused by microsoft/vscode-remote-release#38
@rebornix rebornix added the verified Verification succeeded label May 30, 2019
@hologerry
Copy link

hologerry commented Jun 24, 2019

After set:

{
  "terminal.integrated.shell.linux": "/bin/zsh"
}

on remote server, still cannot connect it via macOS VS Code latest stable version.
Screen Shot 2019-06-24 at 22 26 15

But, I can connect the remote server via another Linux (Ubuntu) machine or Insider version without doing this.

@Tyriar
Copy link
Member

Tyriar commented Jun 24, 2019

@hologerry this issue was about getting the default shell to work when terminal.integrated.shell.linux is not set. It looks like you're probably setting it to /bin/zsh which does not exist on the local machine so it fails to set up the connection in a local terminal.

@hologerry
Copy link

@Tyriar Again this issue is caused by

  "terminal.integrated.env.osx": {
  	"PATH": ""
  },

comment out this, the remote connection works ...
The PATH problem needs to be fixed in the next stable version(which is fixed in the insider version).

@hologerry
Copy link

@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers ssh Issue in vscode-remote SSH verified Verification succeeded wsl Issue in vscode-remote WSL
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants