difficulty changing the default version of R at the user level in RStudio Server open source Version 1.4.1106

I noticed that my organization updated our RStudio Server open source to Version 1.4.1106. With this newer version, users have access to the following file: ~/.config/rstudio/rstudio-prefs.json. This article suggests that I can edit that file to change the default version of R that appears for me, as a user, in RStudio. Specifically, I should be able to add something like the following to be able to use R 4.0.2 as my default version of R:

    "default_r_version": {
	"version": "4.0.2",
	"r_home": "/opt/R/R-4.0.2", 
	"label": "Taking Off Again"

For some reason, after I edit and save the file, the file keeps getting overwritten or defaults back to the original script. Is there a setting that my system admins need to change to ensure that users can successfully change their default version of R by allowing their edits to rstudio-prefs.json to get saved? Or, is everything likely to be configured correctly at the admin level, and is there something I need to do differently as a user?

The same article I mention above references older RStudio Server pro documentation. The documentation mentions the XDG_CONFIG_HOME environmental variable. It's not clear what this environmental variable should be set to (~/.config or ~/.config/rstudio) or whether setting it either in my .bash_profile or in .Renviron makes any difference.

If it helps in troubleshooting the problem, the server is operating on Linux.

Any guidance in trying to get this figured out would be greatly appreciated!

Thank you!

As far as I know, that functionality is only available for the Pro (Workbench) version, not for the open-source version.

So, just to be clear, anytime I'm looking at the documentation and I see the following box with "Pro" inside, it doesn't apply to the open-source version. Correct?


Yes, you are correct

I don't see "Pro" here:
I also don't see "Pro" here:

I also don't see "Pro" here:

The absence of "Pro" at those places in the documentation indicates that I should be able to edit the rstudio-prefs.json file and change the version of R in RStudio open-source. Correct?

Here is the full script in my user-level rstudio-prefs.json file:

    "panes": {
        "quadrants": [
        "tabSet1": [
        "tabSet2": [
        "console_left_on_top": false,
        "console_right_on_top": true
    "show_margin": false,
    "show_diagnostics_other": true,
    "default_project_location": "~",
    "source_with_echo": true,
    "document_author": "Ted Moorman",
    "show_hidden_files": true,
    "wrap_tab_navigation": false,
    "reuse_sessions_for_project_links": true,
    "use_secure_download": false,
    "cran_mirror": {
        "name": "Global (CDN)",
        "host": "RStudio",
        "url": "http://cran.rstudio.com/",
        "secondary": "",
        "country": "us"
    "jobs_tab_visibility": "shown",
    "show_terminal_tab": false

I changed "show_terminal_tab": false to "show_terminal_tab": true and saved the file. When I quit the current R session and restarted, the terminal tab appeared, but the script no longer contained any code related to the "show_terminal_tab" session user setting. Then I changed it back to "show_terminal_tab": false and saved the file. Then when I quit the current R session and restarted, the terminal tab vanished, and the script continued to show "show_terminal_tab": false .

Is this behavior expected?!

They have always stated that selecting R versions per user or session is a Pro functionality, on the open source version it is only possible to set the R version globally for the RStudio server. So maybe it is just an error in the documentation.

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.