Fake --headless more cleanly

Change-Id: I3c119182c093b625b57ebc1c23986cab7faf09b0