title: Force Jupyter Notebook *not* to open a web browser
body: <p>I'm running Jupyter notebooks (Python 3) on a remote cluster that I'm connected/tunneled to over SSH.</p>
  
  <p>Jupyter's default behavior is to try to open the dashboard in a web browser when it launches -- aparently (I only just updated), at some point they switched to the Python 3 <a href="https://docs.python.org/2/library/webbrowser.html" rel="noreferrer"><code>webbrowser</code></a> library for this.</p>
  
  <p>According to <code>webbrowser</code>'s documentation:</p>
  
  <blockquote>
    <p>text-mode browsers will be used if graphical browsers are not available or an X11 display isn’t available.</p>
  </blockquote>
  
  <p>This is exactly what happens. I run <code>jupyter notebook</code>, <code>webbrowser</code> launches <code>elinks</code>, and my one-time authentication token gets eaten, preventing me from connecting to the notebook.</p>
  
  <p>Jupyter isn't configured to use a browser -- <code>c.NotebookApp.browser</code> is commented out in my config -- and running <code>BROWSER="" jupyter notebook</code> doesn't help either.</p>
  
  <p>How can I force Jupyter <em>not</em> to open any browser?</p>