From: Chris Nehren Date: Fri, 15 Apr 2011 05:11:17 +0000 (-0400) Subject: fix X11 display handling X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=04738d0e251e7bf9c6700d8cf206445ffde4e378;p=scpubgit%2FTest-Harness-Selenium.git fix X11 display handling --- diff --git a/lib/Test/Harness/Selenium.pm b/lib/Test/Harness/Selenium.pm index e0097e8..4b6cf60 100644 --- a/lib/Test/Harness/Selenium.pm +++ b/lib/Test/Harness/Selenium.pm @@ -40,6 +40,7 @@ sub new { $args{selenium_rc}{port} = $ENV{SELENIUM_RC_PORT}; $args{selenium_rc}{start} = $ENV{SELENIUM_RC_START}; } + $args{selenium_rc}{xvnc_display} //= '0'; my $self = \%args; bless $self, $class; } @@ -48,7 +49,8 @@ sub start_selenium_server { my($self) = @_; if($self->{selenium_rc}{start}) { $self->{selenium_rc}{xvnc_server_proc} = Child->new(sub { - system('ssh', $self->{selenium_rc}{host}, 'vncserver'); + system('ssh', $self->{selenium_rc}{host}, 'vncserver', + ":$self->{selenium_rc}{xvnc_display}"); } ); $self->{selenium_rc}{xvnc_server_proc}->start;