c.ServerApp.terminals_enabled = False not working

I am trying to disable terminals in JupyterLab. Neither of the following seem to work

c.NotebookApp.terminals_enabled = False
c.ServerApp.terminals_enabled = False

Jupyter starts in a service using ExecStart=/bin/bash --login -c '/opt/conda/envs/jupyterlab/bin/jupyter lab --config=/home/jupyter/.jupyter/jupyter_notebook_config.py'

My ServerApp.terminals_enabled change is in jupyter_notebook_config.py file. I also tried to use a jupyter_server_config.py but that didn’t work either

I did run a sudo systemctl restart jupyter

See the versions I am using below.

$jupyter --version

Selected Jupyter core packages...
IPython          : 8.17.2
ipykernel        : 6.26.0
ipywidgets       : 8.1.1
jupyter_client   : 8.5.0
jupyter_core     : 5.5.0
jupyter_server   : 2.9.1
jupyterlab       : 3.6.6
nbclient         : 0.8.0
nbconvert        : 7.10.0
nbformat         : 5.9.2
notebook         : 6.5.6
qtconsole        : not installed
traitlets        : 5.13.0

Any ideas?

Seems like the only way is to uninstall terminado

pip uninstall terminado. That seems to be overkilled vs just disable a parameter…

I’ll leave this open in case someone has a better suggestion

Can you open an issue on jupyter-server repository?

Ah actually, for some reason I thought I had tried the following which didn’t work but it actually does

jupyter server extension enable jupyter_server_terminals
sudo systemctl restart jupyter

I don’t think I need anymore. Seems like I found a way without having to completly uninstall the library. See my approved solution