Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store RStudio user preferences in a user-accessible location #1607

Closed
jmcphers opened this issue Oct 13, 2017 · 23 comments · Fixed by #5069
Closed

Store RStudio user preferences in a user-accessible location #1607

jmcphers opened this issue Oct 13, 2017 · 23 comments · Fixed by #5069
Assignees

Comments

@jmcphers
Copy link
Member

@jmcphers jmcphers commented Oct 13, 2017

We've often had requests to store user preferences in a user-accessible location, using a user-editable file format. The motivation is typically to make it possible to develop a set of personal settings which can be moved from machine to machine, stored on version control, etc.

We currently store most user preferences in a private file inside ~/.rstudio/monitored/user-settings (or the platform equivalent), many of them in a JSON uiPrefs blob. Since RStudio's inception, several editing platforms (Sublime and Visual Studio Code) have exposed their preferences as user-editable JSON. We could do the same with a handful of changes:

  1. Create a location for RStudio user preferences, probably following the XDG configuration standard
  2. Separate the existing user-settings content into internal settings (including machine-specific settings such as contextIdentifier) and external settings.
  3. Load and save external settings to the .json file instead of the user-settings file.
@jmcphers
Copy link
Member Author

@jmcphers jmcphers commented Oct 13, 2017

A natural extension of this work would be to allow for a "global defaults" settings file to be read from a shared location, for use by administrators who wish to set defaults for their users according to constraints/patterns in their environment.

@jmcphers
Copy link
Member Author

@jmcphers jmcphers commented Oct 18, 2017

@haozhu233
Copy link

@haozhu233 haozhu233 commented Dec 7, 2017

I second to this possible feature.

When I wrote rmarkdown documents, I found it has been very useful to change chunk evaluation location from document to project so if your rmd file is buried in some sub-directory, you can make sure you start from the same space when you run code chunks in console & click the render button. However, after I moved my files to rstudio server and shared the folder with someone else, since they haven't enabled this feature, they usually run into trouble that R cannot find the file. As a team working on RStudio, it will be very useful to be able to setup a unified customizable default profile for cases like this.

@russellpierce
Copy link

@russellpierce russellpierce commented Mar 11, 2018

Bump, as a user interested in this feature. ;)

@BrainStormCenter
Copy link

@BrainStormCenter BrainStormCenter commented Apr 5, 2018

I too that this would be a great feature for RStudio. As an rstatsnewbie working on a couple of different machines (work & home), being able to sync packages and settings between them would be greatly appreciated!!!

@verajosemanuel
Copy link

@verajosemanuel verajosemanuel commented Apr 6, 2018

As the foundation of a third party tool for syncing different installations of Rstudio this would be a killer feature

@jmcphers
Copy link
Member Author

@jmcphers jmcphers commented Jul 9, 2018

@sellorm specifically suggested that we include pane and theme config in the files (see #3129)

@sellorm
Copy link

@sellorm sellorm commented Jul 9, 2018

I guess anything/everything from 'Global Options' would be good

@coatless
Copy link

@coatless coatless commented Aug 31, 2018

It would be great if it was possible to streamline retrieving and modifying the configuration ala the state information given at: https://support.rstudio.com/hc/en-us/articles/200534577-Resetting-RStudio-Desktop-s-State

As it stands now, this is largely done through posting pictures. Unfortunately, this creates headaches for newer users...

@jdblischak
Copy link
Contributor

@jdblischak jdblischak commented Feb 20, 2019

It would also be convenient if local settings (e.g. in a directory containing an .Rproj file) would override any global settings, e.g. how a local .gitconfig combines with the settings in the global ~/.gitconfig file.

@Zedseayou
Copy link

@Zedseayou Zedseayou commented Apr 5, 2019

Not sure whether this is a common use case for others, but when my RStudio Server instances crash I often have to manually reset all options. Being able to import settings somehow would be great when creating new instances.

@jmcphers
Copy link
Member Author

@jmcphers jmcphers commented Jun 2, 2019

See here for another example of how configuration is shared in the absence of something like this:

https://drdoane.com/my-rstudio-configuration/

@JsizzleR
Copy link

@JsizzleR JsizzleR commented Jun 7, 2019

RStudio Server Pro customer requested, ticket 37036

@jdblischak
Copy link
Contributor

@jdblischak jdblischak commented Jun 11, 2019

Another useful option to include in a config file is how to filter the files that are displayed in the Files pane, as noted by @kevinushey in #3383 (comment)

@jmcphers
Copy link
Member Author

@jmcphers jmcphers commented Jun 11, 2019

This change won't add any new options; it will only change the way we store existing ones.

@Robinlovelace
Copy link

@Robinlovelace Robinlovelace commented Jul 14, 2019

Just to say, many thanks @jmcphers this will make lots of peoples lives lots easier when this is rolled-out. I'm planning on using it to create a custom docker image optimised for academic geographic research, with Rmd chunks evaluated in-line. One question: will we be able to set shortcuts through the plain text file?

Many thanks for this work in any case, looking forward to it being merged!

@jmcphers
Copy link
Member Author

@jmcphers jmcphers commented Jul 19, 2019

@Robinlovelace Good news, you don't need this change to set shortcuts; they are already customizable with plain text files. See this article for details: https://support.rstudio.com/hc/en-us/articles/206382178-Customizing-Keyboard-Shortcuts

@Robinlovelace
Copy link

@Robinlovelace Robinlovelace commented Jul 20, 2019

Great, thanks @jmcphers ! I guess setting Rmd chunks to evaluate in the console (not inline is what I meant) still requires this change?

@jmcphers
Copy link
Member Author

@jmcphers jmcphers commented Jul 21, 2019

Yes, that's correct.

@Robinlovelace
Copy link

@Robinlovelace Robinlovelace commented Jul 23, 2019

🎉 ! May be jumping the gun but, other than here, where is this new functionality documented?

@jmcphers
Copy link
Member Author

@jmcphers jmcphers commented Jul 23, 2019

There's an overview in the PR:

#5069

Later, this will be documented in more detail in the RStudio Server Administration Guide.

@AtomicNess123
Copy link

@AtomicNess123 AtomicNess123 commented Jul 19, 2021

Any progress in this enhancement?

@dpprdan
Copy link

@dpprdan dpprdan commented Jul 19, 2021

@AtomicNess123 It's documented for RStudio Desktop Pro (works the same for the Open Source version AFAICT) and RStudio Workbench née Server Pro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.