How to Set Default Opening .ipynb File on JupyterLab Startup?

I am a user of JupyterLab and I have a query about setting a default .ipynb file to open when launching JupyterLab. I’m seeking your guidance and assistance on this matter.

I’d like to automatically open a specific .ipynb file upon starting JupyterLab, rather than displaying the default file browser. I’ve tried a few methods, but it seems there isn’t an officially supported way to achieve this.

I’ve gone through the documentation and some community resources but haven’t found any official guidance or recommendations related to this issue. Therefore, I’m reaching out to inquire: Is there an officially supported method to set a default .ipynb file to open when starting JupyterLab? If so, could you please provide related documentation or guidance?

Thank you very much for your time and assistance. I’m looking forward to your response.

jupyter lab path/to/notebook.ipynb should work. If it does not work can you open an issue on GitHub - jupyterlab/jupyterlab: JupyterLab computational environment. please?

1 Like

Improvements to the documentation are also welcome!

Am I allowed to use URL concatenation, for instance, like this http://localhost:8888/lab/tree/vit-pytorch/vit-pytorch/vit_pytorch.ipynb? The path /vit-pytorch/vit-pytorch/vit_pytorch.ipynb represents a relative workspace path.
this method sometimes fails to open the file.

“Initially, when accessing http://ip:6080/jupyter-forward/fa4d172127de456e9acb6ecad57fa3aa/lab/tree/pytorch_notebook_remote17/mnist2_remote17.ipynb, I can open the IPYNB file. However, upon subsequent attempts using the same URL, the file does not open. It seems that JupyterLab internally performs redirection. The new URL, http://ip:6080/jupyter-forward/fa4d172127de456e9acb6ecad57fa3aa/lab/workspaces/auto-F/tree/pytorch_notebook_remote17/mnist2_remote17.ipynb, contains an additional /workspaces/auto-F/tree in the path, causing the IPYNB file to fail to open using the URL. How can this issue be resolved? Thank you, looking forward to your response.”