Re: CFUserNotificationCreate does not work from daemon started via launchd
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