mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2024-11-23 16:43:15 +01:00
vncserver: fix -websocketPort being ignored
This commit is contained in:
parent
f3681c87f9
commit
7cced9dd05
@ -1117,7 +1117,7 @@ sub DefineFilePathsAndStuff {
|
||||
}
|
||||
|
||||
sub ParseAndProcessCliOptions {
|
||||
my @supportedOptions = ("-geometry",1,"-depth",1,"-pixelformat",1,"-name",1,"-kill",1,"-help",0,"-h",0,"--help",0,"-fp",1,"-list",0,"-fg",0,"-autokill",0,"-noxstartup",0,"-xstartup",1,"-select-de",OPTIONAL_ARG_VALUE, "-interface", REQUIRED_ARG_VALUE, '-debug', NO_ARG_VALUE);
|
||||
my @supportedOptions = ("-geometry",1,"-depth",1,"-pixelformat",1,"-name",1,"-kill",1,"-help",0,"-h",0,"--help",0,"-fp",1,"-list",0,"-fg",0,"-autokill",0,"-noxstartup",0,"-xstartup",1,"-select-de",OPTIONAL_ARG_VALUE, "-interface", REQUIRED_ARG_VALUE, '-debug', NO_ARG_VALUE, '-websocketPort', REQUIRED_ARG_VALUE);
|
||||
ParseOptionsAndRemoveMatchesFromARGV(@supportedOptions);
|
||||
ProcessCliOptions();
|
||||
CheckGeometryAndDepthAreSensible();
|
||||
@ -1140,7 +1140,8 @@ sub PrepareDefaultsForPassingToXvnc {
|
||||
%default_opts;
|
||||
%config;
|
||||
|
||||
$websocketPort = $defaultWebsocketPort + $displayNumber;
|
||||
$websocketPort = $opt{"-websocketPort"} || \
|
||||
GenerateWebsocketPortFromDisplayNumber();
|
||||
$desktopName = $opt{'-name'} || "$host:$displayNumber ($ENV{USER})";
|
||||
|
||||
SetReasonabeDefaults();
|
||||
@ -1148,6 +1149,10 @@ sub PrepareDefaultsForPassingToXvnc {
|
||||
CheckBrowserHostDefined();
|
||||
}
|
||||
|
||||
sub GenerateWebsocketPortFromDisplayNumber {
|
||||
$defaultWebsocketPort + $displayNumber;
|
||||
}
|
||||
|
||||
sub EnsureAtLeastOneKasmUserExists {
|
||||
@kasmPasswdUsers = LoadKasmPasswdUsers();
|
||||
if (!AtLeastOneUserConfigured()) {
|
||||
|
Loading…
Reference in New Issue
Block a user