diff --git a/unix/vncserver.in b/unix/vncserver.in index eca1df9be..b73906fbd 100644 --- a/unix/vncserver.in +++ b/unix/vncserver.in @@ -1,7 +1,7 @@ #!/usr/bin/env perl # -# Copyright (C) 2009-2018, 2020-2022, 2024 D. R. Commander. -# All Rights Reserved. +# Copyright (C) 2009-2018, 2020-2022, 2024-2025 D. R. Commander. +# All Rights Reserved. # Copyright (C) 2021 Steffen Kieß # Copyright (C) 2010 University Corporation for Atmospheric Research. # All Rights Reserved. @@ -213,7 +213,8 @@ foreach $_registrydir (@registrydirs) { "-3dwm", 0, "-vgl", 0, "-debug", 0, "-x509cert", 1, "-x509key", 1, "-autokill", 0, "-quiet", 0, "-wm", 1, "-sessionlist", 0, "-sessionstart", 0, "-novnc", 1, - "-noautokill", 0, "-rfbport", 1, "-rfbunixpath", 1, "-uds", 0); + "-noautokill", 0, "-rfbport", 1, "-rfbunixpath", 1, "-uds", 0, + "-test", 0); &Usage() if ($opt{'-help'} || $opt{'-h'} || $opt{'--help'}); @@ -490,6 +491,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