-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Add Linux FAQ: bash_profile vs bashrc #4157
Comments
@weinand I cannot reproduce. Can you confirm that launching VSCode from the dock is 4 or 11 seconds slower? If not, this would hint that we don't resolve the shell environment and thus no notification is shown. If that is the case, I wonder: are you running from a Snap installation or Deb package? And what distribution? |
|
I cannot understand this, we do have a @joaomoreno need your advice here. Any clues why we would not resolve shell env when started from the dock? Proof of what I see: @weinand can you also try to see if VSCode stable shows the same behaviour of not being blocked for seconds even when you configure `.bashrc' like you do? |
@bpasero the problem is the following: I have ".bash_profile" in my home directory. Probably that got created by some ASP.NET installer (because it contains mono/.net related stuff). It seems that applications started from the dock run "bash" in a way that first tries to load ".bash_profile" and only if that fails loads ".bashrc". If I remove ".bash_profile" the shell run by VS Code uses ".bashrc" and VS Code's "slow shell resolve" errors and warnings work fine. Since ".bash_profile" is an official mechanism, VS Code should probably handle it correctly. Related: Having a "~/.bash_login" might have a similar effect. |
We don't actually choose what to source, but simply follow bash's rules by spawning
In https://www.golinuxcloud.com/bashrc-vs-bash-profile/ It's strange that your |
As I am not the author of |
IMO this is more a doc/FAQ item: if a user has the problem that programs are not found on the PATH when launching from the dock (or in general: from the UI), but everything works fine when running from the command line, then the existence of a ".bash_profile" could be the reason. The nasty thing about this problem is that it does not seem to surface in a lot of other places (other than VS Code). In terminals launched from the dock the ".bash_profile" is ignored and ".bashrc" is loaded correctly. |
To be fair, I don't recall users having such an issue. And this is more a bash documentation rather than VS Code documentation... But yeah let's add it to the docs. |
This comment has been minimized.
This comment has been minimized.
Closing old issue with out community upvotes. |
Testing microsoft/vscode#111422
I've added the sleep 4/11 to the .bashrc and I've verified that newly created Terminals (outside of VS Code) show the 4 or 11 second delay before the shell prompt shows up.
But when launching VS Code from the dock, I neither get a warning nor an error notification.
Opening a new Terminal within VS Code clearly shows the delay.
The text was updated successfully, but these errors were encountered: