title: How to replace Iceweasel with Firefox for headless Cucumber/Capybara tests?
body: <p>I am running a set of Cucumber/Capybara tests with Selenium, using the headless gem in a Debian VM. For  some reasons that I won't go into here, I would like to replace Iceweasel with a real Firefox installation.</p>
  <p>So I uninstalled iceweasel, and the followed these instructions: <a href="http://www.fandigital.com/2012/09/install-real-firefox-in-debian.html" rel="nofollow noreferrer">http://www.fandigital.com/2012/09/install-real-firefox-in-debian.html</a></p>
  <blockquote>
  <p><strong>Download Firefox</strong></p>
  <p>Download latest version of the original Mozilla Firefox for Linux from the official Mozilla website here, and put it in the Downloads folder within your Home directory (/home/YourUserName/Downloads).</p>
  <p><strong>Install Firefox</strong></p>
  <p>Copy and extract Firefox archive Open Terminal, and change directory (cd) to the Downloads folder:</p>
  <p><code>cd /Downloads</code></p>
  <p>Then run the following commands (one-by-one):</p>
  <ul>
  <li><code>sudo cp firefox-*.tar.bz2 /opt</code></li>
  <li><code>cd /opt</code></li>
  <li><code>sudo tar -xvf firefox-*.tar.bz2</code></li>
  <li><code>sudo rm firefox-*.tar.bz2</code></li>
  </ul>
  <p><strong>Create symbolic link to firefox binary</strong></p>
  <p>Backup (move) any existing firefox bin:</p>
  <p><code>sudo mv /usr/bin/firefox /usr/bin/firefox.backup</code></p>
  <p><strong>Create symbolic link to the real firefox binary:</strong></p>
  <p><code>sudo ln -s /opt/firefox/firefox /usr/bin/firefox</code></p>
  </blockquote>
  <p>As soon as I start my tests, I unfortunately run into the following error: <code>unable to obtain stable firefox connection in 60 seconds</code>. I have not been able to solve this problem. Any advice on how to proceed?</p>