Reputation: 1417
On executing the command jupyter notebook, notebook opens on Mozilla Firefox.
How to open notebook on incognito mode of Mozilla Firefox from command line?
Upvotes: 3
Views: 3650
Reputation: 977
On Safari, if the focus is on an incognito window, the notebook will open automatically in it.
Upvotes: 0
Reputation: 704
In your config add the following to set the default browser to a private firefox (adapted from here and parameters from there):
jupyter_notebook_config.py
[...]
## Specify what command to use to invoke a web browser when opening the notebook.
# If not specified, the default browser will be determined by the `webbrowser`
# standard library module, which allows setting of the BROWSER environment
# variable to override it.
import webbrowser
webbrowser.register('private_firefox', None, webbrowser.get('"' + 'path/to/firefox' +'" -private %s'))
c.NotebookApp.browser = 'private_firefox'
[...]
where path/to/firefox
would be something like one of these
/usr/bin/firefox
for Linux (see here)/Applications/Firefox.app/Contents/MacOS/firefox
for macOS (see this)C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe
for Windows (as described here)note:
Other browsers like Chrome ("...\\chrome.exe" --incognito
as in the source) would work analogously, I suppose. I have not tested others. Feel free to comment, if there are any hurdles.
Upvotes: 3
Reputation: 1955
Typically Jupyer opens on http://localhost:8888 all you need to do is copy that url and open it yourself in an incognito Firefox session.
Upvotes: 0