Files
the-littlest-jupyterhub/docs/howto/user-env/notebook-interfaces.md

57 lines
1.9 KiB
Markdown
Raw Normal View History

2023-05-22 20:33:07 -04:00
(howto/user-env/notebook-interfaces)=
# Change default user interface
2023-05-22 20:33:07 -04:00
By default a user starting a server will see the JupyterLab interface. This can
be changed with TLJH config `user_environment.default_app` or with the
JupyterHub config
2023-08-10 15:19:26 +02:00
{external:py:attr}`jupyterhub.spawner.Spawner.default_url` directly.
2023-05-22 20:33:07 -04:00
The TLJH config supports the options [`jupyterlab`](https://github.com/jupyterlab/jupyterlab/)
and [`classic`](https://github.com/jupyter/notebook), which
translates to a `Spawner.default_url` config of `/lab` and `/tree`.
2023-05-22 20:33:07 -04:00
Both these interfaces are also shipped with TLJH by default. You can try them
temporarily, or set them to be the default interface whenever you login.
2023-05-22 20:33:07 -04:00
## Trying an alternate interface temporarily
When you log in and start your server, by default the URL in your browser will
be something like `/user/<username>/lab`. The `/lab` is what tells the jupyter
server to give you the JupyterLab user interface.
2023-05-22 20:33:07 -04:00
As an example, you can update the URL to not end with `/lab`, but instead end
with `/tree` to temporarily switch to the classic interface.
2023-05-22 20:33:07 -04:00
## Changing the default user interface using TLJH config
2023-05-22 20:33:07 -04:00
You can change the default url, and therefore the interface users get when they
log in by modifying TLJH config as an admin user.
2023-05-22 20:33:07 -04:00
1. To launch the classic notebook interface when users log in, run the
following in the admin console:
2023-05-22 20:33:07 -04:00
```bash
sudo tljh-config set user_environment.default_app classic
2023-05-22 20:33:07 -04:00
```
1. To launch JupyterLab when users log in, run the following in an admin
console:
2023-05-22 20:33:07 -04:00
```bash
sudo tljh-config set user_environment.default_app jupyterlab
2023-05-22 20:33:07 -04:00
```
1. Apply the changes by restarting JupyterHub. This should not disrupt
2023-05-22 20:33:07 -04:00
current users.
```bash
sudo tljh-config reload hub
```
If this causes problems, check the [logs](#troubleshoot-logs-jupyterhub) for
clues on what went wrong.
Users might have to restart their servers from control panel to get the
new interface.