vncserver: add -select-de

This commit is contained in:
Dmitry Maksyoma 2021-09-10 22:31:48 +12:00
parent 6287114cbf
commit dbd54fe35c

View File

@ -728,9 +728,25 @@ sub AskUserToChooseDeOrManualXstartup {
}
&ForgetSelectedDe();
$selectDeCmd = &ConstructSelectDeCmd();
system($selectDeCmd) == 0 || die("Failed to execute $selectDeCmd\n");
}
sub ConstructSelectDeCmd {
my $cmd = "$selectDeBin";
my $specifiedDe = $opt{'-select-de'};
if ($specifiedDe) {
$cmd .= " --select-de";
if ($specifiedDe != 1) {
$cmd .= " $specifiedDe";
}
}
$cmd;
}
sub ForgetSelectedDe {
unlink $de_was_selected_file;
}
@ -1018,7 +1034,7 @@ sub DefineFilePathsAndStuff {
$vncUserConfig = "$vncUserDir/config";
$kasmPasswdFile = "$ENV{HOME}/.kasmpasswd";
$selectDeCmd = "/src/builder/startup/deb/select-de.sh";
$selectDeBin = "/src/builder/startup/deb/select-de.sh";
$de_was_selected_file="$ENV{HOME}/.vnc/.de-was-selected";
$vncSystemConfigDir = "/etc/kasmvnc";