by

Stop OSX Relaunching Apps on Restart

OSX is great, until its not.  In the last few versions of OSX, no matter how you set the check box when shutting down or restarting, OSX insists on relaunching all your open apps.

Sometimes it takes a sledgehammer to solve what should be a simple problem. So here is my sledge hammer.

OSX stores a list of currently open apps in a .plist file down in ~Library/Preferences/ByHost.  If you lock this file to keep OSX from reading and writing to it, you can prevent all those apps from opening.

You will need to set the ownership of the file to root, or the OS with all its power will simply replace it when it wants to write to it later one.

sudo chown root ~/Library/Preferences/ByHost/com.apple.loginwindow*

The next step is to remove all permissions

sudo chmod 000 ~/Library/Preferences/ByHost/com.apple.loginwindow*

Use the astrick because OSX stores a few backups that it will try to revert to.