Open williamstein opened 4 years ago
A person suggested these names to me:
RAttic"? "RBitrary"? "RBuro"? "RCalc"? "RCalco"? "RCane"? "RDagio"? "RDeco"? "RDesk"? "RDesko"? "RDustio"? "RKaik"? "RLab"? "RLabo"? "RManiac"? "RMore"? "RPegio"? "RRival"? "RScenic"? "RStounding"? "RSudo"? "RTistic"? "RTuro"? "RVivo"?
Some thoughts. We need to:
RStudy
. The word "study" is a synonym for "studio" (they are both types of rooms), but it has a more "academic oriented" connotation, so it's a good name. We should automate this.If the server is installed, this script runs it. What's missing is to tie this up with these "named servers".
#!/usr/bin/env bash
if [[ ! -x /usr/lib/rstudio-server/bin/rserver ]]; then
echo "rstudio-server is not installed";
exit 1;
fi
PORT=${COCALC_RSERVER_PORT:-6006}
TMP=${TMP:-/tmp}/rserver
DATA="$HOME/.config/rserver"
mkdir -p $TMP/rserver
mkdir -p $DATA
cat <<EOF > $TMP/db.conf
provider=sqlite
directory=$DATA/db
EOF
exec env DISABLE_AUTH=true /usr/lib/rstudio-server/bin/rserver \
--server-daemonize=0 \
--auth-none=1 \
--auth-encrypt-password=0 \
--server-user=$USER \
--database-config-file=$TMP/db.conf \
--server-data-dir=$DATA \
--server-working-dir=$HOME \
--www-port=$PORT \
--www-root-path=/$COCALC_PROJECT_ID/server/$PORT/ \
--server-pid-file=$TMP/rserver.pid
Nice! Some comments:
/tmp/rserver/db.conf
will conflict with the other one? It would better to include the username in the tmp path, or even better put it in $HOME (since you never clean it up).does your script actually work?
I can use it like other servers, make a plot, run code, etc. Not sure what else you ask?
What's not working is support for more than one session. I suspect this only comes with the pro version.
I can use it like other servers, make a plot, run code, etc. Not sure what else you ask?
It doesn't even start for me without modifying the rstudio-server account that is created when installing the software from upstream. However, you don't specify at all how you install rstudio-server. My point is that this script could work for some ways of installing rstudio, and won't work for other ways.
Yes, multiuser is basically the key feature of rstudio server pro...
you don't specify at all how you install rstudio-server
I did step 3 on the page https://posit.co/download/rstudio-server/ when selecting "Debian/Ubuntu" at the top and then in the dropdown, "Debian 12 / Ubuntu 22"
RStudio does have a discussion about serving with a base url here - https://support.rstudio.com/hc/en-us/articles/200552326-Running-RStudio-Server-with-a-Proxy
That is absolutely critical to this working in cocalc, and Binder stuff won't help.
When we do this, legally (trademark) we have to probably build a modified version of RStudio that replaces the word "Rstudio" everywhere with some other word, e.g., "RCondo"? "RShed"? "RServer"?