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

Paul Roebuck roebuck at mdanderson.org
Sat Apr 8 00:19:10 CEST 2006


On Fri, 7 Apr 2006, Simon Urbanek wrote:

> 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.

True. I just run my "check" and "INSTALL" from Terminal.app
so this has never caused me any issues. And on regular Un*x,
xterm would have been launched by the shell. Since R.app
reads .Renviron anyway, this method has been adequate for
my multi-environment needs; if you use other Mac OS X
applications, the Mac-specific environment.plist route
is the way to go.

Must admit to being surprised about 'open' though. Would
have thought that (when run from Terminal.app) would have
passed on the shell's environment.

----------------------------------------------------------
SIGSIG -- signature too long (core dumped)



More information about the R-SIG-Mac mailing list