• 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: CFUserNotificationCreate does not work from daemon started via launchd
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFUserNotificationCreate does not work from daemon started via launchd


  • Subject: Re: CFUserNotificationCreate does not work from daemon started via launchd
  • From: Andrei Tchijov <email@hidden>
  • Date: Mon, 7 Nov 2005 17:46:11 -0500

Little bit more details. Application in questions runs as a part of shell script. Shell script gets started by launchd (and it runs as root) (...<key>UserName</key><string>root</string>...). Application itself runs as currently logged in user by means of "su - <user name> -c 'application command line'" . I am not sure if it is relevant, but if I ssh to localhost and then try to run the application in question, then it does not work as well. I looked into source code for CFUserNotificationCreate and it is trying to get some sort of SessionID ( "kCFUserNotificationSessionIDKey" ) from the dictionary. Is it the same thing as "SECURITYSESSIONID" environment var? Is it important? But then on other side, if I "su - root", I endup with env which does not have SECURITYSESSIONID in it, but my application still works.


On Nov 7, 2005, at 5:29 PM, Douglas Davidson wrote:


On Nov 7, 2005, at 2:25 PM, Andrei Tchijov wrote:

Could someone please shed some light on following problem. Snippet below works when I am starting my command line tool manually, but it does absolutely nothing when I am trying to start it using launchd.


Most likely the issue is that user notifications can be presented only by processes running as the current console user or as root.


Douglas Davidson

_______________________________________________ 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
  • Follow-Ups:
    • Re: CFUserNotificationCreate does not work from daemon started via launchd
      • From: Douglas Davidson <email@hidden>
References: 
 >CFUserNotificationCreate does not work from daemon started via launchd (From: Andrei Tchijov <email@hidden>)
 >Re: CFUserNotificationCreate does not work from daemon started via launchd (From: Douglas Davidson <email@hidden>)

  • Prev by Date: Re: AuthorizationExecWithPrivileges and /bin/cp
  • Next by Date: Re: Problems parsing plist files
  • Previous by thread: Re: CFUserNotificationCreate does not work from daemon started via launchd
  • Next by thread: Re: CFUserNotificationCreate does not work from daemon started via launchd
  • Index(es):
    • Date
    • Thread