-
Notifications
You must be signed in to change notification settings - Fork 292
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
remote-ssh: .profile not sourced for bash shells, only .bashrc? #83
Comments
It's better practice to use .profile. Fish, dash, and other shells would have an easier time being used as the login shell and potentially resolve some issues in using other shells other than bash. |
it looks like |
This caused my pipenv installation to not be recognized by vs code. Renaming .profile to .bash_profile fixed the issue |
I can confirm that |
@Codelica This behavior is expected and documented. http://man7.org/linux/man-pages/man1/bash.1.html
So for a new ssh session (no control master process)
|
@hostmaster what I'm seeing doesn't seem to line up what you've written, or maybe I'm mis-reading. When I bring up a terminal in VS Code locally (on Mac), I see However, when I bring up a VS Code terminal with a Remote SSH connected host, I do not see
Is that different from what you are observing? I guess I would expect them to behave the same, assuming the goal for these remote plugins is to be editing on the remote resource just as if it were a local VS Code session. |
This is exactly how bash supposed to work. It looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order. It is irrelevant to |
Again none of those files are loaded for me when bringing up a terminal in a remote-ssh connected VS Code session. Those files are checked in that order when bringing up a local VS Code terminal, just as a login shell would. Is that not what you are seeing? If the point of the remote plugins like remote-ssh, are to develop on a remote resource as if it were local, I don't see why this behavior should be different, or irrelevant. |
@Codelica please ask your Linux vendor (or in a mailing list or whatever) if you think bash does not work as expected. |
I have the feeling to step in here. Sorry @hostmaster, but your reply
is simply not true. This issue is directly relevant to |
@hostmaster I'm not sure how you got the impression that I feel bash is at fault here. As you'll notice this is a VS Code issue thread I created -- not bash. Twice I've tried to explain that it's inconsistent behavior on the part of VS Code's integrated terminal to provide a different bash experience based on whether you are working locally or with a "remote-ssh" connected host. The whole idea of the remote-ssh plugin (IMO) is to transparently work as though you were working locally on that remote host, so bash should be invoked as such. If you feel this is correct behavior for VS Code, and aren't interested in responding to direct questions, then I can't see how this thread is worth your time. |
Many things have changed in the last few months, if anyone is still having issues, please file a new issue. |
I tested this again and created the files |
What I see for a remote SSH connected host: When VS Code makes it's initial ssh connection to the host, What I see for a local host: Any/all interactive terminals brought up source That difference in terminal behavior between local and remote connections is what I consider a bug in VS Code's remote ssh implementation. |
I can confirm - exactly the same behaviour observed here. |
+1 same here. |
Yes mine is Windows 10 Pro 1903 @roblourens Please reopen this, it's clearly an issue. I can reproduce this with every windows machine, including my colleague's Windows 10 Enterprise and latest version of VSCode and Remote SSH extension. |
This is covered by #1671 (comment), and I see that there is a difference but don't totally understand why it's an issue. |
Hi Rob, According to your comment on #1671 : I just added a Output from the shell running on Remote Ubuntu (/nopath is there)
Output from the vs code terminal running on Local Windows (/nopath is missing)
Is it the expected behaviour? |
I don't know, is it? Both outputs have The second one:
|
You're right. I might have missing any step before. Not a BUG. |
Not sure if this is "as intended" or not, but remote bash terminals (when connected via SSH) only seem to source .bashrc and not .profile (like a typical login shell would). Obviously not the end of the world, but still curious. :) Local dev w/ bash terminal seems to source .profile.
Steps to Reproduce:
Does this issue occur when you try this locally?: No
Does this issue occur when you try this locally and all extensions are disabled?: No
The text was updated successfully, but these errors were encountered: