From ee3b7f9aa527be8951f341b3cdd60c7c750fda26 Mon Sep 17 00:00:00 2001 From: Dmitry Maksyoma Date: Wed, 13 Oct 2021 22:45:47 +1300 Subject: [PATCH] vncserver: add easy -debug option to pass -log to Xvnc --- unix/vncserver | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/unix/vncserver b/unix/vncserver index d63a518..f2c5a69 100755 --- a/unix/vncserver +++ b/unix/vncserver @@ -732,6 +732,10 @@ sub ProcessCliOptions { $fontPath = $opt{'-fp'}; $fpArgSpecified = 1; } + if ($opt{'-debug'}) { + delete $opt{'-debug'}; + $opt{'-log'} = '*:stderr:100'; + } } sub CreateDotVncDir { @@ -1102,7 +1106,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, "-interface", REQUIRED_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_VALUE, "-interface", REQUIRED_ARG_VALUE, '-debug', NO_ARG_VALUE); &ParseOptionsAndRemoveMatchesFromARGV(@supportedOptions); &ProcessCliOptions(); &CheckGeometryAndDepthAreSensible();