diff --git a/notebook/terminal/__init__.py b/notebook/terminal/__init__.py index e8c3892ad..37b5a8196 100644 --- a/notebook/terminal/__init__.py +++ b/notebook/terminal/__init__.py @@ -21,6 +21,9 @@ def initialize(webapp, notebook_dir, connection_url, settings): shell = settings.get('shell_command', [os.environ.get('SHELL') or default_shell] ) + # Enable login mode - to automatically source the /etc/profile script + if os.name != 'nt': + shell.append('-l') terminal_manager = webapp.settings['terminal_manager'] = NamedTermManager( shell_command=shell, extra_env={'JUPYTER_SERVER_ROOT': notebook_dir,