Re: Launching a GUI using execl()
Re: Launching a GUI using execl()
- Subject: Re: Launching a GUI using execl()
- From: Eli Bach <email@hidden>
- Date: Tue, 24 Feb 2009 14:23:21 -0800
On Feb 24, 2009, at 2:07 PM, Rakesh Singhal wrote:
When I execute this code, it launches the GUI every time but sometimes
properly and sometimes not properly. Not properly means here, when it
launches I face following issues:
1. I can not go to GUI using command + tab, cause it does not show
there.
2. When it launches, it does not show on front of all applications.
3. I can not quit it using command + q, if I try command + q, it
terminates other GUI application which is also running on system. I
can use mouse to click on red cross to close it or from activity
monitor, I can quit it.
I do not faces these issues when it launches it properly.
I can not use launch services APIs cause LaunchServices framework is
not daemon safe.
Please advice.
I swear we've answered your question before.
Simply put, you can't reliably launch a GUI application directly from
a system-level daemon (that is, a daemon that was launched from /
Library/LaunchDaemon/).
1. How do you know a user is logged in to interact with your UI? Or
are you just going to put up windows and menus over the Login dialog
[and your app winds up running as the root user, which is a bad
thing(tm)]?
2. Which user should see the UI if multiple users are logged in?
3. You need to launch your app from within the the user's session.
Ie, from, say a tool launched from /Library/LaunchAgents/ (there are
other methods to get the tool launched in the user's session on
earlier OS's). Google is your friend.
_______________________________________________
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