UCSF-CBI / rstudio-server-controller

RStudio Server Controller (RSC) - A Tool for Launching a Personal Instance of the RStudio Server
https://github.com/UCSF-CBI/rstudio-server-controller
ISC License
4 stars 2 forks source link

How can one fully wipe user's RStudio Server settings? #72

Closed HenrikBengtsson closed 1 year ago

HenrikBengtsson commented 2 years ago

In case the user end up with a corrupt RStudio Server setting, or something that tries to load some huge things on startup, it would be nice to be able to wipe those settings complete and restart on a clean slate. How can we do that?

HenrikBengtsson commented 2 years ago

In rsc (>= 0.10.0-9002), we can use rsc config --full to get info on the RStudio user files

$ rsc config --full
...
RStudio User State Storage:
XDG_DATA_HOME=<not set>
RSTUDIO_DATA_HOME=<not set>
RStudio config folder=/home/hb/.local/share/rstudio
13k /home/hb/.local/share/rstudio/addin_registry
4.1k    /home/hb/.local/share/rstudio/bibliography-index
21k /home/hb/.local/share/rstudio/client-state
13k /home/hb/.local/share/rstudio/console06
4.1k    /home/hb/.local/share/rstudio/content_urls
0   /home/hb/.local/share/rstudio/crash-handler-permission
14M /home/hb/.local/share/rstudio/ctx
13k /home/hb/.local/share/rstudio/dictionaries
4.1k    /home/hb/.local/share/rstudio/explorer-cache
340k    /home/hb/.local/share/rstudio/history_database
4.1k    /home/hb/.local/share/rstudio/jobs
29k /home/hb/.local/share/rstudio/log
41k /home/hb/.local/share/rstudio/monitored
7.1M    /home/hb/.local/share/rstudio/notebooks
25k /home/hb/.local/share/rstudio/pcs
4.1k    /home/hb/.local/share/rstudio/persistent-state
4.1k    /home/hb/.local/share/rstudio/presentation
4.1k    /home/hb/.local/share/rstudio/profiles-cache
160k    /home/hb/.local/share/rstudio/projects
17k /home/hb/.local/share/rstudio/projects_settings
4.1k    /home/hb/.local/share/rstudio/rmd-outputs
4.1k    /home/hb/.local/share/rstudio/rstudio-desktop.json
4.1k    /home/hb/.local/share/rstudio/rstudio-server.json
8.2k    /home/hb/.local/share/rstudio/rversion-settings
4.1k    /home/hb/.local/share/rstudio/saved_source_markers
95k /home/hb/.local/share/rstudio/sessions
127k    /home/hb/.local/share/rstudio/sources
4.1k    /home/hb/.local/share/rstudio/tutorial
13k /home/hb/.local/share/rstudio/unsaved-notebooks
4.1k    /home/hb/.local/share/rstudio/viewer-cache
4.1k    /home/hb/.local/share/rstudio/viewer_history
Active RStudio Sessions:
4.1k    /home/hb/.local/share/rstudio/sessions/active/session-5e3cacf8/graphics-r3
4.1k    /home/hb/.local/share/rstudio/sessions/active/session-5e3cacf8/explorer-cache
66k /home/hb/.local/share/rstudio/sessions/active/session-5e3cacf8/properites
4.1k    /home/hb/.local/share/rstudio/sessions/active/session-5e3cacf8/viewer-cache
87k /home/hb/.local/share/rstudio/sessions/active/session-5e3cacf8
HenrikBengtsson commented 1 year ago

The newer version of rsc gives even informative error message with suggestions how to resolve things, e.g. suggesting kill -SIGTERM <PID> and stuff.

To wipe the RSC config folder, there's rsc reset and in case it cannot require lock files, there's even rsc reset --force as a last resort.