MacOS – How to prevent apps from from not letting you restart Mac OS

automationmacosrestartsoftware-recommendation

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.

Best Answer

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.