I\'m on EC2 instance. So there is no GUI.
$pip install selenium $sudo apt-get install firefox xvfb
Then I do this:
$Xvfb :1
The easiest way is probably to use xvfb-run:
DISPLAY=:1 xvfb-run java -jar selenium-server-standalone-2.0b3.jar
xvfb-run does the whole X authority dance for you, give it a try!