title: Error: cannot open display: :0 for Selenium tests
body: <p>Firstly I was getting the following error:</p>
  
  <pre><code>org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
  Error: no display specified
  </code></pre>
  
  <p>So I have used <code>export DISPLAY=:0</code> to circumvent this problem. Followed to that I have found Selenium tests were running using the root user and all was fine.</p>
  
  <p>However now I can see when these tests are getting executed from Jenkins the following error is coming up:</p>
  
  <pre><code>org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
  No protocol specified
  Error: cannot open display: :0
  </code></pre>
  
  <p>I am running this on a Redhat 6 box.</p>