From 7ca96e5c6cb0f61f6c8f95aa1315741aa7f425e1 Mon Sep 17 00:00:00 2001 From: James Davidheiser Date: Thu, 19 Mar 2015 17:50:53 -0700 Subject: [PATCH 1/2] spawner.py update for default shell Update spawner.py to do a better job keeping the shell variable intact for terminals launched from within the notebook. --- jupyterhub/spawner.py | 1 + 1 file changed, 1 insertion(+) diff --git a/jupyterhub/spawner.py b/jupyterhub/spawner.py index 4b20f578..498a0846 100644 --- a/jupyterhub/spawner.py +++ b/jupyterhub/spawner.py @@ -81,6 +81,7 @@ class Spawner(LoggingConfigurable): 'VIRTUAL_ENV', 'LANG', 'LC_ALL', + 'SHELL' ], config=True, help="Whitelist of environment variables for the subprocess to inherit" ) From 7701b82f58612a697f5b2dcbdaa93a7439c38ef6 Mon Sep 17 00:00:00 2001 From: James Davidheiser Date: Mon, 23 Mar 2015 17:20:37 -0700 Subject: [PATCH 2/2] replace using server shell with user shell Per discussion on PR, replaced the heavy-handed setting of the shell environment variable through the server environment variables. --- jupyterhub/spawner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jupyterhub/spawner.py b/jupyterhub/spawner.py index 498a0846..46822e17 100644 --- a/jupyterhub/spawner.py +++ b/jupyterhub/spawner.py @@ -81,7 +81,6 @@ class Spawner(LoggingConfigurable): 'VIRTUAL_ENV', 'LANG', 'LC_ALL', - 'SHELL' ], config=True, help="Whitelist of environment variables for the subprocess to inherit" ) @@ -331,6 +330,7 @@ class LocalProcessSpawner(Spawner): def user_env(self, env): env['USER'] = self.user.name env['HOME'] = pwd.getpwnam(self.user.name).pw_dir + env['SHELL'] = pwd.getpwnam(self.user.name).pw_shell return env def _env_default(self):