Log in Register now

Selenium + Ubuntu + Amazon EC2 ---> headless

I use small instance. My solution needs near 900MB of memory so micro instance will not work.

Installation



Install headless java
sudo apt-get install openjdk-6-jre-headless

Fonts
sudo apt-get install xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic

Headless X11 magic is here
sudo apt-get install xvfb

We still demand X11 core
sudo apt-get install xserver-xorg-core

Firefox installation
sudo apt-get install firefox

Download Selenium server
wget http://selenium.googlecode.com/files/selenium-server-standalone-2.31.0.jar

Enjoyment



Run Selenium server
Xvfb :0 -screen 0 1024x768x24 2>&1 >/dev/null &
export DISPLAY=:0
nohup xvfb-run java -jar selenium-server-standalone-2.31.0.jar > selenium.log &

comments (5)

5 Hari Kagga  
0
Hi,

Great thanks, it worked just as depicted. Really appreciate your help on this. Great going..

3 Panaman  
0
Selenium + Ubuntu + Cubieboard ---> headless :-)

Brilliant! Concise, straight forward, works as advertised. Like sergey, I've tried a number of other "How To's" to no avail. Also like sergey, the "Download Selenium server" step needs to be adjusted to whatever version is current at the time of reading this post. These instructions were put up a while ago (I guess the recent comments gave it new Google juice).

Works great on my new Cubieboard. I thought I'd add my comment to keep the Google juice flowing...

Thanks!

4 Mike  
0
Yeah, you are right, the todo was written some time ago. Thanks for noticing - I've updated the Selenium version to the last available.

2 pradosh  
0
Thanks a ton, worked like magic

1 sergey  
0
Thanks for your post!
I tried several approaches described elsewhere, unsuccessfully, before I found this page.
Actually, selenium-server-standalone-2.2.0.jar did not work for me.
I tried selenium-server-standalone-2.31.0.jar instead, it worked.
Thanks!

Only registered users can add comments. Please, Login or Register.