[R-SIG-Mac] user environment not respected by GUI
joerg van den hoff
j.van_den_hoff at fz-rossendorf.de
Thu Dec 23 12:24:23 CET 2004
Byron Ellis wrote:
> 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
> 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')
>> 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?
>> R-SIG-Mac mailing list
>> R-SIG-Mac at stat.math.ethz.ch
> Byron Ellis (ellis at stat.harvard.edu)
> "Oook" -- The Librarian
thanks for the response.
obviously 'off list', but maybe some others have the same problem in
connection with using R on the Mac:
I generated the ~/.MacOSX/environment.plist file as described under
http://developer.apple.com/qa/qa2001/qa1067.html and the entry
(string originally on one line) fixes indeed the search path.
More information about the R-SIG-Mac