9951 explained code solutions for 126 technologies

chrome-headlessHow to run chrome headless with extensions

In order to run extension in headless mode, you need to launch browser using Xvfb:

xvfb-run google-chrome --remote-debugging-port=9222 --load-extension="/path/to/ext" https://onelinerhub.comctrl + c

xvfb framebuffer launcher


specify port to listen for debugging protocol


specify extension path to load (you can use multiple paths, separated by comma)


path to extension directory (the one with manifest.json file inside)


sample URL to load on browser launch