Create a virtual display on macOS — then use an old Mac (or any device) as a second screen for it.
oldmac-display makes a real, arrangeable macOS display that doesn't physically
exist, using the private CGVirtualDisplay API. You can then view that display
from another machine over screen sharing or a low-latency stream, which turns an
old computer that can't be an HDMI monitor — like a 2011 iMac — into an extra
display.
⚠️ This relies on a private CoreGraphics API (CGVirtualDisplay). It works today but Apple could change or remove it in a future macOS release.
- You want a headless / extra macOS display at a custom resolution.
- You have an old Mac that can't do Target Display Mode and can't take HDMI input.
- You want a free, scriptable alternative to GUI virtual-display apps.
- Host Mac: a recent macOS (uses ScreenCaptureKit; macOS 13+ recommended).
- Command line tools:
clang(install Xcode Command Line Tools).
make # builds the host binary
make apps # also builds the .app bundles./oldmac-displayBy default it creates a 1024x768 virtual display to the right of your main display and quits after 45 seconds as a safety guard (so a misconfigured layout can't strand your screen). Once you've confirmed it behaves, keep it running:
./oldmac-display --keep-aliveWhile it runs, macOS shows a display named Old Mac Display. Arrange it in System Settings > Displays and move windows onto it like any external monitor.
If a layout ever gets stranded, stop it:
pkill -f oldmac-display| Flag | Default | Meaning |
|---|---|---|
--keep-alive |
off | don't auto-quit after the safety timeout |
--width, --height |
1024 / 768 | virtual display resolution |
--position |
right | where to place it relative to the main display |
--stream |
off | start the experimental MJPEG browser receiver |
(See main.m for the full list parsed in AppConfig.)
With the host running, connect from the old Mac using macOS Screen Sharing to the
vnc://... URL printed in the host log. This works everywhere but has noticeable
latency.
For a smoother experience, stream the virtual display with Sunshine on the host and receive it with Moonlight on the old Mac:
- Host: run
oldmac-display --keep-aliveto create the virtual display. - Host: run Sunshine and point a stream at the Old Mac Display output.
- Old Mac: open Moonlight, pair with the host's IP, and pick the stream.
Install Sunshine and Moonlight from their official releases (linked above). On very old macOS (e.g. 10.13), use an older Moonlight build that still supports your OS version.
This repo also ships a tiny WebKit-based receiver for the old Mac:
make receiver-appCopy OldMacReceiver.app to the old Mac, launch it, and enter the sender URL the
host prints (e.g. http://<host-ip>:8377/). It goes fullscreen after connecting;
press Esc to show the URL bar, Cmd-L to focus it.
- Works as an extended virtual display while the process runs.
- Most stable viewing path is Screen Sharing/VNC; the MJPEG receiver is experimental (
--streamonly). - No keyboard/mouse forwarding yet.
- Depends on a private CoreGraphics API (see warning above).
MIT