force headless mode programatically