title: FreeBSD - using pyvirtualdisplay - Python 2.7 / Selenium Web Driver
body: <p>Below is the code am writing in FreeBSD. Before this code, I did</p>
  
  <pre><code>pkg install xorg-vfbserver
  </code></pre>
  
  <p>but after this I don't know which environment variable to set. Like in Ubuntu you have to do like this before using this program</p>
  
  <pre><code>apt-get install xvfb
  export DISPLAY = :1
  </code></pre>
  
  <p><br>
  In FreeBSD, what is the environment variable to set ?
  I read USES = DISPLAY but I couldn't understand as there isn't much of information about it. And because of that the Firefox starts and closes</p>
  
  <p><br><br></p>
  
  <pre><code>from pyvirtualdisplay import Display
  from selenium import webdriver
  
  try:
          display = Display(visible=0, size=(800,600))
          display.start()
  except:
          print "no virtual display found"
  
  
  driver = webdriver.Firefox()
  
  driver.get('www.google.com')
  
  driver.close()
  </code></pre>