Classic notebook instead of jupyterlab on mybinder.org

UPDATE: Some time between early September and December 2021, the form at MyBinder.org changed so that by default it makes a URL with labpath when specifying a particular notebook. Most of this discussion thread above and below don’t reflect that. HOWEVER, THIS DETAILED POST HAS BEEN UPDATED to be consistent with the current method to select the classic notebook interface, i.e., where you take the URL that the form at MyBinder.org makes and you change labpath to filepath to have launches open to the classic notebook when the session starts.


@portobello, for specifying the classic interface, you don’t want to go back to the MyBinder site. Or at least don’t take what it makes without further editing. What that sie produces will now only send you to JupyterLab.
You want to hand-edit the URLs that produces now, if you are trying to launch with the classic interface.

For example, the one @minrk posted above works great to open in the classic notebook interface:

https://mybinder.org/v2/gh/fontainedeseaux/NSI_premiere/HEAD?urlpath=%2Fnotebooks%2Fles_variables%2Fbases_python.ipynb

But you’ll see if you go to MyBinder.org now, and make one filling in the information related to that repo and that notebook:

https://github.com/fontainedeseaux/NSI_premiere/les_variables/bases_python.ipynb

It produces the following URL:

https://mybinder.org/v2/gh/fontainedeseaux/NSI_premiere/HEAD?labpath=les_variables%2Fbases_python.ipynb

And consistent with labpath being there, that will now open in JupyterLab.

You can take what MyBinder.org gives you swap out labpath from the URL and replace it with filepath, and you’ll have a link that will open that specific notebook with the classic interface.

https://mybinder.org/v2/gh/fontainedeseaux/NSI_premiere/HEAD?filepath=les_variables%2Fbases_python.ipynb

(Note that consistent with what @minrk posted above, you can also take what MyBinder.org gives you swap out labpath=les_variables and replace it with urlpath=%2Fnotebooks%2Fles_variables; but you’ll note that requires a slight bit more of editing to accomplish the same thing.)

You’ll do similar with links from MyBinder.org to your own notebooks, following that pattern.
If yours happen to be in root it is easier because you just replace labpath= with filepath=.
Feel free to specify a repo and notebook in a reply if you still are having trouble.

If you still want to use the launch badges that MyBinder.org site produces yet send users to the classic notebook interface, you just need to edit them in a similar way after-the-fact.


As an aside to your ‘EDIT’:
If you have launched in JupyterLab yourself, you can opt to switch to classic via the upper menu bar ‘Help’ > ‘Launch Classic Notebook’.
You’ll see that it takes you to the classic Jupyter dashboard and tree is at the end of the URL. For that direction, you don’t need to edit in tree in the address bar yourself because a way is built into the upper menu bar.
If you are in the classic interface at the dashboard, you can edit the URL that ends in /tree so that it ends in /lab to switch to JupyterLab. There’s not a way presently built in for that direction from classic to lab interface.

2 Likes