Join the Stack Overflow Community
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

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.
share|improve this question
up vote 2 down vote accepted

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.
share|improve this answer
3  
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 Jan 25 '15 at 3:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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