I realize this is not specifically related to launchd but I was reading Technote 2083 about the following: "Global Login Item A global login item is a login item that is launched when any user logs in. Installing a global login item is roughly equivalent to installing that login item for all users on the system: every time a user logs in, loginwindow launches that user's login items and all global login items. In Mac OS X 10.5 and later you can install a global login item using the shared file lists interface to Launch Services." Questions: A) is there a better list to ask about this? B) can these be installed/managed the way normal login items are, via a plist (loginwindow.plist contains login items in the User Domain) in the Local Domain along with supplying the executables it points to? C) how is this support different in 10.5 vs. the editing of /Library/Preferences/loginwindow.plist, which has been possible in the past? I ask because I have specific needs for Global Login Items (i.e. items run in the user context at login time, often with a GUI, in contrast to LaunchAgents -- which don't work in Tiger -- and the LoginHook). Up until this point, it has been something of a workaround to run them (especially lacking MCX and a directory service), although it could be done. For example: <http://macenterprise.org/content/view/105/77/> Thanks! -- Jeremy
On Feb 21, 2008, at 7:29 AM, Jeremy Reichman wrote:
C) how is this support different in 10.5 vs. the editing of /Library/Preferences/loginwindow.plist, which has been possible in the past?
It's different because you're not supposed to touch prefs files that don't belong to you. Going through a higher level API isolates your code from the format of the property list so changes to that format will not break your code, nor will your code break the OS.
At 10:29 -0500 21/2/08, Jeremy Reichman wrote:
A) is there a better list to ask about this?
Not really. Questions like this typically go to the generic mailing lists (like cocoa-dev and carbon-dev), but I don't have the bandwith to read those lists (-:
B) can these be installed/managed the way normal login items are, via a plist (loginwindow.plist contains login items in the User Domain) in the Local Domain along with supplying the executables it points to?
Pretty much, yes.
C) how is this support different in 10.5 vs. the editing of /Library/Preferences/loginwindow.plist, which has been possible in the past?
Mac OS X 10.5 has a compatibility layer that synchronises the login items that you set up the new API with the login items in the preferences file. It works for per-user and global login items. This compatibility layer will go away in future system software. Do not directly manipulate login items (either global or per-user) if the new API is available. In general, I recommend the following: o Use the new API if it's available. o Alternatively, if your needs are simple, use LoginItemsAE. o If the new API is not available and LoginItemsAE is insufficient, then directly manipulate the preferences file. Just to be clear, if you directly manipulate the preferences file, you are likely to break on a post-10.5.x system. S+E -- Quinn "The Eskimo!" <http://www.apple.com/developer/> Apple Developer Relations, Developer Technical Support, Core OS/Hardware
participants (3)
-
Jeremy Reichman
-
Nathan Duran
-
Quinn