How to access environment variables in launchd plist
问题 I have a launchd per-user agent. In it's .plist, I would like to use the $HOME environment variable. Is it possible? (it is the "Program" key, which I would like to define as "$HOME/bin/myscript") 回答1: launchd doesn't perform any substitutions on the values in its .plists, so this can't be done in the form you're trying to do it. What you can do is hand the command you want to run to a shell, and let it perform the variable substitutions and run the command. For instance, you could replace