[R-SIG-Mac] user environment not respected by GUI

Byron Ellis ellis at stat.harvard.edu
Thu Dec 23 09:48:45 CET 2004


This isn't actually a problem in R, its due to the fact that 
LaunchService doesn't launch apps through a shell so your profile never 
gets sourced. Instead it gets the environment from the 
Environment.plist file.

More info here: http://developer.apple.com/qa/qa2001/qa1067.html


On Dec 23, 2004, at 12:42 AM, joerg van den hoff wrote:

>
> only a tiny problem:
> the search path for system (unix) commands in the GUI differs from the 
> path of the user, as I noted when trying to generate a file list for 
> further processing with something like
>
> R> flist <- system("locate *.dat",intern=T)
>
> that works fine (even without protecting the `*'...), problem was, 
> that the command uses obviously /usr/bin/locate, despite the fact that 
> in my user search path /sw/bin/locate is found before /usr/bin/locate 
> (and uses a different default database). I have now simply specified 
> the absolute path but it would be nicer to have consistent search 
> paths for system commands (I possibly would'nt have noticed, if the 
> other locate database would have contained older versions of equally 
> named data files (with possibly obsolete content) and _that_ could 
> cause trouble).
>
> so, within the GUI I get
>
> R> system('echo $PATH')
> /usr/bin:/bin:/usr/sbin:/sbin:/Users/vdh:/usr/local/bin
>
> i.e. $HOME/.profile (or in my case .cshrc) are bypassed.
>
> question: where is the search path set for the GUI? can I change it?
>
> regards,
> joerg
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>
---
Byron Ellis (ellis at stat.harvard.edu)
"Oook" -- The Librarian



More information about the R-SIG-Mac mailing list