Re: Launching a GUI using execl()
Re: Launching a GUI using execl()
- Subject: Re: Launching a GUI using execl()
- From: Rakesh Singhal <email@hidden>
- Date: Wed, 25 Feb 2009 06:36:03 +0530
Thanks Eli. I am using SCDynamicStoreCopyConsoleUser() api to know
about the current user. The daemon does not need to communicate with
agents. If agents can launch the GUI properly whenever it is required
using launch services framework, then my problem is solved.
Regards
On Feb 24, 2009, at 3:55 PM, Rakesh Singhal wrote:
Thanks a lot. Sorry for trouble. My answers are as follows:
1. Child process is not going to run as root. My intention is child to
run as user. I am setting the uid and gid of current user using
setuid(), seteuid(), setgid() and setegid() APIs.
>From the context of the daemon, how it is going to figure out who the
current user is?
3. Before launching the GUI, I am checking that if any user is logged
in or not. If not then I do not launch.
What about when multiple users are logged in?
4. I want to start my GUI app through a background app. I am using
daemon app for this purpose and for some other functionality also. I
choose daemon cause it does not get terminated when user logs out,
that I need for other functionality.
To launch GUI, I can use launchAgents then I will need to use both
daemon and agents. But now I have one query that when user logs out
the agents will be terminated and when user logs in again then?
Your daemon needs to communicate with one or more agents, which in
turn perform the operation, such as launching a GUI app, on the
daemon's behalf.
The daemon and the agents (as there may 0 to n agents running at any
time, and they come and go when users log in and out) need to work
together to figure out which user should be interacted with.
Alternately, you could outsource this work to a more experienced Mac developer.
_______________________________________________
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