I have a 2011 iMac I can't bring myself to throw away. I just like the way it looks. But a machine sitting in a closet is a waste, so I figured I'd at least make it a second screen for my main Mac.
Turns out that's harder than it sounds.
The 2011 iMac has no video input, so it can't be an HDMI monitor. Apple's Target Display Mode looks like the answer, but the model/OS requirements rule out my current Mac. VNC / Screen Sharing does work, but the lag makes it useless as an actual display — a monitor that stutters every time you move the mouse is not a monitor I want.
So the normal routes were all dead ends.
Faking a display instead
I gave up on connecting anything physically and went the other way: create a display inside macOS that doesn't exist.
macOS has a private API, CGVirtualDisplay, that lets you spin up a screen the OS treats as a real external monitor:
@interface CGVirtualDisplay : NSObject
- (id)initWithDescriptor:(id)descriptor;
- (BOOL)applySettings:(id)settings;
@end
Once that virtual display exists, the only job left is getting its contents onto the old iMac. The setup I landed on:
Main Mac
oldmac-display -> creates the virtual display (CGVirtualDisplay)
Sunshine -> streams that display with low latency
|
v
2011 iMac (macOS 10.13)
Moonlight -> receives it fullscreen
A display called Old Mac Display shows up in System Settings, and I arrange windows on it like any external monitor. It's just being mirrored to the iMac.
Things that bit me
The display can get stranded. Place the virtual display wrong and windows fly off to a screen you can't see. So by default it quits after 45 seconds; once you trust it, run with --keep-alive. pkill -f oldmac-display kills it.
VNC really is too slow. Switching to Sunshine + Moonlight (the game-streaming stack) is what made it actually usable.
Old macOS can't run new Moonlight. On the iMac's 10.13 the latest Moonlight won't launch; you need an older build. It's in the README so nobody else loses an hour to it.
Caveat
CGVirtualDisplay is a private API, so a future macOS could break it. I'm treating this as a "fun while it lasts" project. The virtual-display part is also handy beyond old Macs — headless setups, custom-resolution scratch screens, etc.
It works well enough, and honestly I'm just happy the iMac I like is useful again. MIT licensed if you've got an old Mac gathering dust too.
Top comments (0)