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.
I tried that, but I still get the same error:
Error: no display specified
Sorry, wrong error message. What I see *after* implementing your suggestion is
Error: cannot open display: :0
hello.
i ve got the same problem.
Error: no display specified
when try to start firefox via selenium.
seems to be something with $DISPLAY???
export DISPLAY=:0
this saved me a lot of time, thx
It definitely helped me, thank you
This definitely helped me. Thanks!!
Many thanks, spent the best part of a morning not thinking of this :)
After adding env variable DISPLAY don’t run firefox as a root.
Just what I needed, thanks!
Thanks man! It is very helpful!
I am facing a different problem.
when I try to run a code as JUnit test case,
it gives me a message like this in command prompt.
11:20:41.382 INFO – Command request: getNewBrowserSession[*firefox, http://www.l
ogica.com/, ] on session null
11:20:41.382 INFO – creating new remote session
11:20:41.384 INFO – Allocated session c3a6b2920e0e42289266f5e132dc0593 for http:
//www.logica.com/, launching…
11:20:46.268 INFO – Preparing Firefox profile…
it stays there forever. does not do anything.
then I created my own firefox profile, but still the same problem. cant understand whats the problem really !!
Someone please help. !!!!
thanks
awesome! thankyou!, I searched for ages but my search stopped here :D
Thanks for posting this, saved me tons of time!