From acb979384108a1996a6fedfb8e4b2a544828c101 Mon Sep 17 00:00:00 2001 From: Dmitry Maksyoma Date: Fri, 13 Aug 2021 01:18:09 +1200 Subject: [PATCH] vncserver: refactor --- unix/vncserver | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/unix/vncserver b/unix/vncserver index 12da952..4c0aa38 100755 --- a/unix/vncserver +++ b/unix/vncserver @@ -32,8 +32,6 @@ use Time::HiRes qw (sleep); &SetGlobalVariables(); &ParseAndProcessCliOptions(); -$vncPort = 5900 + $displayNumber; -$desktopName = $opt{'-name'} || "$host:$displayNumber ($ENV{USER})"; $desktopLog = "$vncUserDir/$host:$displayNumber.log"; $pidFile = "$vncUserDir/$host:$displayNumber.pid"; @@ -1043,6 +1041,9 @@ sub PrepareDefaultsForPassingToXvnc { %default_opts; %config; + $vncPort = 5900 + $displayNumber; + $desktopName = $opt{'-name'} || "$host:$displayNumber ($ENV{USER})"; + &SetReasonabeDefaults(); &LoadSystemThenUserThenMandatoryConfigs(); }