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

rstudio-prefs.json: Tweak the default behavior (to avoid some of the startup issues) #109

Open HenrikBengtsson opened 1 month ago

HenrikBengtsson commented 1 month ago

Given how some users end up in a situation where they struggle to launch RStudio again, and inspired by [1], we should set the defaults to launch RStudio in a clean slate, e.g.

{
  "restore_source_documents": false,
  "save_workspace": "never",
  "load_workspace": false,
  "restore_last_project": false
}

See [2] for available settings.

This should be done such that the user can still override these settings. The system-wide settings should be located in folder RSTUDIO_CONFIG_DIR -> XDG_CONFIG_DIRS [3]. The user-specific settings are located in RSTUDIO_CONFIG_HOME -> XDG_CONFIG_HOME [3].

References

  1. https://github.com/rstudio/rstudio/issues/12028#issuecomment-2402466901
  2. Available settings: https://docs.posit.co/ide/desktop-pro/settings/preferences.html
  3. File locations of settings: https://docs.posit.co/ide/desktop-pro/settings/settings.html
HenrikBengtsson commented 2 weeks ago

rsc config reports on this file;

$ bin/rsc config
...
RStudio User Configuration:
XDG_CONFIG_HOME: <not set>
RSTUDIO_CONFIG_HOME: <not set>
RStudio config home: /home/henrik/.config/rstudio [53824697 bytes; 2024-09-20 22:11:06]
RStudio user preferences: /home/henrik/.config/rstudio/rstudio-prefs.json [38 bytes; 2024-11-10 15:46:12]
...

and

$ rsc config --full
...
RStudio User Configuration:
XDG_CONFIG_HOME: <not set>
RSTUDIO_CONFIG_HOME: <not set>
RStudio config home: /home/henrik/.config/rstudio [53824697 bytes; 2024-09-20 22:11:06]
RStudio user preferences: /home/henrik/.config/rstudio/rstudio-prefs.json [38 bytes; 2024-11-10 15:46:12]
{
    "jobs_tab_visibility": "shown"
}
...