Until I upgraded to Mountain Lion I was able to add login items by editing this plist:


And adding items (path,name,hide) to AutoLaunchedApplicationDictionary dictionary.

In the OS this doesn't work anymore. Items that are added to this dictionary are not launch on login.

I see that the save now the login items in a file called com.apple.loginitems.plist, but I dont undersand how to add an item to this file.

I tried to add the item to CustomListItems dictionary with parameters like name,path, hide, but they were not launched on login.

Does anyone know how can I add from code login item?


You can still use AppleScript:

osascript -e 'tell app "System Events" to make login item at end with properties {path:"/Applications/iTunes.app", hidden:true}'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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