vncserver: swallow -interface and pass through to Xvnc

This commit is contained in:
Dmitry Maksyoma 2021-10-04 22:52:59 +13:00
parent ca42870585
commit e453c7d73b

View File

@ -957,11 +957,24 @@ sub ConstructXvncCmd {
foreach $arg (@ARGV) {
$cmd .= " " . &quotedString($arg);
}
$cmd .= SwallowedArgs();
$cmd .= " >> " . &quotedString($desktopLog) . " 2>&1";
return $cmd;
}
sub SwallowedArgs {
my $cmd;
if ($opt{"-interface"}) {
$cmd .= " " . "-interface " . &quotedString($opt{"-interface"});
}
$cmd;
}
sub StartXvncAndRecordPID {
system("$cmd & echo \$! >$pidFile");
}
@ -1085,7 +1098,7 @@ sub DefineFilePathsAndStuff {
}
sub ParseAndProcessCliOptions {
my @supportedOptions = ("-geometry",1,"-depth",1,"-pixelformat",1,"-name",1,"-kill",1,"-help",0,"-h",0,"--help",0,"-fp",1,"-list",0,"-fg",0,"-autokill",0,"-noxstartup",0,"-xstartup",1,"-select-de",OPTIONAL_ARG_VALUE);
my @supportedOptions = ("-geometry",1,"-depth",1,"-pixelformat",1,"-name",1,"-kill",1,"-help",0,"-h",0,"--help",0,"-fp",1,"-list",0,"-fg",0,"-autokill",0,"-noxstartup",0,"-xstartup",1,"-select-de",OPTIONAL_ARG_VALUEi, "-interface", REQUIRED_ARG_VALUE);
&ParseOptionsAndRemoveMatchesFromARGV(@supportedOptions);
&ProcessCliOptions();
&CheckGeometryAndDepthAreSensible();