If I understand the Leopard architecture correctly, you don't want
to mess around with /etc/bashrc to set additional paths. Rather,
add a new file to /etc/paths.d/ which contains _only_ the extra
search path. This should be included automatically in $PATH when
you start a new Terminal session, but won't work for R.app either.
This works fine, thank you. Please, is it possible to modify the
position where the new path will be inserted in $PATH? It is added
at the end of the string by default. I would like to insert in at
the beginning.
Good question, I'd like to know this myself!
Any Mac experts out there who can help us? Are the extra paths in /etc/
paths.d/ included alphabetically (by file name)? I suppose it's
intentional that they go _after_ the standard system directories,
otherwise you might mess up your OS X installation pretty badly ...
GMXUX-Ricardo-Rodriguez:.MacOSX rrodriguez$ cat environment.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd
">
<plist version="1.0">
<dict>
<key>M2</key>
<string>/usr/local/apache-maven/apache-maven-2.0.9/bin</string>
<key>M2_HOME</key>
<string>/usr/local/apache-maven/apache-maven-2.0.9</string>
<key>MAVEN_OPTS</key>
<string>-Xms256m -Xmx512m</string>
<key>PATH</key>
<string>$M2:$PATH</string>
</dict>
</plist>
GMXUX-Ricardo-Rodriguez:.MacOSX rrodriguez$
This looks pretty wrong to me, although I'm not really familiar
with Apple's property lists. You seem to assume that property lists
understand bash's $XXX notation for variable interpolation, which
I'm quite sure won't work. I suspect that you have to insert the
FULL, EXPANDED path list here, as printed when you type "echo
$PATH" in the Terminal.
This makes sense. Thanks for the tip. What I am not able to work out
now is to know how and why R.app is picking up this valeu for PATH...
> Sys.getenv("PATH")
PATH
"$M2:$PATH:/usr/local/bin"
It's obvious where you get the $M2:$PATH from -- that's what you've
specified in environment.plist. I don't know where /usr/local/bin has
been added, though. Perhaps something that R does automatically so you
always have access to the GNU Fortran installed with R?
I am not able to figure out where am I setting this value for PATH.
M2, M2_HOME and MAVEN_OPTS, the variable I've been dealing with, are
not set in the shell...
Well, they're set in your environment.plist file above. When you start
R.app, it gets its environment variables from this property list,
while the Terminal uses the "normal" .bashrc-based mechanism and seem
to ignore environment.plist.
Best,
Stefan
_______________________________________________
R-SIG-Mac mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac