Good news! You can now use Chrome browser without display… Wait… What? While most users want to actually see the page they load in a web browser, some may want to run their browser in a server without display. Headless mode in web browsers can be used for automated testing requiring loading web pages, extracting metadata, generating bitmaps from page contents, etc… It’s been possible to do so in the past using Xvfb to emulate a framebuffer tricking the browsers to believe there was a display in Linux. But now headless mode is build-in right into browsers, so you don’t need X server running at all, and beside Linux, it will also work in Windows, and Mac OS. You can launch headless mode in Chrome 59 (currently in dev channel) as follows:
1 |
google-chrome-unstable --headless --remote-debugging-port=9222 http://www.cnx-software.com |
You may want to add –disable gpu option to remove an error message. Then go to http://localhost:9222, […]