add support for running in headless/shell mode