From ae2eb4fe04167f14fdc07f57ae29319f35b9e6a3 Mon Sep 17 00:00:00 2001 From: krassowski Date: Thu, 25 Nov 2021 20:11:10 +0000 Subject: [PATCH] Use a dedicated configuration directory to isolate settings & workspaces --- README.md | 14 ++++++++++++++ src/main/server.ts | 3 ++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 76fc7f55..4fe23f6b 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,20 @@ JupyterLab Desktop sets File Browser's root directory based on the launch method - `jlab ../notebooks/test.ipynb` launch notebook with relative path - `jlab ../test.py` launch python file with relative path +### Configuration files + +By default JupyterLab Desktop will only load and write to Jupyter configuration located in: +- `%APPDATA%\jupyterlab-desktop` on Windows +- `$XDG_CONFIG_HOME/jupyterlab-desktop` or `~/.config/jupyterlab-desktop` on Linux +- `~/Library/Application Support/jupyterlab-desktop` on macOS + +ignoring any other Jupyter configuration which may be present in standard Jupyter paths as defined by `jupyter --paths`. +This includes `jupyter-server` settings, `jupyterlab` settings and workspaces, and any other configuration which would +normally be shared between Jupyter installation. +This is necessary to prevent a clash between the Desktop and any previous Jupyter installation. + +You can change the configuration path by specifying `JLAB_DESKTOP_CONFIG_DIR` environment variable. + ## Build dependencies - [conda](https://docs.conda.io) diff --git a/src/main/server.ts b/src/main/server.ts index 3e1b02eb..969dea2d 100644 --- a/src/main/server.ts +++ b/src/main/server.ts @@ -86,7 +86,8 @@ class JupyterServer { cwd: home, env: { PATH: this._registry.getAdditionalPathIncludesForPythonPath(this._info.environment.path), - JUPYTER_TOKEN: this._info.token + JUPYTER_TOKEN: this._info.token, + JUPYTER_CONFIG_DIR: process.env.JLAB_DESKTOP_CONFIG_DIR || app.getPath('userData') } });