• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Launchd daemon and LSOpenApplication in Lion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Launchd daemon and LSOpenApplication in Lion
      • From: Kyle Sluder <email@hidden>
References: 
 >Launchd daemon and LSOpenApplication in Lion (From: Michael Domino <email@hidden>)

  • Prev by Date: Re: Symbol not found when compiling MM (ObjC++) file
  • Next by Date: Re: cleanly support drag-to-trash for uninstall?
  • Previous by thread: Re: Launchd daemon and LSOpenApplication in Lion
  • Next by thread: Re: Launchd daemon and LSOpenApplication in Lion
  • Index(es):
    • Date
    • Thread