View Full Version : Launch X11 GUI app via Applescipt/Xcode?

noire anqa
Apr 5, 2011, 01:08 PM
Hi there,

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, 01: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, 05: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, 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, 07:19 PM
That's neat and it does work!

cat $DISPLAY opens X11.


noire anqa
Apr 27, 2011, 05:10 PM
That's genius ..

Thanks for all the help.