title: Selenium and Chromedriver won't talk to each other when started from command-line
body: <p>For our integration tests, we're using selenium and different (versions of) drivers for Chrome, Firefox and IE. There is no UI (or X for that matter) on our build-server, i.e. headless. We're using Xvfb for the virtual screen (framebuffer).</p>
  
  <p>There is no error if I run it on my local machine which has X (a UI).</p>
  
  <p>I have an easy enough test-class:</p>
  
  <pre><code>import java.io.IOException;
  import java.net.URL;
  
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.remote.DesiredCapabilities;
  import org.openqa.selenium.remote.RemoteWebDriver;
  
  public class Test {
  
      public static void main(String[] args) throws IOException, InterruptedException {
          WebDriver driver = new RemoteWebDriver(new URL("http://localhost:9515"), DesiredCapabilities.chrome());
          driver.get("http://www.google.com");
          Thread.sleep(2000);
          driver.quit();
      }
  </code></pre>
  
  <p>I then start the chromedriver on port 9515. The exception I'm getting is this:</p>
  
  <pre><code>abc@xyz:~/test$ java -cp $CLASSPATH Test
  
  (google-chrome:22323): Gtk-WARNING **: cannot open display: 
  [0124/165659:ERROR:ipc_sync_channel.cc(378)] Canceling pending sends
  chrome/test/automation/proxy_launcher.cc:107: Failure
  Value of: app_launched
    Actual: 5
  Expected: AUTOMATION_SUCCESS
  Which is: 0
  Error while awaiting automation ping from browser process
  [0124/165659:ERROR:automation_proxy.cc(319)] Channel error in AutomationProxy.
  [0124/165659:ERROR:ipc_sync_channel.cc(378)] Canceling pending sends
  [0124/165659:ERROR:ipc_sync_channel.cc(378)] Canceling pending sends
  Exception in thread "main" org.openqa.selenium.WebDriverException: Unable to either launch or connect to Chrome. Please check that ChromeDriver is up-to-date. Using Chrome binary at: /opt/google/chrome/google-chrome (WARNING: The server did not provide any stacktrace information); duration or timeout: 223 milliseconds
  Build info: version: '2.9.0', revision: '14289', time: '2011-10-20 23:22:17'
  System info: os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.32-28-server', java.version: '1.6.0_26'
  Driver info: driver.version: RemoteWebDriver
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:147)
      at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:113)
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:417)
      at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:115)
      at org.openqa.selenium.remote.RemoteWebDriver.&lt;init&gt;(RemoteWebDriver.java:76)
      at org.openqa.selenium.remote.RemoteWebDriver.&lt;init&gt;(RemoteWebDriver.java:84)
      at Test.main(Test.java:63)
  </code></pre>
  
  <p>I have been googling extensively and tried many different approaches. As I've been trying to solve this for over 2 days, I might be overlooking a small detail.</p>
  
  <p>I'm using:</p>
  
  <pre><code>$ uname -a
  Linux bryant 2.6.32-28-server #55-Ubuntu SMP Mon Jan 10 23:57:16 UTC 2011 x86_64 GNU/Linux
  </code></pre>
  
  <p>google-chrome-stable 24.0.1312.56-r177594
  chromedriver_linux64_23.0.1240.0, chromedriver_linux64_26.0.1383.0</p>
  
  <p>Any ideas on this?</p>