Skip to content

Instantly share code, notes, and snippets.

@havramar
Last active August 29, 2015 14:07
Show Gist options
  • Save havramar/89f839b4a013820b69d3 to your computer and use it in GitHub Desktop.
Save havramar/89f839b4a013820b69d3 to your computer and use it in GitHub Desktop.
Selenium with Xvfb on Debian

Steps to setup selenium with xvfb on debian

apt-get install xvfb
wget http://selenium-release.storage.googleapis.com/2.43/selenium-server-standalone-2.43.1.jar

sudo echo "deb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main" >> /etc/apt/sources.list
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C1289A29

sudo apt-get update
sudo apt-get install firefox-mozilla-build

xvfb-run java -jar selenium-server-standalone-2.43.1.jar

Setting up firewall to accept only local connections by selenium:

sudo iptables -A INPUT -p tcp --dport 4444 -s 127.0.0.1 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 4444 -j DROP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment