Re: Launching a GUI using execl()
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=PUKvuYWGeBvLdOlfadX+nBXbEm9aoV67OroHVBXJhT0=; b=nnQThT1pDqgSml4s9N+1lmrU6FXiDl9Kh79TYyS/DlQ1B7+nn6/E25Y9IlYC94T5Od IEyEkQYlfOnidAIBa1EDpU8vRBKcn6NpTjCeZpI7uzK/Hx5UWhp17hv9tcvLcxXf/uKR fYEZEw9BUMarDXOX6kKgFHQMd1p+Hh9wW/hT8= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=J8ZGPJ/Yraxbh+wacs9BoODyCSSSl9Yd1ZeqtFXVPEyxcrpm0GewOx3Qi6YfCyXWyu +S+eVN8mO5xIBdJN2Z5ft69U98tbMgpjMjyvNtD4rs2wxEnHBy8oDXc26ea2ZZnBfL+a PZ9QBtD7CGgQlaakNWK7lhshEGly2xklNugaE= 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 (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Rakesh Singhal