mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2024-11-28 02:53:41 +01:00
vncserver: extract ConstructXvncCmd()
This commit is contained in:
parent
4a63e93582
commit
6181c249d7
@ -107,24 +107,7 @@ unlink($desktopLog);
|
|||||||
# Now start the X VNC Server
|
# Now start the X VNC Server
|
||||||
|
|
||||||
# We build up our Xvnc command with options
|
# We build up our Xvnc command with options
|
||||||
$cmd = $exedir."Xvnc :$displayNumber";
|
$cmd = &ConstructXvncCmd();
|
||||||
|
|
||||||
foreach my $k (sort keys %config) {
|
|
||||||
$cmd .= " -$k $config{$k}";
|
|
||||||
delete $default_opts{$k}; # file options take precedence
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach my $k (sort keys %default_opts) {
|
|
||||||
$cmd .= " -$k $default_opts{$k}";
|
|
||||||
}
|
|
||||||
|
|
||||||
# Add color database stuff here, e.g.:
|
|
||||||
# $cmd .= " -co /usr/lib/X11/rgb";
|
|
||||||
|
|
||||||
foreach $arg (@ARGV) {
|
|
||||||
$cmd .= " " . "edString($arg);
|
|
||||||
}
|
|
||||||
$cmd .= " >> " . "edString($desktopLog) . " 2>&1";
|
|
||||||
|
|
||||||
# Run $cmd and record the process ID.
|
# Run $cmd and record the process ID.
|
||||||
$pidFile = "$vncUserDir/$host:$displayNumber.pid";
|
$pidFile = "$vncUserDir/$host:$displayNumber.pid";
|
||||||
@ -933,3 +916,26 @@ sub SetupXauthorityFile {
|
|||||||
print XAUTH "add $host/unix:$displayNumber . $cookie\n";
|
print XAUTH "add $host/unix:$displayNumber . $cookie\n";
|
||||||
close(XAUTH);
|
close(XAUTH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub ConstructXvncCmd {
|
||||||
|
my $cmd = $exedir."Xvnc :$displayNumber";
|
||||||
|
|
||||||
|
foreach my $k (sort keys %config) {
|
||||||
|
$cmd .= " -$k $config{$k}";
|
||||||
|
delete $default_opts{$k}; # file options take precedence
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach my $k (sort keys %default_opts) {
|
||||||
|
$cmd .= " -$k $default_opts{$k}";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Add color database stuff here, e.g.:
|
||||||
|
# $cmd .= " -co /usr/lib/X11/rgb";
|
||||||
|
|
||||||
|
foreach $arg (@ARGV) {
|
||||||
|
$cmd .= " " . "edString($arg);
|
||||||
|
}
|
||||||
|
$cmd .= " >> " . "edString($desktopLog) . " 2>&1";
|
||||||
|
|
||||||
|
return $cmd;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user