
Well, in Google Chrome and FireFox, apart from the Graphical user interface, headless support is also there out of the box.

It is because in headless they can understand the rendering of HTML in a better way including styling elements such as page layout, color, font selection, and execution of JavaScript and Ajax which are usually not available when using other testing methods. Headless browsers are particularly used by developers and system administrators for testing web pages. This implies the users can access the webpages but in the command line interface, not in a graphical user interface. Just adding some necessary repos.Īfter this, you can start using headless chrome.Tutorial to Install Google Chrome Headless on Ubuntu Linux to use the browser without GUI on the command line terminal.Ī headless browser means a web browser without a graphical user interface.

#!/bin/sh sudo touch /etc//google-chrome.repo sudo echo -e "\nname=google-chrome\nbaseurl= \$basearch\nenabled=1\ngpgcheck=1\ngpgkey=" > /etc//google-chrome.repo sudo touch /etc//centos.repo sudo echo -e "\nname=CentOS-6 - Base\nmirrorlist= \ngpgcheck=1\ngpgkey=\n\n" > /etc//centos.repo sudo echo -e "#released updates\n\nname=CentOS-6 - Updates\nmirrorlist= \ngpgcheck=1\ngpgkey=\n\n" > /etc//centos.repo sudo echo -e "#additional packages that may be useful\n\nname=CentOS-6 - Extras\nmirrorlist= \ngpgcheck=1\ngpgkey=\n" > /etc//centos.repo sudo yum install -y google-chrome-stable google-chrome-stable -version I had some troubles with installing the chrome so after some struggle I created an install script that will install it for you. This brings an amazing oportunity to laverage usage of Amazon EC2 instances to do some automated browsing stuff without pain of using (soon obsolete) PhantomJS or Firefox with Xvfb.Īmazon Linux is not great for newbies like me. Google Chrome team has added an amazing feature into the lastest version - headless support.

Compiling gtk3 using this might be also a solution. V59 and higher needs libgtk3 which is not available in the mirrors yet. Installing Google Chrome on Amazon Linux (EC2)Įdit: This tutorial for now works only for chrome v58.
