[launchd-dev] 10.4 & 10.5 LaunchAgent compatibility

Quinn eskimo1 at apple.com
Tue Feb 17 01:40:03 PST 2009


At 16:51 -0700 16/2/09, Steffan A. Cline wrote:
>So, as a work around I am trying to come up with a LaunchAgent that will
>load OpenOffice.org on boot and run consistently. It seems I have no choice
>to use LoginWindow and Aqua to keep it up regardless of whether or not a
>user is logged in. On 10.4.11 no matter what I do, it does not load at boot.

launchd agents are not useful on 10.4.x because they run in an 
inconsistent execution context.  This is called out in the "launchd 
Agents" section of DTS Technote TN2083 "Daemons and Agents".

<http://developer.apple.com/technotes/tn2005/tn2083.html#SECLAUNCHDAGENT>

I don't think you'll be able to get this to work in any reasonable 
manner on 10.4.x.  Certainly, you will not be able to do this on 
10.4.x using launchd agent.  Rather, you'd have to use a combination 
of a system login item (to run during loginwindow) and a global login 
items (to run after login), neither of which is officially supported.

I'd recommend that you restrict this feature to 10.5.x users.

S+E
-- 
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware


More information about the launchd-dev mailing list