Selenium – no display specified
I’m not very experienced with X-windows on the Linux platform, so I’m not too skilled in troubleshooting issues with the display. I recently upgraded an Ubuntu system at work to use Ubuntu 9.04 (Jaunty Jackalope), which only has Firefox 3 available (no package for Firefox 2). I had a Selenium server setup running tests, but they stopped working after I upgraded to this newer version of Ubuntu.
I thought that perhaps Selenium wasn’t compatible with version 3 of Firefox, but this isn’t the case. The Selenium website says ‘Firefox 2+’ for browsers running on Linux.
The error I was receiving when I would run a test was:
10:46:19.778 INFO - Preparing Firefox profile...
Error: no display specified
After a bunch of research and Googling online, it turned out I just needed to run this before I started my Selenium server:
export DISPLAY=:0
I hope this saves someone else some time.
February 25th, 2010 at 1:32 pm
I tried that, but I still get the same error:
Error: no display specified
February 25th, 2010 at 1:44 pm
Sorry, wrong error message. What I see *after* implementing your suggestion is
Error: cannot open display: :0
April 7th, 2010 at 10:02 am
hello.
i ve got the same problem.
Error: no display specified
when try to start firefox via selenium.
seems to be something with $DISPLAY???
May 8th, 2010 at 4:23 pm
export DISPLAY=:0
this saved me a lot of time, thx
June 14th, 2010 at 9:34 am
It definitely helped me, thank you
July 20th, 2010 at 9:06 pm
This definitely helped me. Thanks!!