title: Capybara save_and_open_page ubuntu
body: <p>I am running Ubunut 13.04, and Rubymine 6.0.3</p>
  
  <p>My problem is that  Launchy gem isn't opening my browser.</p>
  
  <p>I debuged Capybara save_and_open_page and executed</p>
  
  <pre><code>Launchy.open(file_name,{debug:true})
  </code></pre>
  
  <p>The html page is saved, however the browser doesn't launch.</p>
  
  <p>This was the debug result</p>
  
  <pre><code>LAUNCHY_DEBUG: URI parsing pass 1 : /home/dave/my_i/tmp/capybara/capybara-201401200000077817027890.html -&gt; {:scheme=&gt;nil, :user=&gt;nil, :password=&gt;nil, :host=&gt;nil, :port=&gt;nil, :path=&gt;"/home/dave/my_i/tmp/capybara/capybara-201401200000077817027890.html", :query=&gt;nil, :fragment=&gt;nil}
  LAUNCHY_DEBUG: URI parsing pass 2 : /home/dave/my_i/tmp/capybara/capybara-201401200000077817027890.html -&gt; {:scheme=&gt;nil, :user=&gt;nil, :password=&gt;nil, :host=&gt;nil, :port=&gt;nil, :path=&gt;"/home/dave/my_i/tmp/capybara/capybara-201401200000077817027890.html", :query=&gt;nil, :fragment=&gt;nil}
  LAUNCHY_DEBUG: Checking if class Launchy::Application::Browser is the one for handles?(/home/dave/my_i/tmp/capybara/capybara-201401200000077817027890.html)}
  LAUNCHY_DEBUG: Checking if class Launchy::Detect::HostOsFamily::Windows is the one for matches?(linux-gnu)}
  LAUNCHY_DEBUG: Checking if class Launchy::Detect::HostOsFamily::Darwin is the one for matches?(linux-gnu)}
  LAUNCHY_DEBUG: Checking if class Launchy::Detect::HostOsFamily::Nix is the one for matches?(linux-gnu)}
  LAUNCHY_DEBUG: Checking if class Launchy::Detect::RubyEngine::Mri is the one for is_current_engine?(ruby)}
  LAUNCHY_DEBUG: Checking if class Launchy::Detect::HostOsFamily::Windows is the one for matches?(linux-gnu)}
  LAUNCHY_DEBUG: Checking if class Launchy::Detect::HostOsFamily::Darwin is the one for matches?(linux-gnu)}
  LAUNCHY_DEBUG: Checking if class Launchy::Detect::HostOsFamily::Nix is the one for matches?(linux-gnu)}
  LAUNCHY_DEBUG: Checking if class Launchy::Detect::RubyEngine::Mri is the one for is_current_engine?(ruby)}
  LAUNCHY_DEBUG: Checking if class Launchy::Detect::NixDesktopEnvironment::Kde is the one for is_current_desktop_environment?()}
  LAUNCHY_DEBUG: Checking if class Launchy::Detect::NixDesktopEnvironment::Gnome is the one for is_current_desktop_environment?()}
  LAUNCHY_DEBUG: Launchy::Application : Unable to find `gnome-open' in /home/dave/.rvm/gems/ruby-2.0.0-p247@myi/bin, /home/dave/.rvm/rubies/ruby-2.0.0-p247/bin, /home/dave/.rvm/gems/ruby-2.0.0-p247@global/bin, /home/dave/.rvm/bin, /usr/local/heroku/bin, /home/dave/.rvm/gems/ruby-2.0.0-p247/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /home/dave/JSMS
  LAUNCHY_DEBUG: Launchy::Application : found executable /usr/bin/firefox
  LAUNCHY_DEBUG: Launchy::Application : Unable to find `seamonkey' in /home/dave/.rvm/gems/ruby-2.0.0-p247@myi/bin, /home/dave/.rvm/rubies/ruby-2.0.0-p247/bin, /home/dave/.rvm/gems/ruby-2.0.0-p247@global/bin, /home/dave/.rvm/bin, /usr/local/heroku/bin, /home/dave/.rvm/gems/ruby-2.0.0-p247/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /home/dave/JSMS
  LAUNCHY_DEBUG: Launchy::Application : Unable to find `opera' in /home/dave/.rvm/gems/ruby-2.0.0-p247@myi/bin, /home/dave/.rvm/rubies/ruby-2.0.0-p247/bin, /home/dave/.rvm/gems/ruby-2.0.0-p247@global/bin, /home/dave/.rvm/bin, /usr/local/heroku/bin, /home/dave/.rvm/gems/ruby-2.0.0-p247/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /home/dave/JSMS
  LAUNCHY_DEBUG: Launchy::Application : Unable to find `mozilla' in /home/dave/.rvm/gems/ruby-2.0.0-p247@myi/bin, /home/dave/.rvm/rubies/ruby-2.0.0-p247/bin, /home/dave/.rvm/gems/ruby-2.0.0-p247@global/bin, /home/dave/.rvm/bin, /usr/local/heroku/bin, /home/dave/.rvm/gems/ruby-2.0.0-p247/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /home/dave/JSMS
  LAUNCHY_DEBUG: Launchy::Application : Unable to find `netscape' in /home/dave/.rvm/gems/ruby-2.0.0-p247@myi/bin, /home/dave/.rvm/rubies/ruby-2.0.0-p247/bin, /home/dave/.rvm/gems/ruby-2.0.0-p247@global/bin, /home/dave/.rvm/bin, /usr/local/heroku/bin, /home/dave/.rvm/gems/ruby-2.0.0-p247/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /home/dave/JSMS
  LAUNCHY_DEBUG: Launchy::Application : Unable to find `galeon' in /home/dave/.rvm/gems/ruby-2.0.0-p247@myi/bin, /home/dave/.rvm/rubies/ruby-2.0.0-p247/bin, /home/dave/.rvm/gems/ruby-2.0.0-p247@global/bin, /home/dave/.rvm/bin, /usr/local/heroku/bin, /home/dave/.rvm/gems/ruby-2.0.0-p247/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /home/dave/JSMS
  LAUNCHY_DEBUG: Launchy::Application::Browser : possibility from app_list : firefox
  LAUNCHY_DEBUG: Checking if class Launchy::Detect::NixDesktopEnvironment::Kde is the one for is_current_desktop_environment?()}
  LAUNCHY_DEBUG: Checking if class Launchy::Detect::NixDesktopEnvironment::Gnome is the one for is_current_desktop_environment?()}
  LAUNCHY_DEBUG: Launchy::Application : Unable to find `gnome-open' in /home/dave/.rvm/gems/ruby-2.0.0-p247@myi/bin, /home/dave/.rvm/rubies/ruby-2.0.0-p247/bin, /home/dave/.rvm/gems/ruby-2.0.0-p247@global/bin, /home/dave/.rvm/bin, /usr/local/heroku/bin, /home/dave/.rvm/gems/ruby-2.0.0-p247/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /home/dave/JSMS
  LAUNCHY_DEBUG: Launchy::Application : found executable /usr/bin/firefox
  LAUNCHY_DEBUG: Launchy::Application : Unable to find `seamonkey' in /home/dave/.rvm/gems/ruby-2.0.0-p247@myi/bin, /home/dave/.rvm/rubies/ruby-2.0.0-p247/bin, /home/dave/.rvm/gems/ruby-2.0.0-p247@global/bin, /home/dave/.rvm/bin, /usr/local/heroku/bin, /home/dave/.rvm/gems/ruby-2.0.0-p247/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /home/dave/JSMS
  LAUNCHY_DEBUG: Launchy::Application : Unable to find `opera' in /home/dave/.rvm/gems/ruby-2.0.0-p247@myi/bin, /home/dave/.rvm/rubies/ruby-2.0.0-p247/bin, /home/dave/.rvm/gems/ruby-2.0.0-p247@global/bin, /home/dave/.rvm/bin, /usr/local/heroku/bin, /home/dave/.rvm/gems/ruby-2.0.0-p247/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /home/dave/JSMS
  LAUNCHY_DEBUG: Launchy::Application : Unable to find `mozilla' in /home/dave/.rvm/gems/ruby-2.0.0-p247@myi/bin, /home/dave/.rvm/rubies/ruby-2.0.0-p247/bin, /home/dave/.rvm/gems/ruby-2.0.0-p247@global/bin, /home/dave/.rvm/bin, /usr/local/heroku/bin, /home/dave/.rvm/gems/ruby-2.0.0-p247/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /home/dave/JSMS
  LAUNCHY_DEBUG: Launchy::Application : Unable to find `netscape' in /home/dave/.rvm/gems/ruby-2.0.0-p247@myi/bin, /home/dave/.rvm/rubies/ruby-2.0.0-p247/bin, /home/dave/.rvm/gems/ruby-2.0.0-p247@global/bin, /home/dave/.rvm/bin, /usr/local/heroku/bin, /home/dave/.rvm/gems/ruby-2.0.0-p247/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /home/dave/JSMS
  LAUNCHY_DEBUG: Launchy::Application : Unable to find `galeon' in /home/dave/.rvm/gems/ruby-2.0.0-p247@myi/bin, /home/dave/.rvm/rubies/ruby-2.0.0-p247/bin, /home/dave/.rvm/gems/ruby-2.0.0-p247@global/bin, /home/dave/.rvm/bin, /usr/local/heroku/bin, /home/dave/.rvm/gems/ruby-2.0.0-p247/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /home/dave/JSMS
  LAUNCHY_DEBUG: Launchy::Application::Browser : Using browser value 'firefox'
  Fast Debugger (ruby-debug-ide 0.4.22, debase 0.0.9) listens on 127.0.0.1:49751
  LAUNCHY_DEBUG: wet_run: before exec in child process
  LAUNCHY_DEBUG: commandline_normalized =&gt; firefox /home/dave/my_i/tmp/capybara/capybara-201401200000077817027890.html
  
  (process:18970): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
  </code></pre>
  
  <p>Weird thing is it looks like it's finding firefox, however my default browser is chrome</p>
  
  <pre><code>$ sudo update-alternatives --config x-www-browser
  </code></pre>
  
  <p>This returns </p>
  
  <pre><code>There are 2 choices for the alternative x-www-browser (providing /usr/bin/x-www-browser).
  
    Selection    Path                           Priority   Status
  ------------------------------------------------------------
  * 0            /usr/bin/google-chrome-stable   200       auto mode
    1            /usr/bin/firefox                40        manual mode
    2            /usr/bin/google-chrome-stable   200       manual mode
  </code></pre>
  
  <p>The other weird thing, it looks like firefox is running (in system monitor I see the process)
  However I don't have any firefox window and when i try to start firefox I get the error</p>
  
  <pre><code>Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system
  </code></pre>
  
  <p>So a few issues here</p>
  
  <p>a) I expected Launchy to be using chrome not firefox</p>
  
  <p>b) Firefox process doesn't seem to start correctly (however I can start firefox normally otherwise)</p>