Skip to content

Commit

Permalink
vncserver: Add -test option to print Xvnc cmd line
Browse files Browse the repository at this point in the history
This is useful in conjunction with gdb or valgrind.

Closes #448
  • Loading branch information
dcommander committed Feb 13, 2025
1 parent 6bfe2af commit b8b99aa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion unix/vncserver.in
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ foreach $_registrydir (@registrydirs) {
"-x509key", 1, "-autokill", 0, "-quiet", 0, "-wm", 1,
"-sessionlist", 0, "-sessionstart", 0, "-novnc", 1,
"-noautokill", 0, "-rfbport", 1, "-rfbunixpath", 1, "-uds", 0,
"-userdbus", 0);
"-userdbus", 0, "-test", 0);

&Usage() if ($opt{'-help'} || $opt{'-h'} || $opt{'--help'});

Expand Down Expand Up @@ -486,6 +486,10 @@ if (!$opt{'-debug'}) {
# Run $cmd and record the process ID.

$pidFile = "$vncUserDir/$host:$displayNumber.pid";
if ($opt{'-test'}) {
print "$cmd\n";
exit;
}
system("$cmd & echo \$! >$pidFile");

# Record the RFB Unix domain socket path
Expand Down

0 comments on commit b8b99aa

Please sign in to comment.