Closed balinterdi closed 15 years ago
Why not set the DISPLAY env variable at the shell level / for the rake task starting Selenium RC?
rake selenium:rc:start DISPLAY=:1
You are totally right, setting that env. var does not belong to the code.
In my case, I guess I'll have to set it when running the CI server since it is the CI server that runs the rake task.
Thank you.
When running selenium without a "visible" windowing system loaded defining the DISPLAY variable can be very useful.
In my case I wanted my CI server to automatically run my selenium tests but they failed since they want to start the browser without defining the DISPLAY where it will run. (see here:: http://wiki.openqa.org/display/SRC/Selenium-RC+and+Continuous+Integration)
So after a couple of hours of looking into how things work, I realized what I had to do was to insert the DISPLAY definition in front of the command that runs the selenium-server jar file. Something like this:
(remote_control.rb)
That feels like a hack, though so I wonder if there is a nicer option or whether you think this is the right approach.