Changing directory where Rstudio stores session information

We use Rstudio to allow students to run R on our compute server over a web session. This usually works well. One problem though is that students occasionally find large files accruing in ~/.local/share/rstudio/sessions/ which eventually takes them over quota and into problems. Can we tell Rstudio server to instead use a different folder for finding rstudio data?

The closest I could find is that you note here:

but on my account, all I see under ~/.config/rstudio is a few files:

sje30@subliminal:~/.config/rstudio $ ls
crash-handler.conf  dictionaries/  rstudio-prefs.json

and the rest of my files are still under ~/.local/share/rstudio

so, how might we move ~/.local/share/rstudio out of their home directory for all users?

Thanks, Stephen

Yup, you can absolutely do this. Here is the relevant section of the documentation:

tl;dr - set XDG_DATA_HOME environment variable and RStudio will store user state there instead of ~/.local/share. Note that you have to make sure this gets set before the session starts .

Thank you; this looks exactly what I was after.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.