简体   繁体   中英

How to open jupyter on google chrome incognito mode

I am using win10, my default browser is chrome.

When I run the following command python -m notebook google chrome pop up. In the jupyter_notebook_config.py I have not modified anything yet, I just tried the following but unfortunately it is not working:

## 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: ''
c.NotebookApp.browser = 'C:/Program Files/Google/Chrome/Application/chrome.exe -incognito %s'

You just need to copy it to the .py file.

import webbrowser
webbrowser.register('private_chrome', None, webbrowser.get('"' + 'C:/Program Files/Google/Chrome/Application/chrome.exe' +'" -incognito %s'))
c.NotebookApp.browser = 'private_chrome'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM