I really hate the “Reopen Windows when Logging back”” feautre in MacOS Lion and above. That feature exists because Apple wanted to integrate iOS into MacOS. However, my Macbook uses a HDD, not an SSD, so everytime I log into my computer, it automatically opens all those applications, which takes time and can make my computer run very slowly. Even though I have unchecked the “Reopen windows when logging back in” option in the Shutdown/Restart dialog, my Mac often reopen all my last running applications. I have to wait for all of those stuffs to completed open and then I can use my computer normally.
I was very upset and decided to find a solution to completely disable that feature. And here is the solution.
Use any text editor that you want and create a file named fixlogin.sh in your home directory. Paste this piece of code into the content of the file
Open up terminal, chmod that file to executable and then execute it.
Ok, you are done! The checkbox “Reopen windows when logging back in” will still appear in the shutdown/restart dialog but it has no effect.
Later, when you want to revert back to the behavious of MacOS Lion, issue this command