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

Improve login shell heuristics #5588

merged 2 commits into from
Jul 7, 2020


Copy link

@dlukes dlukes commented Jul 6, 2020

A follow-up on #5565, with better heuristics and respecting overrides via NotebookApp.terminado_settings. Cf. #5565 (comment) for details.

I'm wondering whether to also update the documentation for NotebookApp.terminado_settings, so that it makes it clearer what the shell defaults are and how they can be overridden. Something like:

Supply overrides for terminado. Currently only supports "shell_command". On Unix systems, a non-login shell is run by default when the notebook server is launched from a terminal, a login shell otherwise.

But AFAICS, this would also require updating translations, so I'm not sure it's worth the trouble.

Co-authored-by: Kevin Bates <>
Copy link

I think updating the help text would be helpful. I don't think we can worry about translations. The nature of those is that they'll need to be revisited from time to time to reflect updates and we can't let that jeopardize doing the right thing.

The source changes look good and behave as expected, btw.

Thanks David!

Copy link
Contributor Author

dlukes commented Jul 7, 2020

Good point, agreed :) I updated the help text, feel free to suggest edits, or even perform them directly if you have the bandwidth.

Thanks for the quick response!

Copy link

@minrk minrk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you!

I think this hits the right balance of:

  • not login shell by dfault in most cases
  • login shell in an easy-to-grasp circumstance that covers common cases (i.e. not a tty)
  • easy to override by setting terminado_settings['shell_command'] = ['shell', '-l'] in config, bypassing the guess above in the circumstances where the guess is wrong (or just don't want to trust it).

Copy link

@kevin-bates kevin-bates left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great - thank you David!

@kevin-bates kevin-bates merged commit 0df10de into jupyter:master Jul 7, 2020
@kevin-bates kevin-bates mentioned this pull request Jul 7, 2020
24 tasks
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants