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=YMTzoUChUD2Y2pm3UHE/WIxnYmZ4BqSRBdlld6CcfAI=; b=QyVRijOlTOF/myIHwPJTp3hlfJKXyuIjLnZxPnl2vLsF5lk+Pr7botVPcMCGKVlraH kF1vPkTmr90xgOZGt67NzrjyndNuifbgA8eEOVLGArUSVdG7PNp49LS3FBkUTpB3ZHSg 5d0uBTtmWVB3Gcxut0QE4PjalEV+Fd1G4m0/A= 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=SebcmqtLWoQpLKUjDHt/oeWayzXkWO1VslU0/DQZiemU7qVz6cB6AsVsu56j/O4fuV ToneOe3uthE7eBA6PIwiXeyeDesWQg9OqxIi6lAzqdNj4cyDlIRbZDTw/q0hvtIKgHtN LuE5aLnQ6DZ7ujUVQrwmbvkhr8wKqowst45EQ= 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)
-
Shawn Erickson