1

When I press restart button I mean it. Though Netbeans, iTerm, XAMPP think that they know better than me, and I get an error that the process has been stopped because of one of these apps.

Is there way to stop this circus once and for all, for all the apps together? I don't want any app at all to be able to stop me from restarting the system.

The idea is to make original "restart" button ignore other apps. I understand many apps won’t exit cleanly, I’m ok losing work and not being warned, I just want the fastest way to get on with the restart and not have it pause for any dialogs.

Ideally, I can set this in the restart menu and change that system wide. If not, how can I automate a tool for this without typing much.

2

Use a text editor to create a new file "Shutdown.command" and place it in your Desktop folder. The file should contain the following:

#!/bin/bash
/sbin/shutdown -h now

Then when you double-click the new Shutdown file on your desktop, the system should immediately proceed to shut down without waiting for your apps. Your user needs to be an Administrator on the Mac for this to work.

I read from your comments to the original question that you assume that this is the same holding the power button on the computer - that is no so. Holding the power button on the computer simply shuts down the power supply to the computer, which is not good as this can lead to problems with file systems, data not being saved, etc.

When you use the above mentioned script, the system shuts down cleanly. This means that data still in RAM that hasn't been written out to disk will be written out to disk, and file systems on internal and external drives will be unmounted cleanly.

  • We might need this answer on the dupe - apple.stackexchange.com/questions/313344/… great answer! – bmike Feb 23 at 13:57
  • That's a very good idea. I'm a man of culture as well (programming). But can we take your way even further? Is there a program somewhere in /bin that is called when you press "restart" in the context menu? Maybe i can replace it with a runnable script in order to redefine the default behaviour? – Алексей Сарычев Feb 23 at 19:58
  • I'm afraid there's no such program in /bin. – jksoegaard Feb 23 at 20:33

You must log in to answer this question.

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