GadElKareem

Run chrome with a virtual X server on Ubuntu

Install configure and run a virtual X Server for Chrome on Ubuntu server using this script.

#!/bin/bash

set -e

sudo apt-get install libnss3 libappindicator1 fonts-liberation -y
sudo apt --fix-broken install -y
cd /tmp/
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb

sudo apt-get install xvfb -y
nohup Xvfb :0 -screen 0 1x1x8 &> xvfb.log &
export DISPLAY=:0

/usr/bin/google-chrome --disable-gpu --no-sandbox --user-data-dir=/tmp/chr --remote-debugging-port=0