View Full Version : Launch X11 GUI app via Applescipt/Xcode?
Apr 5, 2011, 02:08 PM
Is there any way to run an X11 gui app by launching it from a native mac app, cocoa or applescript cocoa?
We're hoping to distribute a mac build.
Apr 5, 2011, 02:14 PM
FWIW MATLAB does this. Their launcher starts X11 and then opens the other Windows.
I suppose they may use system or NSTask to launch X11.
Apr 5, 2011, 06:40 PM
X11.app will autolaunch as soon as a program tried to connect to it. You'll notice on Mac OS X that DISPLAY is not the usually 127.0.0.1:0, but a path to a filesystem socket. When this socket is opened X11.app will launch. Try catting the filesystem socket and you'll launch X11.app.
Apr 5, 2011, 08:19 PM
That's neat and it does work!
cat $DISPLAY opens X11.
Apr 27, 2011, 06:10 PM
That's genius ..
Thanks for all the help.