vncserver: ask to choose DE spike

This commit is contained in:
Dmitry Maksyoma 2021-07-25 23:21:05 +12:00
parent 6bdcbc32b1
commit 7c28908722
2 changed files with 21 additions and 0 deletions

16
builder/startup/deb/select-de.sh Normal file → Executable file
View File

@ -125,3 +125,19 @@ SCRIPT
user_asked_to_select_de() {
[[ "$action" = "select-de-and-start" ]]
}
debug() {
if [ -z "$debug" ]; then return; fi
echo "$@"
}
if user_asked_to_select_de || ! de_was_selected_on_previous_run; then
detect_desktop_environments
ask_user_to_choose_de
debug "You selected $de_name desktop environment"
if [[ "$de_name" != "$manual_xstartup_choice" ]]; then
setup_de_to_run_via_xstartup
fi
remember_de_choice
fi

View File

@ -179,6 +179,11 @@ if (!(-e $vncUserDir)) {
}
}
$selectDeCmd = "builder/startup/deb/select-de.sh";
if (!$skipxstartup) {
system($selectDeCmd);
}
# Find display number.
if ((@ARGV > 0) && ($ARGV[0] =~ /^:(\d+)$/)) {
$displayNumber = $1;