PDA

View Full Version : Disable state saving




Dagless
Mar 26, 2013, 11:57 AM
Is there a safe way to disable the state reloading feature in Mountain Lion? I've never found it useful and recently it's becoming a pain (especially with IM apps). I'm also not happy with how tempermental it can be - sometimes it will reload a state, other times it won't even though I've ticked the save state box.

I'd rather have done with it.



benwiggy
Mar 26, 2013, 12:43 PM
The easiest way to "deal" with Resume is simply to switch the keyboard shortcuts for "Quit" (Command Q), and "Quit and Close all Windows" (Command alt Q).

Then, when you press Command Q, OS X will quit and close all windows.

<Thoughts on the subject>

Like many of the substantial changes to long-established GUI metaphors in Lion, it requires a change in thinking of how you interact with your computer. Of course, the methods that we are now familiar with were no less strange and unfamiliar when first presented to us, too.

OS X will continue to introduce new UI metaphors and strategies that will evolve the Desktop experience, much of which has otherwise not changed in 40 years. It will become more and more of a fight to resist the changes and continue to work in the original way as the years go by.

</Thoughts>

Krazy Bill
Mar 26, 2013, 03:57 PM
There is a folder in your Library called Saved Application State. "Get Info" on that folder and change the Sharing and Permissions to "Read Only".

OSX can't write to it then. I've been doing this since 10.7.

Nermal
Mar 26, 2013, 04:06 PM
There is a folder in your Library called Saved Application State. "Get Info" on that folder and change the Sharing and Permissions to "Read Only".

OSX can't write to it then. I've been doing this since 10.7.

Aha! I'd give you a cookie for that, but I don't have any so you'll have to begrudgingly accept some emoji cake.

🍰

adnbek
Mar 26, 2013, 05:13 PM
Put a checkmark next to "Close windows when...." in system prefs > general.

Dagless
Mar 26, 2013, 06:31 PM
Like many of the substantial changes to long-established GUI metaphors in Lion, it requires a change in thinking of how you interact with your computer. Of course, the methods that we are now familiar with were no less strange and unfamiliar when first presented to us, too.

Yes yes, that's all well and good but not at all useful in my work environment. I don't want to have to boot my computer up in the morning and have confidential files displayed, it was fine before when switching your computer off also "switched off" the applications.
It's still called Shut Down, separate from Sleep and Hibernate.


There is a folder in your Library called Saved Application State. "Get Info" on that folder and change the Sharing and Permissions to "Read Only".

OSX can't write to it then. I've been doing this since 10.7.
Sounds like that will fix the problem! I've done it, time will tell if it works. Thanks!

benwiggy
Mar 27, 2013, 07:04 AM
There are a LOT of webpages devoted to stopping Resume from ... resuming. I would have thought the locking of Saved Application State would be well known. (Surprised this came as news to a Mod!)

However, as I hinted, the time may come when preventing an app from writing a file flags an error or causes a problem, rather than doing nothing.

People have written and posted AppleScripts that can run at Shutdown which ensure all apps quit and close their windows. That might be a better way than barring apps from writing.

Krazy Bill
Mar 27, 2013, 11:18 AM
However, as I hinted, the time may come when preventing an app from writing a file flags an error or causes a problem, rather than doing nothing.

Well, I'll take my chances rather than following this gem from you:

'it requires a change in thinking of how you interact with your computer."

But in all fairness, this does sound like something Jobs would've written. :D

benwiggy
Mar 27, 2013, 11:38 AM
Well, I'll take my chances rather than following this gem from you:
'it requires a change in thinking of how you interact with your computer."
But in all fairness, this does sound like something Jobs would've written. :D
By all means carry on. I'm merely sounding a note of caution that such a crude implementation may only be a temporary solution.

All computer interfaces are learnt. You have to learn how they work in order to use them. An "Intuitive" interface just means it works like other interfaces you've already learnt.
You don't leap out of the womb knowing how to use a GUI. It's an abstract concept. New versions of apps or OSes frequently bring changes in how they work. Which you have to learn in order to use. Sometimes, that requires changing what you have previously learnt in favour of the new method.

This isn't controversial or marketing speak, is it?

