How to add login Elements by code to osx mountain lion

I want to add code entry elements to Mountain Lion (10.8).

So far, I have been able to add input elements by editing this plist:

/Users/test/Library/Preferences/loginwindow.plist

and adding elements (path, name, hide) to the dictionary AutoLaunchedApplicationDictionary in the OS no longer works. Items added to this dictionary do not start at logon. I see that the input elements are saved in a file with the name:com.apple.loginitems.plist

but I don’t understand how to add an item to this file. I tried to add an element to the dictionary CustomListItemswith parameters such as name, path, hide, but they were not started at the login.

Does anyone know how I can add from a login element?

+5
source share
2 answers

, , .

OS X , loginwindow.plist. Apple , LaunchAgent LaunchDaemon .

Mountain Lion, - launchagent. .plist, , OS X a) (: /some/program.app), b) (: , ..)

Apple LaunchAgents .

0

:

, Sandbox:

, SMLoginItemSetEnabled ( ServiceManagement/SMLoginItem.h), " " .

( Sandbox , LSSharedFileList.h. , LSSharedFileListInsertItemURL. , , LSRegisterURL.)

...

0

All Articles