Disabling AppNap for Terminal

6

3

How do I disable AppNap for Terminal? Get Info on Terminal does not have Prevent App Nap check box

Terminal Info

An alternative is to turn the NSAppSleepDisabled flag on, but will it actually work?

$ defaults write com.apple.Terminal NSAppSleepDisabled -bool YES


Why Disable App Nap for Terminal

I frequently have long running jobs on Terminal, such as debugging a server, downloading large files or backing up large amount of files. There is a risk of interrupting a network session when (if?) App Nap is enabled for Terminal.

hanxue

Posted 2013-11-29T12:32:01.383

Reputation: 2 354

Answers

7

Yes, the Terminal command that you provided does prevent App Nap:

defaults write com.apple.Terminal NSAppSleepDisabled -bool YES

I tested the command, and it worked successfully…

  • Before:

  • After:

grg

Posted 2013-11-29T12:32:01.383

Reputation: 1 499

3FYI: I was testing this in OSX 10.10 (Yosemite) and the key is now LSAppNapIsDisabled and not NSAppSleepIsDisabled. (The bold characters have changed.) – SaxDaddy – 2014-10-26T08:48:55.737