ncar-xdev / jupyter-forward

Launch Jupyter Lab over SSH with a single command!
https://jupyter-forward.readthedocs.io/
Apache License 2.0
31 stars 12 forks source link

notebook option: change default cwd #104

Open dcherian opened 3 years ago

dcherian commented 3 years ago

With the --notebook option, Jupyterlab thinks the directory with the notebook is the working directory. This is irritating because AFAICT, you can't navigate anywhere else. It also prevents saving a read-only notebook to a different file (I think this might be possible if I could change the working directory).

I notice that notebook-dir and notebook are mutually exclusive. Is it possible to relax that restriction?

andersy005 commented 3 years ago

Jupyterlab thinks the directory with the notebook is the working directory. This is irritating because AFAICT, you can't navigate anywhere else.

Unfortunately, this is the same reason notebook-dir and notebook are mutually exclusive. Say you launch Jupyter Lab server in /glade/scratch/bar and the actual notebook you want to work with is located in /glade/scratch/foo/notebook.ipynb. I don't think there is an existing workaround that would allow us to tell the jupyter server started in /glade/scratch/bar to navigate to /glade/scratch/foo/notebook.ipynb

dcherian commented 3 years ago

Ah did some digging today: this looks like an upstream fix: https://github.com/jupyterlab/jupyterlab/pull/10667 . It's due to be released next week so we can revisit after that.