From 630513400d6985b182f40d61c51f6765b94c7873 Mon Sep 17 00:00:00 2001 From: 90 Date: Sun, 17 Mar 2024 18:40:45 +0000 Subject: [PATCH] Delete 'userconfig' hash key after use to not pass to X invocation --- unix/vncserver/vncserver.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/unix/vncserver/vncserver.in b/unix/vncserver/vncserver.in index 4f67489768..5d87eb7338 100755 --- a/unix/vncserver/vncserver.in +++ b/unix/vncserver/vncserver.in @@ -120,7 +120,12 @@ $default_opts{pn} = undef; LoadConfig($vncSystemConfigDefaultsFile); # Then the user's settings (location overrideable by previous system defaults) -LoadConfig($config{'userconfig'} || $vncUserConfig); +if (exists $config{'userconfig'}) { + LoadConfig($config{'userconfig'}); + delete $config{'userconfig'}; +} else { + LoadConfig($vncUserConfig); +} # And then override anything set above if mandatory settings exist. # WARNING: "Mandatory" is used loosely here! As the man page says,