I am running tests with SE2 and firefoxDriver in a headless enviroment(Xvfb). With FirefoxDriver I can set the DISPLAY environment property very easily:
FirefoxBinary firefox = new FirefoxBinary();
firefox.setEnvironmentProperty("DISPLAY",":"+DISPLAY);
FirefoxProfile firefoxProfile = new ProfilesIni().getProfile(Config.webDriverFirefoxProfile);
this.webDriver = new FirefoxDriver(firefox,firefoxProfile);
How can I do the above with ChromeDriver?
UPDATE: Seems that this is not possible to do yet! There is a similar question with mine here where explains the situation: ChromeDriver Headless
looks like they've fixed this (at least for now)
Here's the revision in the code which adds this method: http://code.google.com/p/selenium/source/detail?r=15232
another non-programmatic approach, go to /etc/chromium/default (or /etc/chromium-browser/default or similar, depends on distribution) and set display there :