selenium server, selenium client, on an UBUNTU GUI server
<p>i have a <code>VPS</code> with <code>ubuntu 14.04 LTS</code> and with the desktop package installed, that mean I can launch firefox from a <code>ssh -X</code> session.
To make tests, I launched from my server the selenium standalone server jar <code>(selenium-server-standalone-3.0.0-beta3.jar)</code>
After launching it, in another ssh session, i just enter python commands :</p>

<pre><code>from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
</code></pre>

<p>And after that, following the instructions from 
<a href="http://selenium-python.readthedocs.io/getting-started.html#using-selenium-with-remote-webdriver" rel="nofollow">http://selenium-python.readthedocs.io/getting-started.html#using-selenium-with-remote-webdriver</a>, I enter :</p>

<pre><code>driver = webdriver.Remote(
command_executor='http://127.0.0.1:4444/wd/hub',
desired_capabilities=DesiredCapabilities.FIREFOX)
</code></pre>

<p>After 45sec, i have lots of errors in both server window and client window.
Here is the main error :</p>

<blockquote>
  <p>Caused by: org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
      Error: GDK_BACKEND does not match available displays</p>
</blockquote>

<p>I saw some people with the same problem, but even with the latest java and selenium versions, i still got this issue. 
Thank you in advance for your help</p>

<p>It seems you're trying <code>selenium 3</code> with latest firefox version. To support latest firefox with <code>selenium 3</code>, need to <a href="https://github.com/mozilla/geckodriver/releases" rel="nofollow">download latest <code>geckodriver</code> executable from this link</a> and extract it into you system at any location.</p>

<p>Now to run <code>selenium-server-standalone-3.0.0-beta3.jar</code> use below command :-</p>

<pre><code>java -jar selenium-server-standalone-3.0.0-beta3.jar -Dwebdriver.gecko.driver = "path/to/downloaded geckodriver"
</code></pre>

<p>Now you need to set capability with <code>marionette</code> property to <code>true</code> to support latest firefox with <code>selenium 3</code> as below :-</p>

<pre><code>from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities

caps = DesiredCapabilities.FIREFOX

# Tell the Python bindings to use Marionette.
caps["marionette"] = True

driver = webdriver.Remote(command_executor = 'http://127.0.0.1:4444/wd/hub', desired_capabilities = caps)
</code></pre>

<p><strong>Note</strong> :- For more <a href="https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver" rel="nofollow">information about <code>marionette</code> follow this <code>Mozilla</code> official page</a></p>

java python selenium ubuntu ssh