

Update: This does not work in version 10.8 at the moment. And of course one can put these files anywhere else, except the launch agent which must reside in /Library/LaunchAgents/ or ~/Library/LaunchAgents/.įinally, I should mention the sources I used as information on Launch Agents: I guess that things like globbing would not work as they do in this proposal. It should be mentioned that Apple intended a somewhat similar approach by putting stuff in ∼/nf, but it is currently unsupported as to this date and OS (see the manpage of nf). I think to remember that the definition of MANPATH using this method didn't work well, but I'm not sure. I am not sure how secure this solution is, as it uses eval with user provided strings. This is not accidental, as the file name should be feeded to the script by the launch agent as an argument, but that doesn't work.Īs mentioned here (German and behind a paywall!), it is possible to put the script in the launch agent itsself. The shell script has a #filename="$1" in it. Works fine for me (I should mention that I'm still a Snow Leopard guy), GUI applications such as texstudio and TeXShop can see my own tex tree. These are launchctl commands, see its manpage for further information. Finally, ~/.conf.launchd looks like that setenv PATH ~/Applications:"$"

Notice the call of path_helper to get PATH set up right. # skip lines that only contain whitespace or a comment The real work is done in the shell script /Users/Shared/conflaunchd.sh, which reads ~/.conf.launchd and feeds it to launchctl: #! /bin/bash One important thing is the RunAtLoad key so that the launch agent is executed at the earliest time possible. The launch agent used here is located in /Library/LaunchAgents/: For other solutions using the store of launchd, see this comparison. The solution uses the functionality of launchctl, combined with a Launch Agent to mimic the login hooks of old.
