[PYTHON] Automatically opens in a new window when launching Jupyter Notebook

Jupyter Notebook is very useful. Go to any folder in the terminal and enter the jupyter notebook command to open a new tab in the foreground browser window.

This is fine, but I want the browser to open a new window automatically.

First, create a Jupyter config file

Create config file


jupyter notebook --generate-config

Then, in the case of Mac, a config file will be created in the invisible folder ".jupyter" in the Home directory.

Rewrite the config file

Rewrite the item of "c.NotebookApp.browser" in jupyter_notebook_config.py.

It is assumed that you are using Chrome. It is assumed that Chrome is installed under / Application.

Since it is commented out, uncomment it

c.NotebookApp.browser = '/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome %s --new-window'

will do.

This will open a new window when you launch Jupyter Notebook.

Recommended Posts

Automatically opens in a new window when launching Jupyter Notebook
Opens in a new window when launching Jupyter Notebook (Windows)
Drawing a tree structure with D3.js in Jupyter Notebook
Automatically save .py and .html files in Jupyter notebook.
Current directory when creating a new one with Jupyter
How to import NoteBook as a module in Jupyter (IPython)
Multiprocessing error in Jupyter Notebook
Browser does not open automatically when jupyter notebook is started
How to import NoteBook as a module in Jupyter (IPython)
A note when I can't open Jupyter Notebook on Windows
Post a Jupyter Notebook as a blog post
Generate Jupyter notebook ".ipynb" in Python
View graphs inline in Jupyter Notebook
When writing a program in Python
Error "Entry point not found" when starting Jupyter Notebook in virtual environment
How to fix a bug that jupyter notebook does not start automatically
Memory leak in Python Jupyter Lab (Notebook)?
Precautions when pickling a function in python
How to execute commands in jupyter notebook
Run Jupyter notebook on a remote server
I get a strange window when I use the open directory dialog in Tkinter
A memorandum of how to execute the! Sudo magic command in Jupyter Notebook
What to do when the graph does not appear in jupyter (ipython) notebook
What to do if NotADirectoryError: [Errno 20] Not a directory:'xdg-settings' appears in jupyter notebook
Build a PYNQ environment on Ultra96 V2 and log in to Jupyter Notebook