Re: Regarding launching an application at startup of mac.
Re: Regarding launching an application at startup of mac.
- Subject: Re: Regarding launching an application at startup of mac.
- From: Ryan McGann <email@hidden>
- Date: Wed, 24 Jan 2007 20:40:35 -0800
That is a much larger problem. If you have an installer, you can
modify the loginwindow.plist from inside a tool run by the
installer's postinstall script.
If you don't use an installer to install your software there are a
number of ways to go about this. Most involve using Authorization
Services to launch a tool as root after the user is prompted for
their username/password. See http://developer.apple.com/documentation/
Security/Conceptual/authorization_concepts/index.html. Also see the
MoreSecurity sample code.
Ryan
On Jan 24, 2007, at 4:07 AM, Amit Jain wrote:
Thanks Ryan,
I have done the same thing as u suggested and it worked.I added my
application path into /Library/Preferences/loginwindow.plist but
programmatically i am facing some problem as loginwindow.plist file
is having its owner as root.Can you suggest me or provide me some
code so that i can write my app path into the file and then revert
the owner as root.
Thanks...
@mit...
On 1/21/07, Ryan McGann <email@hidden> wrote:
> I have done every thing i.e. now i can launch the appplication thru
> launchd
> as launchAgents but the only problem i am facing now is that this
> application is not launched when i log off and login again with
> same user. I
> get this error :
> CFLog (0): CFMessagePort: bootstrap_register(): failed 1103
> (0x44f), port =
> 0x3303, name = 'com.yourcompany.iTunesDroper.ServiceProvider'
> See /usr/include/servers/bootstrap_defs.h for the error codes.
LaunchAgents are broken in Tiger. They have a variety of errors,
including the one you're seeing. I believe Apple has promised to fix
them in Leopard but I agree it's quite frustrating. In Tiger you must
use LoginItems.
To add your application as a loginitem, look in /Library/Preferences/
loginwindow.plist. You'll need to add a dictionary to the array of
dictionaries in there. The plist file is pretty self explanatory.
Ryan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden