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.