Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

/Users/test/Library/Preferences/loginwindow.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?

share|improve this question

1 Answer 1

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}'

share|improve this answer

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.