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.
/Library/LaunchDaemons
or /Library/LaunchAgents
.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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With