[OS X TeX] Staying on the right PATH (or something)

Peter Dyballa Peter_Dyballa at Web.DE
Wed Nov 14 11:14:10 EST 2007


Am 14.11.2007 um 15:50 schrieb Morten Høgholm:

> This works on *nix as well but not on OS X even though latex is of  
> course in the PATH.

An Aqua application in Mac OS X does not inherit its process  
environment from the login shell (check with pstree or ps). Any PATH  
settings in /etc/profile or /etc/csh.login etc. do not change the  
process' environment – because it was not a shell that launched it.  
The means to overcome this is to use a relict from the NeXT:  
~/.MacOSX/environment.plist.

See also http://developer.apple.com/qa/qa2001/qa1067.html!

With Apple's DeveloperTools package comes /Developer/Applications/ 
Utilities/Property List Editor.app. The Public Domain offers other  
GUIs like PlistEdit Pro (http://homepage.mac.com/bwebster/ 
plisteditpro.html), PrefSetter (http://homepage.mac.com/darkshadow02/ 
apps.htm#prefsetter) and the PLTools (http://www.macorchard.com/ 
PLTools/) for the command line. On the command line you can use:

	defaults write ~/.MacOSX/environment CVS_RSH ssh

or

	defaults delete ${HOME}/.MacOSX/environment DISPLAY

and also from shell scripts:

	export DISPLAY=$(defaults read ${HOME}/.MacOSX/environment DISPLAY)

or

	setenv DISPLAY `defaults read ~/.MacOSX/environment DISPLAY`


Since ~/.MacOSX/environment.plist is read only once at login time,  
any changes to ~/.MacOSX/environment.plist later do not effect a  
process' inherited environment. Nevertheless you can use ~/.MacOSX/ 
environment.plist as a semaphore file – as long as you actively set/ 
delete and read values, as I do for Apple's X11.

--
Greetings

   Pete

A lot of us are working harder than we want, at things we don't like  
to do. Why? ...In order to afford the sort of existence we don't care  
to live.
                                    -- Bradford Angier





More information about the MacOSX-TeX mailing list