Skip to content
← Projects

Curtain

A privacy layer for macOS Screen Sharing

When you remote into your Mac, Curtain hides the screen from anyone at the desk and makes the local keyboard and mouse do nothing, while your remote control keeps working normally. A small menu-bar agent, in the spirit of Caffeine.

How it works

Your laptop and the desk share one login session, so a window that blocks input would block you too. Curtain detects sessions via three signals — a transport-independent macOS capture flag (TCP and the UDP mode on macOS 14+ Apple Silicon), an established TCP connection on port 5900, and a peered UDP socket on ports 5900–5902 — then filters input by event source: physical desk events are blocked while your injected remote events pass through. No virtual display, no second account.

What it does

Remote session starts

Covers every physical display, blocks the desk keyboard and mouse, keeps displays awake, and posts a notification. Your remote input keeps working normally.

Reveal at the desk

A password box appears on any key (or a combo you define). The correct password reveals the desktop and can keep or disconnect the remote operator.

Session idle (default 30 min)

Any of: disconnect the remote, lock the Mac, sleep the displays, or deactivate the curtain.

Disconnect

Any of: lock the Mac, sleep the displays, or deactivate the curtain.

All behaviors are configurable.

Emergency unlock

Press Control + Option + Command + Uanytime to force-deactivate. A Carbon hotkey, so it works even without Accessibility granted.

Refuses to lock you out

Without Accessibility permission, Curtain refuses to show a cover it cannot unlock and notifies you instead — never trapping you behind a screen.

Built in Swift (SwiftPM) as a menu-bar agent. Current builds are ad-hoc signed and not yet notarized, so macOS Gatekeeper prompts on first launch.