Redirecting startup URL when launching jupyter from file://-style URL to http://localhost-style URL?

16 views
Skip to first unread message

Björn Haase

unread,
Sep 27, 2024, 4:34:14 AM9/27/24
to jup...@googlegroups.com
Hi to you all and first thank's for your work on the jupyter notebook and jupyter lab ecosystem.

I am trying to setup an environment for an school setting on android tablets for using jupyter lab as teaching environment.

I already got quite fare with setting up termux and succeeded to get a working environment.
The remaining obstacle I am facing is automatic launching of the browser from the termux sandbox.
Seemingly when setting up the environment 
 
c.NotebookApp.browser='termux-open-url %s'
within .jupyter/jupyter_notebook_config.py

when executing "$ jupyter lab" the attempt is made to open a sandbox-located file URL such as
file://some_sandbox_located_directory_name/jpserver-XXXX-open.html
. The issue is that on Android with termux the browser itself does not have access to termux' sandbox file directories and automatically
launching the web browser when starting jupyter fails.

I am convinced that anything would work well if one could make jupyter pass not the local-file URL to the browser app via the %s parameter but
a http://localhost:8888 - style URL instead.

Is there any way to achieve that?

I am currently using jupyterlab version 4.2.5.

In order to achieve a smooth user experience for the pupils I consider it mandatory to provide some automatic launching process which avoids the need of copying the localhost URL to the clipboard and manually pasting the URL to a separately opened browser window ...

Any advice would be appreciated :-)!

Yours,

Björn
 

Vidar Tonaas Fauske

unread,
Sep 27, 2024, 4:49:44 AM9/27/24
to jup...@googlegroups.com

Hi Björn,

There is a setting ServerApp.use_redirect_file which you can set to false.

Regards,
Vidar


--
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 view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/trinity-5a7cdb15-07a6-43d0-b675-ae995e07e8b7-1727387804728%403c-app-webde-bap33.
Reply all
Reply to author
Forward
0 new messages