Temporarily Prevent a Mac from Sleeping
For security reasons, it’s always a good idea to lock your Mac screen when you step away from the keyboard. On the other hand, there are times where you’ll be away from your Mac but you don’t want to have to re-enter your password to login, or you just don’t want your screensaver activating or your Mac sleeping.
Here’s three ways to temporarily prevent Mac OS X from sleeping or activating the screensaver:
Caffeine is a free menu bar utility that is available through the Mac App Store, it sits in your menubar and when you click on the cup of coffee, it prevents your Mac from going to sleep for a preset amount of time: from indefinitely to 5 minutes. I use Caffeine often and have it set to an hour, this is a really useful app.
- Grab Caffeine from the Mac App Store (App Store link)
If you don’t want to install another app, you can mimic the effects of Caffeine by using a command line utility called pmset. Launch the Terminal and type:
This will prevent your Mac from sleeping indefinitely until pmset is no longer running. You can stop pmset from running by hitting Control+C in the same Terminal window. pmset is a power management utility that you can use to set sleep and wake times, but the noidle flag just provides a single use sleep prevention method.
3: Screen Saver Hot Corners
Another option is to set a screen saver Hot Corner from > System Preferences > Screen Savers > Hot Corners. Just specify a corner and set it to “Disable Screen Saver” and anytime you slide the mouse into that corner, the screensaver will not enable. This does not prevent the system from sleeping though.