I have installed CL on wsl2 (windows 10), and I have been trying to run R-studio-server.
When I did
sudo rstudio-server start
I get the following message
sudo: rstudio-server: command not found
My question is …
Is it possible to run rstudio-server in this environment? (if I remember correctly, rstudio-server was running fine with Ubuntu on wsl2.
FYI;
R-basic, R-datasets, R-extras, R-rstudio, R-rstudio-server, R-stan are all installed
rstudio seems to be installed as I get the following error “qt.qpa.xcb: could not connect to display”, which I can understand as wsl2 does not support gui apps with Windows 10.
i dont know how the wsl file hierarchy works, but it seems that you need to execute what would normally be /usr/lib64/R/rstudio-server/bin/rserver
there is also an executable /usr/lib64/R/rstudio-server/bin/rstudio-server
If you have no special reason, I recommend Ubuntu on WSL, not CL. And install with apt packages provided by rstudio.org as the official support mentions above. They always provide latest and stable version of RStudio.
Thank you very much to all. You guys are awesome. Let me close this thread by summarizing what I did below for those who do not know nothing about Linux but who want to check out and use Rstudio in CL on wsl2:
There are at least two ways to run Rstudio (wsl2 on Windows 10)
Final comments
Of course, you can always use Rscript to run your script from the command line.
From my limited experience,
Running R on WSL2-Ubuntu was faster than running R on WSL2-CL. For R on WSL2-Ubuntu, I did something to use openblas in R. For R on WSL2-CL, I just used it out of box as it already offers R with openblas.
This is based on two experiments.
One with the R benchmarking script from (version 2.5): R benchmarks (r-project.org)
Another with my personal Rpackage that heavily relies on Rcpp and Rcpparmadillo.
Tested with Intel i9-10980xe at 3.0ghz with 48Gb memory
To answer your question. There are several reasons:
(1) I am developing several R packages (using machines running on Windows and OSX). I wanted to see how these packages would behave on Linux.
(2) I am trying to learn Linux a little by little by myself. I’d love to move away from Windows at some point in the future (probably, it is not going to happen in the near future, though …). I thought that WSL2 was good for this goal as I can try several distros to get some feeling about them.
I see. I thought that WSL was a contributing factor for this. But, it seems that it may not be just me and my machine. In any case, I am too novice to tell what is going on and how to make it better. In any case, it has been fun experience playing around with multiple Linux distros.
I might be able to compare performance of my Julia code across different platforms in couple of weeks. I will keep you all posted.