plasmabio / tljh-repo2docker

Plugin for The Littlest JupyterHub to build multiple user environments with repo2docker
BSD 3-Clause "New" or "Revised" License
60 stars 15 forks source link

Offer RStudio as default frontend for R users #29

Open pierrepo opened 4 years ago

pierrepo commented 4 years ago

RStudio is very appreciated among R users and is often the ad-hoc IDE.

By default, RStudio is injected into the environment when repo2docker detects an R environment.

It would be very nice to allow in the environment creation box to start directly with RStudio (instead of Jupyter Lab). It could be a box to tick, for instance:

[ ] start with RStudio instead of Jupyter Lab (R environments only)

There are however some caveats:

jtpio commented 4 years ago

This would mean changing the default URL to /rstudio?

I'm not sure what could happen next. Probably a 404 : Not Found

Yes that would most likely be a 404

pierrepo commented 4 years ago

This would mean changing the default URL to /rstudio?

Yes, replacing the trailing /lab part in the URL by /rstudio. At least, this is how I do manually.

jtpio commented 4 years ago

It sounds like it should be possible to do that directly in the environment being built, maybe in the postBuild or start files.

There has been a few discussions about having non-Jupyter IDEs / UI by default in repo2docker / Binder:

We would also need to rework the default_url there: https://github.com/plasmabio/plasma/blob/a9f4530948109543b6efc5014194e460b36888de/tljh-plasma/tljh_plasma/__init__.py#L111

pierrepo commented 4 years ago

It sounds like it should be possible to do that directly in the environment being built

That would the best case:

But as far as I understood, it is not obvious (nor possible?)

We would also need to rework the default_url

Yes. And also if the frontend is passed through the UI.

jtpio commented 4 years ago

But as far as I understood, it is not obvious (nor possible?)

Indeed it might not be straightforward (at least for now).

Otherwise the downstream TLJH plugin (such as Plasma) could implement some logic to set the default_url on the fly when the server is started, for example based on the name of the environment.

pierrepo commented 4 years ago

This kind of Binder Menu is also very interesting and could allow to jump from one frontend to another.

jtpio commented 4 years ago

This kind of Binder Menu is also very interesting and could allow to jump from one frontend to another.

That would definitively be useful :+1:

An alternative for now is to give user a URL to connect to JupyterHub that includes a /user-redirect/rstudio route:

https://dev.plasmabio.org/user-redirect/rstudio

The flow would look like the following:

user-redirect-rstudio