Setting .plist path to user Library I have created a OS X launch agent that is installed per user. It is listening socket and automatically launched when socket connection arrives. On my .plist I have

    &lt;key&gt;ProgramArguments&lt;/key&gt;
    &lt;array&gt;
&lt;string&gt;~/Library/Containers/com.mycompany.myproduct/myproduct.app/Contents/MacOS/myproduct&lt;/string&gt;
    &lt;/array&gt; 


When connecting to my launch agent socket I get a message in console saying my launch agent is not found. When changing .plist ProgramArguments to

&lt;string&gt;/Users/myusername/Library/Containers/com.mycompany.myproduct/myproduct.app/Contents/MacOS/myproduct&lt;/string&gt;


Launch agent is loaded correctly. So it looks like I need to modify .plist for each user during launch agent installation. How can I do this automatically or easily? Is there a standard way for this? Or should I do something totally differently here to achieve what I want?
Use EnableGlobbing:

&lt;key&gt;EnableGlobbing&lt;/key&gt;
&lt;true/&gt;
&lt;key&gt;ProgramArguments&lt;/key&gt;
&lt;array&gt;
    &lt;string&gt;~/Library/Containers/com.mycompany.myproduct/myproduct.app/Contents/MacOS/myproduct&lt;/string&gt;
&lt;/array&gt; 


It works with ProgramArguments but not with Program.