Use tljh-config for notebook interface switching

This commit is contained in:
yuvipanda
2018-07-30 17:26:04 -07:00
parent d674b546ea
commit 6c0ae9a1ef

View File

@@ -32,33 +32,23 @@ Changing the default user interface
You can change the default interface users get when they log in by modifying You can change the default interface users get when they log in by modifying
``config.yaml`` as an admin user. ``config.yaml`` as an admin user.
#. Open the ``config.yaml`` file. #. To launch **JupyterLab** when users log in, run the following in an admin console:
.. code-block:: bash
sudo nano /opt/tljh/config.yaml
#. To launch **JupyterLab** when users log in, add the following snippet to the config
.. code-block:: yaml .. code-block:: yaml
user_environment: sudo -E tljh-config set user_environment.default_app jupyterlab
default_app: jupyterlab
#. Alternatively, to launch **nteract** when users log in, add the following snippet to the config #. Alternatively, to launch **nteract** when users log in, run the following in the admin console:
.. code-block:: yaml .. code-block:: yaml
user_environment: sudo -E tljh-config set user_environment.default_app nteract
default_app: nteract
#. Save and exit the editor. With ``nano``, you can do this by pressing ``Ctrl-X``.
#. Apply the changes by restarting JupyterHub. This should not disrupt current users. #. Apply the changes by restarting JupyterHub. This should not disrupt current users.
.. code-block:: yaml .. code-block:: yaml
sudo systemctl restart jupyterhub sudo -E tljh-config reload
If this causes problems, check the :ref:`troubleshoot_logs_jupyterhub` for clues If this causes problems, check the :ref:`troubleshoot_logs_jupyterhub` for clues
on what went wrong. on what went wrong.