I want to run selenium tests on a Hudson slave.
The slave (i.e. the machine) that will execute the selenium is a Ubuntu 10.04.
Thus it has Gnome. Selenium needs a firefox to run.
What Hudson does now is, it creates a ssh connection to the Ubuntu machine and launches selenium there. Selenium tries to start a firefox.
And now it blames:
Error: cannot open display
What needs to be done that the 'ssh shell' gets a display from the X-server?
Make sure that the remote machine has ssh X11 forwarding enabled:
Use
ssh -X user@remote_machine
to connect to remote machine. If on remote machine you are using a different user to start the X client, usexauth list
to get the current credentials in the ssh user, then usexauth add
to add the credentials to the user you are becoming with sudo/su.If the question is what I think it is
Will start firefox on ubuntuhost and have it display on that machine, assuming testuser is logged on to ubuntuhost already.
I don't know Selenium, or what exactly you're looking to test (performance, correctness of display, or simply a success return value from some javascript) but you might not even need a 'real' X server, i.e. one that actually appears on the monitor of the Ubuntu host. Xvfb might be helpful for you here, but that's beyond the scope of the original question...
You need to enable X forwarding, and run an X server locally. Pass
-X
or-Y
tossh
.ssh -X root@myserver or something like that
You need to forward X over the ssh tunnel, try this:
ssh -X host_IP
once logged in, start firefox in your terminal, it should forward your X-server to your local machine.