Skip to content

Changing working directory from RStudio #142

@BigFlagBurito

Description

@BigFlagBurito

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions