After upgrading the version of JupyterLab from 2.2.0 to 3.0.0, the startup browser specification did not work, so make a note of the solution.
First, let's talk about what goes wrong. If you search the web for JupyterLab browser specification, you will find the following method. At the command line
jupyter notebook --generate-config
To create ~/.jupyter/jupyter/jupyter_notebook_config.py and in jupyter_notebook_config.py
c.NotebookApp.browser='"C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe\" %s'
It is a method to specify. Up to JupyterLab 2.x.x, it seems that it also refers to jupyter_notebook_config.py at startup.
However, when it comes to JuypterLab 3.0.0, the startup browser cannot be specified even with the above settings [^ 1]. The specification method has been changed.
It's simple, but create a config file with
jupyter lab. At the command line
jupyter lab --generate-config
Will create ~/.jupyter/jupyter_lab_config.py. In ~/.jupyter/jupyter_lab_config.py
c.ServerApp.browser = '"C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe\" %s'
Uncomment the, fill in the path of the browser exe and save. Then you can specify the browser to launch in
jupyter lab. It seems that the file name of "jupyter_lab_config.py" may be "jupyter_server_config.py" [^ 1].