0

I have two sub-questions of the question shown in title:

  1. Where does JupyterLab store System Defaults and User Preference files?

    • Which are displayed in the GUI's Advanced Settings Edit page/Notebook as show in bellow picture.
    • enter image description here
    • The most similar file I can find is /usr/local/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/tracker.json, but I'm not sure if this file is for System Defaults or User Preference or neither
  2. I want to customized my own JupyterLab settings by editing the config file, and there are several file path suggestion I found in websites:

    1. /usr/local/share/jupyter/lab/settings/overrides.json
    2. ~/.jupyter/lab/user-settings/@jupyterlab/notebook-extension/tracker.jupyterlab-settings
    3. /usr/local/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/tracker.json
    • My question is: Which correct file should I edit if I want to adjust settings like code folding, line wrapping? Or none of above, there is other file I should use?

PS. Because I start JupyterLab in a docker container, and I rebuild the container frequently, I want to change the default settings by editing the config file instead of changing these settings in the GUI every time.

Thank you all.

ref:

theabc50111
  • 421
  • 7
  • 16

1 Answers1

0

The codeFolding & wordWarping settings are related to the jupyterlab extension@jupyterlab/notebook-extension and the plugintracker.

There are two Jupyter Lab User Setting files you can edit to adjust codeFolding setting.

So there are two options, you can choose one of them:

  • file 1: ~/.jupyter/lab/user-settings/@jupyterlab/notebook-extension/tracker.jupyterlab-settings

    According to the documents of jupyter lab:

    By default, the location is $HOME/.jupyter/lab/user-settings/, where $HOME is the user’s home directory. This folder is not in the JupyterLab application directory because these settings are typically shared across Python environments. The location can be modified using the JUPYTERLAB_SETTINGS_DIR environment variable.

    JSON5 files are automatically created in this folder recording the settings changes a user makes in the JupyterLab Advanced Settings Editor. The file names follow the pattern of <extension_name>/<plugin_name>.jupyterlab-settings.

    So we should edit ~/.jupyter/lab/user-settings/@jupyterlab/notebook-extension/tracker.jupyterlab-settings.

    Any settings you write in this file, would override the default settings

  • file 2: /usr/local/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/tracker.json We can also edit /usr/local/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/tracker.json.

    But by editing this file, you are change default settings directly.

theabc50111
  • 421
  • 7
  • 16