#!/usr/bin/perl use strict; use warnings; my $server = $ARGV[0]; my $client = $ARGV[1]; my $display = $ARGV[2]; my $variable = $ARGV[3]; $ENV{"DISPLAY"} = $display . ":0.0"; my $bin = "/usr/local/bin/"; my $port = "2222" . ( $variable + 1 ); $ENV{"PORT"} = $port; #Start the server my $server_path = $bin . $server; system "$server_path &"; sleep 2; # Start up the client my $client_path = $bin . $client; system "$client_path";