[R-SIG-Mac] [R-SIG Question] Starting R on System Startup

Simon Urbanek simon.urbanek at r-project.org
Fri Nov 21 19:17:21 CET 2008

On Nov 21, 2008, at 11:42 AM, brendan veeneman wrote:

> Hi R people,
> I have a Mac OSX server (it's basically a very fast desktop) running  
> R that I'd like to set to run automatically on system reboots.  I  
> tried using the system startup items as I had with other  
> applications, but for whatever reason R wouldn't take.   
> Interestingly, it sent the standard booting information ("Welcome to  
> R",etc) to the system console, though by the time I could check the  
> process list it was never running.

I think you're adding the wrong thing - clearly adding the R itself is  
useless since it will just show what you saw and exit since it has  
nothing to do.

I have still absolutely no idea what are you trying to do. R is an  
interpreter so running it on startup makes no sense unless you have a  
script to run. If you want to run the R.app GUI, that's whole another  
story and that should work just fine with startup items.

> Do any of you administrate R on OSX?  I've heard some things about a  
> new mac startup interface called launchd - does this work for R?

Of course, but this has nothing to do with R ... I suspect that you're  
mixing up several concepts here ...

>  I know StartupItems is deprecated but I figured I'd check if it was  
> possible in launchd before trying it.  I've searched online for this  
> information for a couple weeks but couldn't find it (for some  
> reason, googling the letter R and the word startup or boot wasn't  
> very fruitful), so I turn to you.  If the answer to this question is  
> RTFM, I don't know where to access that information, so help pages  
> would definitely be appreciated too.
> As a corollary to this, I should also be able to require and run  
> Rserve from the R startup files too, right?

Sure, but why would you do it in such a convoluted way? You can start  
Rserve directly right away (see R CMD Rserve) and you could easily do  
that via LaunchAgents ...


More information about the R-SIG-Mac mailing list