[launchd-dev] Working with overrides.plist

Damien Sorresso dsorresso at apple.com
Thu Sep 3 10:30:41 PDT 2009


On Sep 3, 2009, at 9:53 AM, Dean Shavit wrote:
> OK,
>
> I think I figured it out.
>
> Here's what I found:
>
> so if you're going to be using the override for a launchagent with  
> specified SessionTypes, you need to specify a different session  
> type  -  so:
>
> sudo launchctl unload -w -S LoginWindow /Library/LaunchAgents/ 
> com.most.vnc.plist
>
> That sets Disabled to true in the overrides.plist
>
> However, in Leopard, launchctl allowed specifying *any* sessiontype  
> in the plist to write the Disabled key
>
> so:
>
> sudo launchctl unload -w -S Aqua /Library/LaunchAgents/ 
> com.most.vnc.plist
>
> had the same result. However, in Snow Leopard, it generates an  
> error. This change was not documented, as far as I can tell. Does  
> anyone think this requires a bug report?


You must specify a session when you manipulate any job which has the  
LimitLoadToSessionType property set. If the session type you specify  
isn't one of the elements in LimitLoadToSession type, then launchctl  
won't do anything.

There is nothing tying modifying the overrides database to the session  
type you specify. If you've noticed a pattern, it's a result of the  
underlying implementation.
-- 
Damien Sorresso
BSD Engineering
Apple Inc.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2425 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/launchd-dev/attachments/20090903/0ef8b14b/attachment.bin>


More information about the launchd-dev mailing list