4

I am looking for the command to invoke RStudio from Linux. I VNC into the linux system and don't see any other option to launch RStudio from the gnome-terminal. I know R files can be directly read in the terminal, but I searched and couldn't find any command to invoke RStudio.

Surya Ramaraj
  • 41
  • 1
  • 1
  • 4

3 Answers3

3

Are you referring to the RStudio desktop version, or the server instance? The former is started by just calling rstudio:

edd@rob:~$ type -p rstudio
/usr/bin/rstudio
edd@rob:~$

The latter is always running and started as system process:

edd@rob:~$ systemctl status rstudio-server
● rstudio-server.service - RStudio Server
   Loaded: loaded (/etc/systemd/system/rstudio-server.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2018-07-15 20:12:01 CDT; 1 weeks 1 days ago
 Main PID: 1665 (rserver)
    Tasks: 3 (limit: 4915)
   CGroup: /system.slice/rstudio-server.service
           └─1665 /usr/lib/rstudio-server/bin/rserver

Jul 15 20:12:00 rob systemd[1]: Starting RStudio Server...
Jul 15 20:12:01 rob systemd[1]: Started RStudio Server.
edd@rob:~$

If you want to access the latter you do not need VNC. Just point your browser at port 8787 on that machine.

Dirk Eddelbuettel
  • 360,940
  • 56
  • 644
  • 725
  • Is it possible for Rstudio server to have multiple sessions on different ports? For example, I have two different users and I need each user to be able to access RStudio through web browser. For example, user A accessing RStudio on port 8787, user B on port 8888. – Afiq Johari Feb 24 '20 at 13:10
  • Multiple users have _always_ been supported. But per server you only get one session _per user_ but possibly dozens of sessions for dozens of different users. – Dirk Eddelbuettel Feb 24 '20 at 13:27
  • Noted, do you have any good references on how can I allow multiple sessions for different users? Currently the session is only accessible through port 8787, which means only 1 user can access it at one time. – Afiq Johari Feb 24 '20 at 13:45
  • I asked the same here https://stackoverflow.com/questions/60373624/launch-separate-rstudio-session-on-a-different-port but so far no ready answers. Official Rstudio doc also has no mention about multiple sessions https://docs.rstudio.com/ide/server-pro/access-and-security.html#network-port-and-address – Afiq Johari Feb 24 '20 at 13:47
  • I (and I suspect many others) just fired up additional machines. Also note that you can _of course_ run multiple instances of RStudio desktop on an appropriate machine---I am on Linux so having only one RStudio server is no bottleneck as I can run multiple RStudio desktops (besides the multple R-in-Emacs-via-ESS sessions). – Dirk Eddelbuettel Feb 24 '20 at 13:56
  • Yeah, sure firing up additional machines is way easier but I don't have that luxury :D. Just to be clear, it's not one user having multiple sessions, but multiple users accessing multiple RStudio server sessions on the same server. But I guess, it's far easier to just go back to my manager and request for additional machines for simplicity sake haha – Afiq Johari Feb 24 '20 at 14:09
  • I _think_ RServer Pro may also offer it which is why RStudio may be reluctant to give this to you for free. Anyway, as I tried to point out a few times by now, you already have alternatives. – Dirk Eddelbuettel Feb 24 '20 at 14:16
2

Have you tried to launch it from here ?

/usr/bin/rstudio

PS : You need R to be installed on the system too.

2

On Arch the command is

rstudio-bin