Re: Launchd daemon and LSOpenApplication in Lion
Re: Launchd daemon and LSOpenApplication in Lion
- Subject: Re: Launchd daemon and LSOpenApplication in Lion
- From: Jens Alfke <email@hidden>
- Date: Fri, 05 Aug 2011 22:04:07 -0700
On Aug 5, 2011, at 1:52 PM, Michael Domino wrote:
> I run a launched daemon process that in turn launches a Cocoa app in the currently logged-in user's context via LSOpenApplication.
> On 10.5 and 10.6, LSOpenApplication launches my Cocoa app with no problems. On 10.7, I get the log entry:
> "com.apple.launchd: System: This API can only be used by a process running within an Aqua session."
> Does this mean that I can't call LSOpenApplication from a launched daemon in Lion?
Yup. I’m frankly surprised it even used to work in 10.5 and 10.6.
Basically, what Kyle said about using an agent process instead. That runs in the user’s login session so it can do stuff like launch apps in that session.
—Jens_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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