fix X11 display handling
Chris Nehren [Fri, 15 Apr 2011 05:11:17 +0000 (01:11 -0400)]
lib/Test/Harness/Selenium.pm

index e0097e8..4b6cf60 100644 (file)
@@ -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;