3

If I shutdown/reboot from Menu I get an option of saving state of open windows or not, but if I issue a command from terminal say shutdown -h now it will shutdown remembering all open windows, how can I shutdown without remembering any of the open windows just like the Menu option from terminal ?

1

I am searching for a solution to the same problem. I have not found a nice solution although there is a hacky one here which in short is:

Disable saving application state:

rm -r '~/Library/Saved Application State/*'
chmod -R a-w '~/Library/Saved Application State'

Disable 'Reopen windows when logging back in':

defaults write com.apple.loginwindow TALLogoutSavesState -bool false
chmod a-w ~/Library/Preferences/com.apple.loginwindow.plist
sudo chown root ~/Library/Preferences/com.apple.loginwindow.plist

See the provided link for more details.

But I really hope there is some better solution to this ? In my case the problem is that I have a mac in a server room that automatically runs a script in a terminal window. This machine can be rebooted remotely. But thus every time it reboots it keeps the old terminal window and opens a new one, so if I have rebooted it 10 times there will be 10 terminal windows open where only one is in use.

0

I believe the keyboard shortcut controloptioncommandeject has the same effect.

When you press all four keys the Mac starts the shutdown process, only prompting you to save documents/projects that have changes as their corresponding applications shut down.

You must log in to answer this question.

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