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

Documentation on how to set /tree as the default instead of /lab #105

Closed
costrouc opened this issue Mar 2, 2022 · 5 comments · Fixed by #107
Closed

Documentation on how to set /tree as the default instead of /lab #105

costrouc opened this issue Mar 2, 2022 · 5 comments · Fixed by #107
Assignees

Comments

@costrouc
Copy link
Member

costrouc commented Mar 2, 2022

Servers are launched to /lab and not /tree

@costrouc
Copy link
Member Author

costrouc commented Mar 2, 2022

@costrouc costrouc changed the title Documentation on how to set /tree as the default instead of /tree Documentation on how to set /tree as the default instead of /lab Mar 2, 2022
@Adam-D-Lewis
Copy link
Member

Adam-D-Lewis commented Mar 9, 2022

I tried setting the following in all.yaml in group_vars, but that didn't work.

jupyterhub_custom:
  Spawner:
    environment:
      JUPYTERHUB_SINGLEUSER_APP: notebook.notebookapp.NotebookApp

I confirmed it's setting the environment variables by checking the following in a terminal within the singleuser jupyterlab:

example-user@hpc02-test:~$ echo $JUPYTERHUB_SINGLEUSER_APP
notebook.notebookapp.NotebookApp

Documentation suggesting it might work
https://jupyterhub.readthedocs.io/en/stable/api/spawner.html?highlight=c.Spawner.env_keep#jupyterhub.spawner.Spawner.environment

I'll continue looking into this. I think I should be able to just set the JUPYTERHUB_SINGLEUSER_APP environment variable on the jupyterhub instance since it's already included in c.Spawner.env_keep variable

@Adam-D-Lewis
Copy link
Member

Adam-D-Lewis commented Mar 9, 2022

Also tried setting the following directly in jupyterhub_config.py, but doesn't work.

# set classic notebook as default
os.environ['JUPYTERHUB_SINGLEUSER_APP']='notebook.notebookapp.NotebookApp'
example-user@hpc02-test:~$ echo $JUPYTERHUB_SINGLEUSER_APP
notebook.notebookapp.NotebookApp

@Adam-D-Lewis
Copy link
Member

Changing c.QHubHPCSpawner.default_url = '/lab' to c.QHubHPCSpawner.default_url = '/tree' and setting

# set classic notebook as default
os.environ['JUPYTERHUB_SINGLEUSER_APP']='notebook.notebookapp.NotebookApp'

in jupyterhub_config.py seems to work. Not sure if both are necessary or just one.

@Adam-D-Lewis
Copy link
Member

Adam-D-Lewis commented Mar 9, 2022

Setting the following in group_vars/all.yaml works

jupyterhub_custom:
  QHubHPCSpawner:
    default_url: '/tree'
  Spawner:
    environment:
      JUPYTERHUB_SINGLEUSER_APP: notebook.notebookapp.NotebookApp

while

jupyterhub_custom:
  QHubHPCSpawner:
    default_url: '/tree'

alone did not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants