Reputation: 325
No matter what I do, jupyter notebook always opens in chrome non-incognito mode. This is my jupyter_notebook_config.py file
## 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.
# Default: ''
import webbrowser
webbrowser.register('incognito-chrome',None, webbrowser.get("C:/Program Files/Google/Chrome/Application/chrome.exe %s --incognito"))
c.ServerApp.browser = 'incognito-chrome'
Please help
Upvotes: 1
Views: 547
Reputation: 1406
Another way of opening an incognito chrome window is as below:
import webbrowser as wb
jUrl = 'http://localhost:8888' #Default jupyter host
incongnito_path = 'C:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s --incognito'
wb.get(incongnito_path).open_new(jUrl)
This works for me!
Upvotes: 1