How to hide your Mac screen and keep it running
Turn the display off, but keep the Mac itself from sleeping. On macOS, screen sleep and system sleep are two different things: a dark screen doesn't stop Claude Code, a build or a download. Only system sleep does. So the trick is to make the screen look off while you keep system sleep away. Below are three ways to do that, from free and built in to a small app. Why does my agent stop when I walk…
To hide your Mac screen while keeping it running, there are three methods to consider. The first involves using two commands in Terminal. One command prevents the Mac from going into idle sleep, and the other turns the display off. This keeps the Mac working until you manually stop it by pressing Ctrl+C. However, this method may require your login password to be entered and is dependent on Lock Screen settings.
The second method involves setting a hot corner in System Settings to put the display to sleep or start the screen saver. This hides the screen, but the Mac can still go to sleep later. To prevent this, pair it with a keep-awake command from the first method or a keep-awake menu bar app. On a desktop Mac, you can also enable the option in System Settings to stop the Mac from sleeping automatically when the display is off.
The third method uses a fake screensaver, which is covered by a tool called Possum. This covers the entire display like a screensaver and keeps the Mac awake. When you return, you can move the mouse, enter a 4-digit PIN, and the screen will be cleared. This method stays on top and can be set to cover the screen for a specific amount of time. It does not provide true security, so the macOS lock screen should be used when real security is needed.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to