Skip to content

Commit

Permalink
Merge pull request #348 from krassowski/custom-config-dir
Browse files Browse the repository at this point in the history
Use a dedicated configuration directory to isolate settings & workspaces
  • Loading branch information
mbektas authored Nov 26, 2021
2 parents 2f01c41 + ae2eb4f commit be70dfd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion src/main/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}
});

Expand Down

0 comments on commit be70dfd

Please sign in to comment.