How to change the default browser used by jupyter notebook in windows
Thanks to @Darthbith and this post How to change the default browser used by the ipython/jupyter notebook in Linux? I was able to figure it out:
Step 1: To open Anaconda Prompt from the Start Menu and type
# for old notebook and JupyterLab < 3.0, or
jupyter notebook --generate-config
# for new nbclassic and JupyterLab >= 3.0
jupyter server --generate-config
This will generate the file ~/.jupyter/jupyter_notebook_config.py
(or jupyter_server_config.py
for nbclassic/new JupyterLab)
Step 2: Edit this file and change the following line (chrome is also is also in a local installation)
# for old notebook and JupyterLab < 3.0
c.NotebookApp.browser = u'C:/Home/AppData/Local/Google/Chrome/Application/chrome.exe %s'
# OR for new nbclassic and JupyterLab >= 3.0
c.ServerApp.browser = u'C:/Home/AppData/Local/Google/Chrome/Application/chrome.exe %s'
How to change the default browser used by the ipython/jupyter notebook in Linux?
You can create jupyter_notebook_config.py
by:
jupyter notebook --generate-config
Then you go to
~/.jupyter/jupyter_notebook_config.py
and change
# c.NotebookApp.browser = ''
to for example:
c.NotebookApp.browser = '/usr/bin/google-chrome %s'
You can choose which ever browser is installed. You'll find the path for example by typing which firefox
Do not forget to delete the #
How to change the default browser used by jupyter notebook in windows
Thanks to @Darthbith and this post How to change the default browser used by the ipython/jupyter notebook in Linux? I was able to figure it out:
Step 1: To open Anaconda Prompt from the Start Menu and type
# for old notebook and JupyterLab < 3.0, or
jupyter notebook --generate-config
# for new nbclassic and JupyterLab >= 3.0
jupyter server --generate-config
This will generate the file ~/.jupyter/jupyter_notebook_config.py
(or jupyter_server_config.py
for nbclassic/new JupyterLab)
Step 2: Edit this file and change the following line (chrome is also is also in a local installation)
# for old notebook and JupyterLab < 3.0
c.NotebookApp.browser = u'C:/Home/AppData/Local/Google/Chrome/Application/chrome.exe %s'
# OR for new nbclassic and JupyterLab >= 3.0
c.ServerApp.browser = u'C:/Home/AppData/Local/Google/Chrome/Application/chrome.exe %s'
Launch IPython notebook with selected browser
I had the same problem on windows and got it work this way:
Create a config file with command
ipython profile create default
Edit ipython_notebook_config.py file, search for line
#c.NotebookApp.browser =''
and replace it with
import webbrowser
webbrowser.register('firefox', None, webbrowser.GenericBrowser('C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe'))
c.NotebookApp.browser = 'firefox'
then it works for me.
Hope it will help you.
JPG
Related Topics
How to Remove a Close_Wait Socket Connection
How to Turn Off Echo While Executing a Shell Script Linux
Linux: Find File Names With 4 or 5 Characters
How to Convert Hex to Ascii Characters in the Linux Shell
What Happens If You Use the 32-Bit Int 0X80 Linux Abi in 64-Bit Code
Multiple Glibc Libraries on a Single Host
How Do So_Reuseaddr and So_Reuseport Differ
Save Modifications in Place With Awk
How to Convert Dos/Windows Newline (Crlf) to Unix Newline (Lf)
How to Keep Environment Variables When Using Sudo
How to Store a Command in a Variable in a Shell Script
How to Grep For Contents After Pattern
Given Two Directory Trees, How to Find Out Which Files Differ by Content
How to Count Lines in a Document
Recursively Counting Files in a Linux Directory