Re: launch-on-demand from a cocoa app
Re: launch-on-demand from a cocoa app
- Subject: Re: launch-on-demand from a cocoa app
- From: Greg Parker <email@hidden>
- Date: Thu, 14 Feb 2008 14:45:20 -0800
On Feb 14, 2008, at 10:52 AM, Drew McCormack wrote:
I've got a Cocoa launcher that starts up an X11 program. The problem
I have is that for some reason, the magic /tmp/launch... DISPLAY
variable is not set when the Cocoa app launches. Instead, DISPLAY
gets set to 'localhost'.
If you're running your Cocoa app from Xcode, there's a known Xcode bug
that sets DISPLAY to 'localhost'. Running your app from the Finder
should work if this is the bug you're hitting.
This should be fixed in a future Xcode update. You might be able to
work around it by disabling Xcode's SCM+SSH support. You might be able
to work around it by hacking the string "DISPLAY" to "DISPLAZ" in
DevToolsInterface.framework (but this might totally break Xcode).
Why does a bash shell in Terminal get the magic DISPLAY variable
set, but a Cocoa app not?
The value is set by launchd when it creates processes, and is
inherited by child processes unless the parent changes it. In the
Xcode bug case, Xcode inherits the correct value but then incorrectly
resets it, breaking any children launched later.
--
Greg Parker email@hidden Runtime Wrangler
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden