1

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.

  • Welcome to the site! Unfortunately, I don't think there's quite enough info in your question to answer it. Can you add some more detail and clarify? – Jaydles Jan 14 '14 at 18:29
  • 1
    I think the question is clear in that you want to prevent an application from being closed/quit, however it might help to know the specific application. – Mr Rabbit Jan 14 '14 at 19:01
  • possible duplicate of Lock down OSX 10.7.5 app into kiosk mode? – aaaidan Jan 14 '14 at 21:27
  • You need to use software that sets up a "kiosk mode". Check out this question (which has an answer) apple.stackexchange.com/questions/97471/… – aaaidan Jan 14 '14 at 21:27
  • when allowed, users can have full access to OSX. the main purpose of my software is lock and unlock the screen (this part already works) and for security reason is prevent that the users can kill my software (my question). – moscoquera Jan 15 '14 at 1:52
3

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:

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

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.)

  • thank you very much. I tried your solution, but when I close the application several times, this simply does not re-start. Also, another requirement is that this application doesn't run for all users, but I think I can fix this by creating another small program. – moscoquera Jan 17 '14 at 2:55
0

the only way i could solve it was adding a rule to the sudoers file, allowing to run the app without password. to reduce the security risks, all the files used by the app are owned by and could only be edited by run by the root user.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .