jupyterhub / jupyter-rsession-proxy

Jupyter extensions for running an RStudio rsession proxy
BSD 3-Clause "New" or "Revised" License
118 stars 87 forks source link

Changing working directory from RStudio #142

Open BigFlagBurito opened 11 months ago

BigFlagBurito commented 11 months ago

Proposed change

Currently, the working directory is always /home/jovyan when RStudio is started. I have Jupyterhub running on Kubernetes, I have set it so that the Home Env variable is HOME=/home/<username>. Also, the working direcory of kubespawner is also /home/<username>: spawner.working_dir = spawner._expand_user_properties("/home/{username}") Unfortunately, I have not found a way to customise the working directory of RStudio.

Why is this a problem? The file system for the user is attached to /home/{username}. This means that files are only stored in this file system. But since RStudio accesses /home/jovyan, the user has no access to his files and new files cannot be saved.

Alternative options

I have not found a solution to my problem, not even via the Jupyter forum. Therefore I decided to submit the suggested feature.

Who would use this feature?

I assume that there are some who have changed the working directory of Jupyterhub to fit the users and would like to use RStudio as well. They would then not have the problem of searching forever for a solution.

(Optional): Suggest a solution

A spontaneous idea would be. With a flag in e.g. a config, RStudio takes the ENV variable JUPYTERHUB_USER and creates the working directory /home/username from it. If there are better possibilities, it would of course be better.

welcome[bot] commented 11 months ago

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively. welcome You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada: