Re: Launch a user-process from daemon
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:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=NqmKW2+U0IKG9uOLyVQOV+lh5xLctGBzmhnuAO5L8rs=; b=VMfuo8lNNPHXKIsbT6eCDO8A4/S3Qwr50R1MnLQbmHHofuaiRwbB3IYa4d3GjwLVfg bWmEGMSxeixOemGNHgqdc/r92eQzyx+bV0yOzf715k7xjGKZkI7GCz8Uf66FPzPbtmwU uVV1+n8l349urkSsRP5gYs/Msk8fI3twMczB4= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=hU5esfmwwGyUru2FUzVsGy2C4wEejN7LCGUy5dyYgqLbKdP7RK9mGL5BiphHqw8Km8 CIy8QF8peEL0V/m7tplj7q/4A7CHDL6A4EckNXYt7J2JKcQwkIZUsYvv1PDMDf8SBVh2 L835zDMfODqX+Hs9h7HOp/ZKVqNcmF4eC3DJA= Hi Shawn, Thanks. Yes, you are right and I know it is not supported and I have written the agent to launch GUI. But this agents gets terminated when logs out, so this will not resolve the issue of getting error -10810. Regards rksinghal On Thu, Jan 22, 2009 at 12:34 AM, Shawn Erickson <shawnce@gmail.com> wrote:
On Wed, Jan 21, 2009 at 9:59 AM, Rakesh Singhal <rakesh.singhal@gmail.com> 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 (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