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 downloading script not used .bash_profile and .bashrc #432

Closed
ice2heart opened this issue May 23, 2019 · 8 comments
Closed

Wsl downloading script not used .bash_profile and .bashrc #432

ice2heart opened this issue May 23, 2019 · 8 comments
Assignees
Labels
wsl Issue in vscode-remote WSL

Comments

@ice2heart
Copy link

  • VSCode Version:
    Version: 1.35.0-insider (user setup)
    Commit: 94f7de61ece171f4390ece488a220d22cbb0fddd
    Date: 2019-05-23T05:19:33.101Z
    Electron: 3.1.8
    Chrome: 66.0.3359.181
    Node.js: 10.2.0
    V8: 6.6.346.32
    OS: Windows_NT x64 10.0.16299
  • Local OS Version: windows 10 enterprise 1709
  • Remote OS Version: debian 10
  • Remote Extension/Connection Type: SSH/Docker/WSL

Steps to Reproduce:

  1. limit internet access
  2. setup proxy server in .bashrc like export http_proxy=127.0.0.1:80
  3. try to run WSL extension

Possible way to solve problem:
Use bash -ci instead of bash -c in file 'wslDaemon.js'

Does this issue occur when you try this locally?: Yes
Does this issue occur when you try this locally and all extensions are disabled?: No

@aeschli aeschli self-assigned this May 23, 2019
@aeschli aeschli added the wsl Issue in vscode-remote WSL label May 23, 2019
@aeschli
Copy link
Contributor

aeschli commented May 23, 2019

The plan is to do the downloading on the client (Window side)

@ice2heart
Copy link
Author

Ok. But use -ci can help other people who use somehow env variable.

@aeschli
Copy link
Contributor

aeschli commented May 23, 2019

We just removed -cias commands in the shell profiles interfered with the way we started the server.

@virgilwashere
Copy link

virgilwashere commented May 23, 2019

We just removed -cias commands in the shell profiles interfered with the way we started the server.

@aeschli, @roblourens would that be #437 ?

Before Remote Development, I was using this to start terminals in WSL, to control nvm/node/ssh-agent environment.

"terminal.integrated.shellArgs.windows": [
    "--rcfile $HOME/.bashrc.d/bashrc-vscode -i",
],

Currently reacting to changes by linking .bashrc to my vscode profile and allowing my terminal program to launch bash -l -i to active .profile and my "normal" .bashrc.

Suggestion

The --rcfile option could allow vscode (server) to have a deterministic location for a .bashrc file somewhere relevant like :

  • ~/.vscode-remote/data/Machine/.bashrc
  • ~/.vscode-remote/data/Machine/vscode.bashrc

@WSLUser
Copy link

WSLUser commented May 24, 2019

I like how nobody thinks about the other shells that get used (FISH and ZSH in particular come to mind). Specifying a specific shell isn't the right way. Going directly to .profile would be better as every shell loads that.

@aeschli
Copy link
Contributor

aeschli commented May 27, 2019

To give more context:

  • the script that checks and updates the VS Code Server is run without any shell startup scripts. That's a fix as there were several issues where instructions in the startup scrips interfered.
  • when starting the server, we use the configured shell ($SHELL -ic)

There are other reported issues reported about download/connectivity issues, so moving the download to the client side (in Windows) is planned anyways

@kybom
Copy link

kybom commented May 27, 2019

Sometimes,vscode has to install ext with https proxy,and is connecting to remote linux on the LAN. If moving the download to the client side,there could be a conflict.Maybe need an option.

@aeschli
Copy link
Contributor

aeschli commented Jun 21, 2019

In the upcoming version we now download the server on the Windows side. That way we avoid problems with missing proxy settings or missing certificates.

Therefore we no longer need to start the server with -i or -il. To be sure to get all environment from the startup scripts, it's now the server that runs a the user shell with -il to probe the environment.

Duplicate of #79
In the meantime you can use the workaround mentioned in #79 (comment)

@aeschli aeschli closed this as completed Jun 21, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
wsl Issue in vscode-remote WSL
Projects
None yet
Development

No branches or pull requests

5 participants