I want to have persistent preferences in RStudio
I've followed your guide from docs but it's only valid up to RStudio 1.4
Start with this action, from R copy your current json file to /mnt and sync:
file.copy("/home/ubuntu/.config/rstudio/rstudio-prefs.json", "/mnt")
Then, add the following lines to the pre-setup script of your environment definition, in order to load the preferences file (if it exists) on subsequent runs - changing user-settings to rstudio-prefs.json:
if [ -f rstudio-prefs.json ]; then
mkdir -p /home/ubuntu/.config/rstudio/
cp rstudio-prefs.json /home/ubuntu/.config/rstudio/rstudio-prefs.json
chown -R ubuntu:ubuntu /home/ubuntu/.config/rstudio
fi
You just need to remember to copy the file back if you make changes to the settings.
The shell commands expect to be run from /mnt and do not have a full pathname! YMMV
This is a revised version of : https://tickets.dominodatalab.com/hc/en-us/articles/360061119911-Persisting-Rstudio-Preferences but applies to 1.4 or later and suits Domino 4.6.X (and later, based on the Environment Image you're using)
Comments
0 comments
Please sign in to leave a comment.