Jupyter notebook edit single file and auto shutdown from file browser

48 views
Skip to first unread message

Alexis Jeandet

unread,
Oct 11, 2017, 1:34:46 PM10/11/17
to Project Jupyter
Hello,

The subject might not be clear, I might have missed something.
In order to be able to start a jupyter notebook server from Nautilus for example, the best I can do is to start 'jupyter notebook' from the current folder then load the wanted notebook from the web browser. Then closing the tab or even the browser will not terminate jupyter server since I forked the server from Nautilus.

I didn't find if it is possible to directly start jupyter-notebook on one notebook and automatically shut down the server when the tab or the browser is closed.
This would allow to quickly edit or see notebooks from file browser without starting from the shell a server and killing it when done just by doing "right click"->"open with"->"jupyetr-notebook".

Best regards,
Alexis.

Thomas Kluyver

unread,
Oct 11, 2017, 4:31:13 PM10/11/17
to Project Jupyter
On 11 October 2017 at 18:34, Alexis Jeandet <alexis....@gmail.com> wrote:
I didn't find if it is possible to directly start jupyter-notebook on one notebook...

This bit is doable with nbopen: https://pypi.python.org/pypi/nbopen

 
... and automatically shut down the server when the tab or the browser is closed.

We don't have a great answer for this bit. Though it can now cull idle kernels, and maybe it would be possible to write a script that kills the notebook server a few minutes after it has no kernels active.

If there is a running server, nbopen reuses that when you open another notebook, which also reduces the need to shut down servers.

Thomas

Alexis Jeandet

unread,
Oct 12, 2017, 2:47:58 AM10/12/17
to Project Jupyter
Ok, thank you Thomas, that's already a good start. At least I don't spawn a server on each notebook.
That would make sense to auto kill server when no more client are connected with a switch like --auto-kill.
Reply all
Reply to author
Forward
0 new messages