Jupyter uses wrong browser

37 views
Skip to first unread message

Brendan Barnwell

unread,
Jan 5, 2019, 4:01:11 PM1/5/19
to Project Jupyter
I'm on Linux Mint.  I have Vivaldi set as my default browser.  If in my environment I start Python, import the webbrowser module, and use webbrowser.get().open('blah') it opens in Vivaldi.  Nonetheless, if I do "jupyter notebook", it opens in Waterfox.

How can I make Jupyter use the correct default browser?

Please note, I am NOT asking how to set the browser used by Jupyter.  I know about the c.NotebookApp.browser variable in Jupyter config and I don't want to do that, because I don't want Jupyter to have a custom browser setting.  I am asking how to get Jupyter to correctly use the DEFAULT browser that is already set, so that if I change my default browser, Jupyter will also change to use the new default.

Roland Weber

unread,
Jan 7, 2019, 1:23:23 AM1/7/19
to Project Jupyter
Are you running "jupyter notebook" from the same environment in which you did the test with the webbrowser module? If it is a different environment (conda?), compare the environment variable BROWSER in both.

cheers,
  Roland

Thomas Kluyver

unread,
Jan 7, 2019, 4:59:11 AM1/7/19
to Project Jupyter
To add to that, Jupyter uses the webbrowser module to launch your browser. Here it is in the code:

So if you're seeing different behaviour from calling webbrowser.get() yourself, it can only really be because of a difference in the environment, or because you have configured NotebookApp.browser.

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/518c30d3-7c59-4fb5-b938-2392e6f662cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages