7

I am using SMLoginItemSetEnabled to launch an app on login. Everything works fine, except that the App does not show under "Login Items" in the "User Preferences" window. I have tried this in OS X Lion.

  1. Is this the expected behavior?
  2. Is there a way to manually stop the App from launching on login? I can't find anything in /Library/LaunchDaemons or /Library/LaunchAgents.

1 Answer 1

13

This is expected behavior. Apple Daemons and Services Programming Guide says:

Login items installed using the Service Management framework are not visible in System Preferences and can only be removed by the application that installed them.


Yes, just change Disabled to true for your bundle identifier in launchd's overrides.plist. I wrote you a command to do just this:

/usr/libexec/PlistBuddy -c 'Set :com.yourcompany.helper-CFBundleIdentifier-here:Disabled true' /var/db/launchd.db/com.apple.launchd.peruser.$UID/overrides.plist
  • Note: Replace com.yourcompany.helper-CFBundleIdentifier-here with your BundleIdentifier.
1
  • 7
    heads up: looks like 10.10 now uses /var/db/com.apple.xpc.launchd/disabled.$UID.plist to keep track of enabled/disabled state.
    – rentzsch
    Commented Jan 25, 2015 at 3:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.