Given that it's a bit hard to run user programs when no one's logged in, the alternative that comes to mind is hardware.
ie. Since most display adapters these days have two or more outputs, plug one into a recording device, (eg. HDMI, Composite, SVHS, etc), and configure your display adapter to clone the primary display.