Disabled key in launchd plists

René J.V. Bertin rjvbertin at gmail.com
Thu Sep 15 16:01:20 UTC 2022

On Thursday September 15 2022 10:07:24 Ryan Schmidt wrote:
>Apple's default value of Disabled is false, which means (according to the documentation I read) that the service will be started automatically the next time the system starts up

Or the user logs in, for agents. That's what I thought too until recently, but the manpage also says 

"This document details the parameters that can be given to an XML property list that can be loaded into launchd with launchctl."

The launchd manpage confirms this by stating that
"The primary and preferred interface to launchd is via the launchctl(1) tool which (among other options) allows the user or administrator to load and unload jobs."

But it also says 

"Where possible, it is preferable for jobs to launch on demand based on criteria specified in their respective configuration files."

which could imply that jobs can get loaded by simply being in the proper directory.

It is true for instance that I moved the XOrg plists out of its directory as part of getting a "normal" DISPLAY variable, but it's perfectly possible that simply having unloaded the plist was enough.

I have the launchd sources so I suppose I could dive in there and try to answer this once and for all...

>, but we want the plists our ports install to be disabled until the user enables them.

But would launchd even look where MacPorts installs these plists? I suppose it doesn't...

BTW, all this is in the context of "rebooting" a launchd rewrite (relaunchd) for Linux, so my "LinuxPorts" ports can also install directory watchers etc.


More information about the macports-dev mailing list