Re: Launch a user-process from daemon
Re: Launch a user-process from daemon
- Subject: Re: Launch a user-process from daemon
- From: Shawn Erickson <email@hidden>
- Date: Wed, 21 Jan 2009 11:04:19 -0800
On Wed, Jan 21, 2009 at 9:59 AM, Rakesh Singhal
<email@hidden> wrote:
> I want to launch a GUI from daemon, when it gets device plugged-in
> notification. I observed following things while working on 10.4.11 ppc
> and 10.5.4 intel:
>
> 1. The daemon launches the GUI on 10.4.11 ppc when I start the system.
> Now if I log out and logs in and plug-in device again then it gives
> error -10810. I could not understand that why does this error come and
> how to resolve this.
Having a daemon launch a GUI application is not supported. It may work
by chance under certain situations but it simply is not supported.
> 2. If I first log in as root user and daemon launches the GUI. Now I
> close the GUI and switch to another user. Now if daemon launches the
> GUI then it gets launched in root user, not in current user. It shows
> same behaviour with all users.
Again what you are doing isn't supported.
You should consider using a launch agent configured to run in aqua
sessions. This launch agent will get run when a user logs into a
graphical session and terminated when they logout. It should contact
your daemon and decide if it needs to show UI to the user. Basically
launch agents can "up" communicate with launch daemons (this is the
supported way).
Read carefully... <http://developer.apple.com/technotes/tn2005/tn2083.html>
-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden