From 895f8bc10da2438bd42730bf4344571f6d4428dd Mon Sep 17 00:00:00 2001 From: Dmitry Maksyoma Date: Mon, 9 Aug 2021 23:24:30 +1200 Subject: [PATCH] vncserver: refactor --- unix/vncserver | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/unix/vncserver b/unix/vncserver index b8ada5e..7435271 100755 --- a/unix/vncserver +++ b/unix/vncserver @@ -35,9 +35,6 @@ &CreateDotVncDir(); -$displayNumber = &DetectDisplayNumberFromCliArgs() || - &GetLowestAvailableDisplayNumber(); -&CheckCliOptionsForBeingValid(); $vncPort = 5900 + $displayNumber; $desktopName = $opt{'-name'} || "$host:$displayNumber ($ENV{USER})"; @@ -1045,4 +1042,7 @@ sub ParseAndProcessCliOptions { &ParseOptionsAndRemoveMatchesFromARGV(@supportedOptions); &ProcessCliOptions(); &CheckGeometryAndDepthAreSensible(); + $displayNumber = &DetectDisplayNumberFromCliArgs() || + &GetLowestAvailableDisplayNumber(); + &CheckCliOptionsForBeingValid(); }