# How to change default browser of Jupiter notebook in IJulia?

**URL:** https://discourse.julialang.org/t/how-to-change-default-browser-of-jupiter-notebook-in-ijulia/94790
**Category:** Jupyter-Notebook
**Tags:** question
**Created:** [February 17, 2023, 1:58pm UTC](https://discourse.julialang.org/t/how-to-change-default-browser-of-jupiter-notebook-in-ijulia/94790 "2023-02-17T13:58:25Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![swish47](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/swish47/32/43921_2.png) [@swish47](https://discourse.julialang.org/u/swish47)
#### Post date: [February 17, 2023, 1:58pm UTC](https://discourse.julialang.org/t/how-to-change-default-browser-of-jupiter-notebook-in-ijulia/94790/1 "2023-02-17T13:58:25Z")

</div>

In these two links, [https://stackoverflow.com/questions/47772157/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), [https://stackoverflow.com/questions/35229604/how-to-change-the-default-browser-used-by-the-ipython-jupyter-notebook-in-linux?rq=1](https://stackoverflow.com/questions/35229604/how-to-change-the-default-browser-used-by-the-ipython-jupyter-notebook-in-linux?rq=1), we can change default browser of ipython/jupyter notebook. But how to do this in IJulia?

---

<div class="post-metadata">

### Author: ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)
#### Post date: [February 17, 2023, 2:11pm UTC](https://discourse.julialang.org/t/how-to-change-default-browser-of-jupiter-notebook-in-ijulia/94790/2 "2023-02-17T14:11:58Z")

</div>

IJulia only provides kernel, Jupyter server / application has it’s own config and we simply call it.

I imagine one simple way is to change your system’s default URL opening browser, on linux it amounts to something like

```julia
xdg-settings set default-web-browser firefox.desktop

```

---

<div class="post-metadata">

### Author: ![VivMendes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vivmendes/32/16477_2.png) [@VivMendes](https://discourse.julialang.org/u/VivMendes)
#### Post date: [February 17, 2023, 3:14pm UTC](https://discourse.julialang.org/t/how-to-change-default-browser-of-jupiter-notebook-in-ijulia/94790/3 "2023-02-17T15:14:40Z")

</div>

As @jling mentioned, IJulia just sets the Julia kernel. Changing the default browser has nothing to do with the IJulia installation. On Windows, it is very easy to make that change:

click on `settings` → search for `browser ` → `choose the default web browser `

---

<div class="post-metadata">

### Author: ![swish47](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/swish47/32/43921_2.png) [@swish47](https://discourse.julialang.org/u/swish47)
#### Post date: [February 17, 2023, 8:57pm UTC](https://discourse.julialang.org/t/how-to-change-default-browser-of-jupiter-notebook-in-ijulia/94790/4 "2023-02-17T20:57:29Z")

</div>

This is definitely not what I mean. You could check those links for IPython cases. They change the launching browser only for python, not for the whole system.  
We know that if not change default IJulia browser but just copy local jupyter link to another browser, one have to input some “password” and this forbid us to access through another browser locally since we don’t know any so called “password”. The only way is changing default setting in IJulia.

---

<div class="post-metadata">

### Author: ![jd-foster](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jd-foster/32/35824_2.png) [@jd-foster](https://discourse.julialang.org/u/jd-foster)
#### Post date: [February 18, 2023, 1:34pm UTC](https://discourse.julialang.org/t/how-to-change-default-browser-of-jupiter-notebook-in-ijulia/94790/5 "2023-02-18T13:34:29Z")

</div>

As said above,

> [@jling](#):
>
> IJulia only provides kernel, Jupyter server / application has it’s own config and we simply call it.

So the information in your links is still relevant for the IJulia situation to configure web browsers (registration of names and so on).  
If you are launching from a script, you can write do something (although fragile) from Julia like:

```julia
using IJulia

browser="safari" # specify your browser name: see https://docs.python.org/3/library/webbrowser.html#webbrowser.register
cmd = `$(IJulia.JUPYTER) notebook --browser=$(browser)`
run(Cmd(cmd; detach=true, dir=homedir()); wait=false) # change keyword arguments as needed.

```

---

<div class="post-metadata">

### Author: ![swish47](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/swish47/32/43921_2.png) [@swish47](https://discourse.julialang.org/u/swish47)
#### Post date: [February 22, 2023, 7:56pm UTC](https://discourse.julialang.org/t/how-to-change-default-browser-of-jupiter-notebook-in-ijulia/94790/6 "2023-02-22T19:56:34Z")

</div>

> [@jd-foster](#):
>
> `https://docs.python.org/3/library/webbrowser.html#webbrowser.register`

I followed your method, but it doesn’t work. If I only input codes you showed, notebook would not be launched. And if I input `notebook()`, IJulia will still open jupyter in default browser.

```julia
julia> using IJulia

julia> browser="google-chrome"
"google-chrome"

julia> cmd = `$(IJulia.JUPYTER) notebook --browser=$(browser)`
`'C:\Users\.julia\conda\3\Scripts\jupyter.exe' notebook --browser=google-chrome`

julia> run(Cmd(cmd; detach=true, dir=homedir()); wait=false)
Process(setenv(`'C:\Users\.julia\conda\3\Scripts\jupyter.exe' notebook --browser=google-chrome`; dir="C:\\Users\\mymoo"), ProcessRunning)

julia> notebook()

```
