[R-SIG-Mac] Setting environment variables, especially http_proxy and ftp_proxy

Simon Urbanek simon.urbanek at r-project.org
Fri Apr 7 23:43:04 CEST 2006


On Apr 7, 2006, at 4:38 PM, Paul Roebuck wrote:

> The only problem I had with using .Renviron was that the setting  
> for R_LIBS (which I set in that file) was not available to the  
> command line invocations for running check and INSTALL.
>
> But even that is easily fixed as the format of .Renviron is the  
> same as that of POSIX shell .profile. So in your .profile, import  
> the desired portion of the R environment to your shell as well.  
> This solution works on Mac OS X as well as any Un*x-based setup.
>

Just a quick warning: this works only for the login shell, but not  
for anything else (including the R GUI, xterm, Emacs, etc.). This was  
Doug's point - .profile is useless for this. Even system profile is  
not run in xterm (surprise), Emacs or R-GUI, so you have to be very  
careful where you set the variables. The .MacOSX/environment.plist  
albeit less flexible has the advantage of applying to all  
applications launched by LS, so that's pretty much everywhere except  
for remote invocations. Of course, anything you start manually from  
the shell will inherits the environment, but not if 'open' is used.

Cheers,
Simon



More information about the R-SIG-Mac mailing list