mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2025-01-07 14:39:48 +01:00
vncserver: extract StartXvncOrExit()
This commit is contained in:
parent
cc90fe9ff6
commit
8ca36e349e
@ -49,22 +49,7 @@ if ($kasmAuthEnabled) {
|
|||||||
|
|
||||||
&SetupXauthorityFile();
|
&SetupXauthorityFile();
|
||||||
|
|
||||||
# Now start the X VNC Server
|
&StartXvncOrExit();
|
||||||
|
|
||||||
$cmd = &ConstructXvncCmd();
|
|
||||||
|
|
||||||
&DeleteLogLeftFromPreviousXvncRun();
|
|
||||||
&StartXvncAndRecordPID();
|
|
||||||
&WaitForXvncToRespond();
|
|
||||||
|
|
||||||
if (!&IsXvncRunning() && !&UsingSafeFontPath()) {
|
|
||||||
&StartXvncWithSafeFontPath();
|
|
||||||
&WaitForXvncToRespond();
|
|
||||||
}
|
|
||||||
|
|
||||||
unless (&IsXvncRunning()) {
|
|
||||||
&WarnUserXvncNotStartedAndExit();
|
|
||||||
}
|
|
||||||
|
|
||||||
warn "\nNew '$desktopName' desktop is $host:$displayNumber\n";
|
warn "\nNew '$desktopName' desktop is $host:$displayNumber\n";
|
||||||
&PrintKasmUsers();
|
&PrintKasmUsers();
|
||||||
@ -1067,3 +1052,20 @@ sub EnsureAtLeastOneKasmUserExists {
|
|||||||
@kasmPasswdUsers = &LoadKasmPasswdUsers();
|
@kasmPasswdUsers = &LoadKasmPasswdUsers();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub StartXvncOrExit {
|
||||||
|
$cmd = &ConstructXvncCmd();
|
||||||
|
|
||||||
|
&DeleteLogLeftFromPreviousXvncRun();
|
||||||
|
&StartXvncAndRecordPID();
|
||||||
|
&WaitForXvncToRespond();
|
||||||
|
|
||||||
|
if (!&IsXvncRunning() && !&UsingSafeFontPath()) {
|
||||||
|
&StartXvncWithSafeFontPath();
|
||||||
|
&WaitForXvncToRespond();
|
||||||
|
}
|
||||||
|
|
||||||
|
unless (&IsXvncRunning()) {
|
||||||
|
&WarnUserXvncNotStartedAndExit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user