use headless mode in mac os x