) {
# if (/Client\s+(\S+)\s+gone/i) {
# kill(TERM, $pid);
# last;
# }
# }
# close(VNC);
# exit;
# }
# Run the specified program, using the selected display
# $ENV{'DISPLAY'} = "localhost:$num";
# system("$config{'program'} >/dev/null 2>&1 /dev/null 2>&1 &");
# password and queries XDMCP for login
# system("Xvnc -query localhost -geometry $config{'width'}x$config{'height'} -interface $addr -SecurityTypes TLSNone,None :0 >/dev/null 2>&1 &");
#}
$port = $config{'port'};
$addr = $config{'host'} ? $config{'host'} :
$ENV{'SERVER_NAME'} ? $ENV{'SERVER_NAME'} :
&to_ipaddress(&get_system_hostname());
$SIG{ALRM} = "connect_timeout";
alarm(10);
&open_socket($addr, $port, STEST, \$err);
close(STEST);
# Proxy server not listening on the specfied address and port
# Need to run ./utils/novnc_proxy --vnc $addr:5900 --ssl-only --listen $addr:$port
if ($err) {
system("./utils/novnc_proxy --cert /etc/webmin/miniserv.pem --vnc 127.0.0.1:5900 --ssl-only --web NONE --listen $addr:$port >/dev/null 2>&1 &");
}
print "";
print "";
print "
\n";
print "$text{'index_credits'}\n";
print "\n";
&ui_print_footer("/", $text{'index'});
sub connect_timeout
{
}
sub error_exit
{
print "",@_,"
\n";
&ui_print_footer("/", $text{'index'});
exit;
}