Score:1

How do you remotely log into RStudio Server (Open Source) as an admin?

cn flag

This is largely an RStudio Server question, but I'm performing these operations in Ubuntu, so posting here as well.

I'm running RStudio Server Open Source (version 2021.09.0+351, Ghost Orchid) on a Linux server (Ubuntu, 18.04. 6 LTS, Bionic Beaver). I have 2 accounts on the server, both of which have sudo privileges. I'm trying to update the default library path on one of the accounts (using the "Tools/Install libraries..." dialog; see here), but when I open the dialog, I cannot specify a different library path. To address this, I'm trying to run RStudio Server as an admin remotely on my server. How do I do this?

I could not find a solution to this in the RStudio Server documentation. This page recommends specifying the r-libs-user field in the /etc/rstudio/rsession.conf file; however, even after doing this and restarting rstudio-server, the default library path for the user in question remains unchanged.

Thanks for any help.

David avatar
cn flag
Something missing. Is there not a VM involved here?
akoontz11 avatar
cn flag
No, no VM. Just RStudio Server running on a Linux machine.
Score:0
zw flag

As for me, you are solving problem using wrong method.

You have to create shared library folder for both users

sudo mkdir -p /var/R-packages
sudo chown -R user1:user2 /var/R-packages
sudo chmod -R u=rwx,g=rwx,o=rwx /var/R-packages

and then install R packages there by commands like

install.packages('bookdown', repos='http://cran.rstudio.com/', lib='/var/R-packages')

using any user1 or user2 account.

Then you'll need to inform RStudio about this custom R packages library by commands like shown below:

p <- .libPaths()
p <- c(p, '/var/R-packages')
.libPaths(p)

require(bookdown)
akoontz11 avatar
cn flag
Thanks @N0rbert. I agree with the suggestion of using shared library folders across users--this is probably the most logical solution. I was looking for a means of changing default libraries using the RStudio interface, but `.libPaths()` seems to be the best means of achieving this.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.