After 20 years of thinking about opening, saving and closing documents in the same way, I now have to think about it in a different way, given Apple's new model for Auto-save, Versions and Resume. I'm not saying whether it's better or worse. I'm just saying I have to think about it differently.

Krazy Bill
Mar 27, 2013, 12:05 PM
Sometimes, that requires changing what you have previously learnt in favour of the new method.Disagree. There will always be resistance to forced change. And for many the first instinct is to find a way to circumvent and customize those changes rather than mindlessly adapt to them. Indeed, it's our duty to do so. :D

This isn't controversial or marketing speak, is it?

Not at all my friend.

benwiggy
Mar 27, 2013, 12:53 PM
Disagree. There will always be resistance to forced change. And for many the first instinct is to find a way to circumvent and customize those changes rather than mindlessly adapt to them. Indeed, it's our duty to do so.
Mindlessly adapt? I've always been proud of the fact that the human brain is much more adaptable and configurable than any computer operating system. If anything is mindless, it's resistance to learning and ploughing the same furrow regardless. ;-)

Sometimes, computer interfaces offer a variety of settings, if the programmers have seen fit to include them. Sometimes, an alternative can be created by third-party. Sometimes, it can't, and you just have to get used to it.

There are methods of subverting Resume, some of them less than optimal implementations themselves. But are there are also other options.

Anyway, enough of the philosophy. All the best.

Nermal
Mar 27, 2013, 02:05 PM
(Surprised this came as news to a Mod!)

Banning spammers does not require intimate knowledge of OS X :D

Dagless
Apr 2, 2013, 06:39 AM
Ah, it's still doing it. Just rebooted up and loaded up all the apps I had open previously.

benwiggy
Apr 2, 2013, 09:54 AM
Ah, it's still doing it. Just rebooted up and loaded up all the apps I had open previously.
A neater solution would be to use an AppleScript that is scheduled to run at shutdown, which closes all windows and quits all apps. I would be surprised if someone hasn't posted one somewhere.

Krazy Bill
Apr 2, 2013, 04:17 PM
Ah, it's still doing it. Just rebooted up and loaded up all the apps I had open previously.Delete all the files/folders inside the "Saved Application State" folder before changing the permissions to "Read Only".

jameslmoser
Apr 4, 2013, 11:29 PM
defaults write -g ApplePersistence -bool false

davidlv
Apr 5, 2013, 08:25 AM
defaults write -g ApplePersistence -bool false
This teminal command caused issues with TextEdit on my MBP late 2011, error messages saying, in effect that "you don't have permissions to write to the specified destination." I could manually save, but the automatic save function was really messed up.:eek:
Used "defaults write -g ApplePersistence -bool true" to revert and the issue disappeared. :cool: I don't understand that at all, :confused: but this solution obviously is problematic, at least on my MBP.

jameslmoser
Apr 5, 2013, 12:59 PM
This teminal command caused issues with TextEdit on my MBP late 2011, error messages saying, in effect that "you don't have permissions to write to the specified destination." I could manually save, but the automatic save function was really messed up.:eek:
Used "defaults write -g ApplePersistence -bool true" to revert and the issue disappeared. :cool: I don't understand that at all, :confused: but this solution obviously is problematic, at least on my MBP.

Interesting... I have used this to disable the resume, auto-save, etc since Lion came out on 4 macs now and have never had a problem. Friends I know also use this solution without problem. I wonder if this was caused by maybe some other changes you made in an attempt to disable some of these features?

Have you tried creating a new account and then use this command? If it works without problems on a new account, then perhaps you have screwed up directory permissions on your existing user?

davidlv
Apr 5, 2013, 02:02 PM
Interesting... I have used this to disable the resume, auto-save, etc since Lion came out on 4 macs now and have never had a problem. Friends I know also use this solution without problem. I wonder if this was caused by maybe some other changes you made in an attempt to disable some of these features?

Have you tried creating a new account and then use this command? If it works without problems on a new account, then perhaps you have screwed up directory permissions on your existing user?
Read my post, the permissions for the folder were actually fine, and a Command-S save worked fine, so not a permissions issue. That command messed up the autosave function, perhaps a write of a temporary file to another location? In any case reverting solved the issue so I have no need to create another user etc. Never have any saved state issues anyway, just tried that command as a safety net.