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(); }