[Mono-osx] Launcher for applications requiring X11

Lee Turner lvturner at gmail.com
Wed Dec 6 09:27:42 EST 2006


First off this requires py2app, it can be done using a simple launcher
script but this is the code I have to hand.

Second off this is a bit of a hack, I'll fully admit to not really
knowing what I'm doing.

Thirdly, this still causes an X11 window to open up, although closing
it won't close your application.

I have only really checked this on Panther, although it was built on a
Tiger system and appears to work there too.


py2app is available from here: http://undefined.org/python/

The next step is to create a file similar to the setup.py example
given with py2app, mine looks like this:

----FINN.py----
import os
os.system('open -a X11.app; cd ~/Desktop/Debug/; DISPLAY=:0.0; export
DISPLAY; mono FINN.exe')
----FINN.py----

~/Desktop/Debug/ is the folder that our application is in (in this
case FINN.exe) this is important as otherwise mono can't find it.

After creating this file, simply run it as per the instructions that
come with py2app (which I can't remember to hand) and it'll generate a
nice little launcher app for you.

Any suggestions for improvement are welcome, ideally I'd like to
bundle my executable and resources within this launcher and also avoid
having the X11 terminal diaplying at all.

I know in theory one should be able to use macpack to do all this, but
I can't seem to get it working! :-/

Thanks to rtyler on #mono for his help in pointing me in the right
direction on this one.

Also thanks to the wireshark launcher, which this is essentially a clone of :-P
-- 
<generic witty comment>


More information about the Mono-osx mailing list