joon
joon

Reputation: 4017

Run a python script and a compiled c code without terminal or dock item in Mac OS X

For great help from stackoverflow, the development for the Mac version of my program is done. Now I need to deploy my program, and I was wondering if there is any way to "hide" my running Python code (it also runs .so library and it seems it makes a dock item to appear).

The program is supposed to be running in the background and it would be great if I can hide any terminal or dock items. In Windows or linux, it was easy, but I am still not that used to Mac and could not figure out how to do this.

Thank you, Joon

Upvotes: 2

Views: 1229

Answers (2)

Lee Reeves
Lee Reeves

Reputation: 406

Are you using py2app and distributing a package? If so, you can set LSBackgroundOnly in info.plist.

right-click on your package
choose *Show Package Contents*
double click on info.plist in Contents to open the property list editor
Add Child "Application is background only"

(That makes the application invisible. If your application has a UI and you just want to hide the dock icon, use LSUIElement, which is "Application is agent" in the property list editor.)

Upvotes: 1

kartheek
kartheek

Reputation: 771

have you tried using the nohup? lets say you have a launch script to start your program:

launch.sh:

nohup your_program & exit

Upvotes: 0

Related Questions