• 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: alert from a daemon?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: alert from a daemon?


  • Subject: Re: alert from a daemon?
  • From: Nicko van Someren <email@hidden>
  • Date: Mon, 21 Jan 2008 17:24:11 +0000

On 21 Jan 2008, at 09:54, Adrian Ross wrote:

Following up...

Mitch was good enough to point me towards CoreFoundation/ CFUserNotification.h. The function CFUserNotificationDisplayNotice does the trick, although it has no effect unless run by an administrator.

Hmm, my daemon runs as "nobody".

If your daemon is running as Nobody then it may well not have the necessary permissions to install a new version of itself.


I suggest that you write a small, by default faceless, GUI launchd agent. Install it in /Library/LaunchAgents, so that it can be used by all users. Using a combination of the RunAtLoad key and the WatchPaths key in the launchd.plist file you can have the agent start up when the daemon has a new version to install and bring up a GUI as needed. It can then ask the user to authenticate in order to elevate privilege and run a tool which will stop the daemon, install the new version and restart the new daemon.

Cheers,
	Nicko

_______________________________________________

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


References: 
 >alert from a daemon? (From: Adrian Ross <email@hidden>)
 >Re: alert from a daemon? (From: Adrian Ross <email@hidden>)

  • Prev by Date: Re: Delegates - I give up
  • Next by Date: Using WebKit to Download Binary Files
  • Previous by thread: Re: alert from a daemon?
  • Next by thread: Re: alert from a daemon?
  • Index(es):
    • Date
    • Thread