OSX: run an application and prevent users to close I'm trying to run an application in OSX, but I need that users can not close the application. the application is used as part of a system similar to a internetcafe.

How can i do it?

Edit:
is a java application that receives some data from a server and block the screen. so the user can't use the machine until the machine is unlocked from the server. basically, like a  locking system for a internetcafe.

for security and functionality reasons the user can't close,  otherwise the software is useless.
Could you just relaunch the program immediately if a user quits it? To for example relaunch TextEdit if it is quit, you can save this plist as /Library/LaunchAgents/relaunchtextedit.plist:

&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
  &lt;key&gt;Label&lt;/key&gt;
  &lt;string&gt;relaunchtextedit&lt;/string&gt;
  &lt;key&gt;Program&lt;/key&gt;
  &lt;string&gt;/Applications/TextEdit.app/Contents/MacOS/TextEdit&lt;/string&gt;
  &lt;key&gt;KeepAlive&lt;/key&gt;
  &lt;true/&gt; &lt;!-- run the program again if it is terminated --&gt;
  &lt;key&gt;RunAtLoad&lt;/key&gt;
  &lt;true/&gt; &lt;!-- run the program at login --&gt;
&lt;/dict&gt;
&lt;/plist&gt;


Make sure the file is owned by root. Then run sudo launchctl load /Library/LaunchAgents/relaunchtextedit.plist or log out and back in to load the plist. (You could also save the plist in the user library, but then the user can unload it without having to enter a password.)