|
|
@ -111,7 +111,7 @@ $cmd = &ConstructXvncCmd();
|
|
|
|
|
|
|
|
|
|
|
|
# Run $cmd and record the process ID.
|
|
|
|
# Run $cmd and record the process ID.
|
|
|
|
$pidFile = "$vncUserDir/$host:$displayNumber.pid";
|
|
|
|
$pidFile = "$vncUserDir/$host:$displayNumber.pid";
|
|
|
|
system("$cmd & echo \$! >$pidFile");
|
|
|
|
&StartXAndRecordPID();
|
|
|
|
|
|
|
|
|
|
|
|
# Give Xvnc a chance to start up
|
|
|
|
# Give Xvnc a chance to start up
|
|
|
|
|
|
|
|
|
|
|
@ -130,7 +130,7 @@ if ($fontPath ne $defFontPath) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$cmd =~ s@-fp [^ ]+@@;
|
|
|
|
$cmd =~ s@-fp [^ ]+@@;
|
|
|
|
$cmd .= " -fp $defFontPath" if ($defFontPath);
|
|
|
|
$cmd .= " -fp $defFontPath" if ($defFontPath);
|
|
|
|
system("$cmd & echo \$! >$pidFile");
|
|
|
|
&StartXAndRecordPID();
|
|
|
|
sleep(3);
|
|
|
|
sleep(3);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -939,3 +939,7 @@ sub ConstructXvncCmd {
|
|
|
|
|
|
|
|
|
|
|
|
return $cmd;
|
|
|
|
return $cmd;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sub StartXAndRecordPID {
|
|
|
|
|
|
|
|
system("$cmd & echo \$! >$pidFile");
|
|
|
|
|
|
|
|
}
|
|
|
|