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,