Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment variable for rproject file #150

Closed
rickmcgeer opened this issue Jun 12, 2024 · 1 comment
Closed

Environment variable for rproject file #150

rickmcgeer opened this issue Jun 12, 2024 · 1 comment

Comments

@rickmcgeer
Copy link
Contributor

Proposed change

A common practice in RStudio is to use an Rproject file on startup, which is given in the --rproj-file argument to rsession, e.g.:
rsession --standalone=1 --program-mode=server --www-port=8787 --rproj-file=/etc/foo.rproj

It's no problem to put the rproject file in the Docker container and then add the following lines to https://github.com/jupyterhub/jupyter-rsession-proxy/blob/main/jupyter_rsession_proxy/__init__.py right after line 110:

if os.getenv('JUPYTER_RSESSION_RPROJ_FILE', default):
      cmd.append(f'--rproj-file={JUPYTER_RSESSION_RPROJ_FILE}')

Alternative options

This might be subsumed (or a special case) of the open PR #86. It appears to have been open for four years without activity.

Who would use this feature?

This is a common way for R users to express startup behavior.

(Optional): Suggest a solution

My proposed solution is in the description above, and I'd be happy to fork the repo, make and test it, and do a PR.

@rickmcgeer
Copy link
Contributor Author

This was a bad idea, suggested to me by an R programmer. On investigation, it turns out that the actual flag is --rsession-config-file arg which just uses arg rather than /etc/rstudio/rsession.conf as the configuration file. But for the JupyterHub use case, the simpler and more reliable solution is just to overwrite /etc/rstudio/rsession.conf in the Jupyter server container image. So this should be closed as unnecessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant