Skip to content

Instantly share code, notes, and snippets.

@data-enhanced
Last active July 24, 2025 08:51
Show Gist options
  • Select an option

  • Save data-enhanced/a9e286646dec2bb65ac8b524a331c86d to your computer and use it in GitHub Desktop.

Select an option

Save data-enhanced/a9e286646dec2bb65ac8b524a331c86d to your computer and use it in GitHub Desktop.

Revisions

  1. David Cochran revised this gist Jan 13, 2020. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions jupyter_default_browser.md
    Original file line number Diff line number Diff line change
    @@ -17,12 +17,12 @@ Remove the hash mark for the next line `c.NotebookApp.browser = ''`

    Update the line by supplying the open command and correct path for your desired browser.

    For Firefox:
    **For Firefox:**

    # import webbrowser
    c.NotebookApp.browser = u'open -a /Applications/Firefox.app %s'

    For Google Chrome:
    **For Google Chrome:**

    # import webbrowser
    c.NotebookApp.browser = u'open -a /Applications/Google\ Chrome.app %s'
  2. David Cochran revised this gist Jan 13, 2020. 1 changed file with 5 additions and 3 deletions.
    8 changes: 5 additions & 3 deletions jupyter_default_browser.md
    Original file line number Diff line number Diff line change
    @@ -11,9 +11,11 @@ This generates the file:

    ## Step 2. Open and edit the new config file.

    a. Find the block for `# import webbrowser`.
    b. Remove the hash mark for the next line `c.NotebookApp.browser = ''`
    c. Update the line by supplying the open command and correct path for your desired browser.
    Find the block for `# import webbrowser`.

    Remove the hash mark for the next line `c.NotebookApp.browser = ''`

    Update the line by supplying the open command and correct path for your desired browser.

    For Firefox:

  3. David Cochran revised this gist Jan 13, 2020. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions jupyter_default_browser.md
    Original file line number Diff line number Diff line change
    @@ -32,3 +32,4 @@ Reopen jupyter notebooks.

    [Launch Jupyter Notebook in Safari from Anaconda Navigator? Stackoverflow.com](https://stackoverflow.com/questions/58355377/launch-jupyter-notebook-in-safari-from-anaconda-navigator)

    [How to change the default browser used by jupyter notebook in windows](https://stackoverflow.com/questions/47772157/how-to-change-the-default-browser-used-by-jupyter-notebook-in-windows)
  4. David Cochran revised this gist Jan 13, 2020. 1 changed file with 24 additions and 4 deletions.
    28 changes: 24 additions & 4 deletions jupyter_default_browser.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,6 @@
    Step 1. Create an editable config file for Jupyter notebooks.
    # Change the Default Browser for Jupyter Notebooks in OS X

    ## Step 1. Create an editable config file for Jupyter notebooks.
    To do this, open Terminal and type:

    jupyter notebook --generate-config
    @@ -7,8 +9,26 @@ This generates the file:

    ~/.jupyter/jupyter_notebook_config.py

    Step 2. Open and edit the above file.
    Find this line and update it:
    ## Step 2. Open and edit the new config file.

    a. Find the block for `# import webbrowser`.
    b. Remove the hash mark for the next line `c.NotebookApp.browser = ''`
    c. Update the line by supplying the open command and correct path for your desired browser.

    For Firefox:

    # import webbrowser
    c.NotebookApp.browser = u'open -a /Applications/Firefox.app %s'

    For Google Chrome:

    # import webbrowser
    c.NotebookApp.browser = u'open -a /Applications/Firefox.app %s'
    c.NotebookApp.browser = u'open -a /Applications/Google\ Chrome.app %s'

    Save the new file.
    Reopen jupyter notebooks.

    # References

    [Launch Jupyter Notebook in Safari from Anaconda Navigator? Stackoverflow.com](https://stackoverflow.com/questions/58355377/launch-jupyter-notebook-in-safari-from-anaconda-navigator)

  5. David Cochran created this gist Jan 13, 2020.
    14 changes: 14 additions & 0 deletions jupyter_default_browser.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    Step 1. Create an editable config file for Jupyter notebooks.
    To do this, open Terminal and type:

    jupyter notebook --generate-config

    This generates the file:

    ~/.jupyter/jupyter_notebook_config.py

    Step 2. Open and edit the above file.
    Find this line and update it:

    # import webbrowser
    c.NotebookApp.browser = u'open -a /Applications/Firefox.app %s'