Re: login item for all users
Re: login item for all users
- Subject: Re: login item for all users
- From: Chad Jones <email@hidden>
- Date: Thu, 17 Feb 2005 21:02:25 -0600
On Feb 17, 2005, at 4:27 PM, Finlay Dobbie wrote:
On Thu, 17 Feb 2005 15:01:02 -0600, Chad Jones <email@hidden>
wrote:
Is there any way to create a login item for all users?
Yes please email Apple DTS email@hidden and request the LoginItemAPI
sample code. This sample code shows how to add LoginItems for a
single user as well as for all users on the system. It is the "Apple
recommended" way of solving your particular problem. DTS will not
bill you a incident and will give you the sample code free of charge.
Assuming you'd like to know how:
<http://www.bombich.com/mactips/loginhooks.html>
Honestly, I'm tired of seeing the loginhook recommended. It is one
of the the worst of all methods available to solve these problems for
3rd party developers. Loginhook only allows one program to register
for the hook which makes it unsupportable like the old Mac OS 9
patching/trapping APIs of old. Many developers never had to live
through the "patching hell" of Mac OS 9 so they are unaware of the
problems that come with it. The lessons learned from Mac OS 9 are
why the LoginItem and similar mechanisms exist on MacOSX (so we never
have to return to those problems).
Probably not the best solution. I wonder if mach_init_per_user.d
would work?
3rd party developers should never edit this file. Incorrect editing
of this file can damage the system software to the point where Mac OS
X does not even boot. You don't want your product known as the one
that brought a user's system down to its knees. Again there are
other, better mechanisms available. In this case use LoginItems.
It's not a file, it's a directory. It's also somewhat documented in
the booting/startup conceptual docs.
-- Finlay
Finlay is right, I misspoke on the mach_init mechanism. For some
reason I thought a completely different mechanism was being referenced.
Next time I will have to read/recall more clearly. Sorry about that
mix-up. :-) To be clear mach_init_per_user.d IS a valid startup
mechanism for daemons which replaced StartupItems as of 10.3.x.
Of course for launching LoginItems for all users (the specific problem
being addressed) the solution is still to use the LoginItemAPI provided
via Apple DTS (and avoid loginhook) as I mentioned previously. :-)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden