mirror of
https://github.com/oSoWoSo/DistroHopper.git
synced 2024-08-14 22:46:53 +00:00
add a display setting in the conf file
This commit is contained in:
parent
0af524e3e5
commit
194b303a54
1 changed files with 21 additions and 8 deletions
29
quickemu
29
quickemu
|
@ -1033,6 +1033,16 @@ function usage() {
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function display_param_check() {
|
||||||
|
if [ "${OUTPUT}" != "gtk" ] && [ "${OUTPUT}" != "none" ] && [ "${OUTPUT}" != "sdl" ] && [ "${OUTPUT}" != "spice" ]; then
|
||||||
|
echo "ERROR! Requested output '${OUTPUT}' is not recognised."
|
||||||
|
exit 1
|
||||||
|
elif [ "${OUTPUT}" == "spice" ] && ! command -v spicy &>/dev/null; then
|
||||||
|
echo "ERROR! Requested SPICE display, but 'spicy' is not installed."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Lowercase variables are used in the VM config file only
|
# Lowercase variables are used in the VM config file only
|
||||||
boot="efi"
|
boot="efi"
|
||||||
bridge=""
|
bridge=""
|
||||||
|
@ -1056,7 +1066,7 @@ DELETE_DISK=0
|
||||||
DELETE_VM=0
|
DELETE_VM=0
|
||||||
FULLSCREEN=""
|
FULLSCREEN=""
|
||||||
FULLSPICY=""
|
FULLSPICY=""
|
||||||
OUTPUT="sdl"
|
OUTPUT=""
|
||||||
PUBLIC=""
|
PUBLIC=""
|
||||||
PUBLIC_PERMS=""
|
PUBLIC_PERMS=""
|
||||||
PUBLIC_TAG=""
|
PUBLIC_TAG=""
|
||||||
|
@ -1121,13 +1131,7 @@ else
|
||||||
shift;;
|
shift;;
|
||||||
-display|--display)
|
-display|--display)
|
||||||
OUTPUT="${2}"
|
OUTPUT="${2}"
|
||||||
if [ "${OUTPUT}" != "gtk" ] && [ "${OUTPUT}" != "none" ] && [ "${OUTPUT}" != "sdl" ] && [ "${OUTPUT}" != "spice" ]; then
|
display_param_check
|
||||||
echo "ERROR! Requested output '${OUTPUT}' is not recognised."
|
|
||||||
exit 1
|
|
||||||
elif [ "${OUTPUT}" == "spice" ] && ! command -v spicy &>/dev/null; then
|
|
||||||
echo "ERROR! Requested SPICE display, but 'spicy' is not installed."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
shift
|
shift
|
||||||
shift;;
|
shift;;
|
||||||
-fullscreen|--fullscreen|-full-screen|--full-screen)
|
-fullscreen|--fullscreen|-full-screen|--full-screen)
|
||||||
|
@ -1199,6 +1203,15 @@ if [ -n "${VM}" ] && [ -e "${VM}" ]; then
|
||||||
disk_size="${disk}"
|
disk_size="${disk}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "${OUTPUT}" ]; then
|
||||||
|
if [ -z "${display}" ]; then
|
||||||
|
OUTPUT="sdl"
|
||||||
|
else
|
||||||
|
OUTPUT="${display}"
|
||||||
|
display_param_check
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "${tpm}" == "on" ]; then
|
if [ "${tpm}" == "on" ]; then
|
||||||
SWTPM=$(command -v swtpm)
|
SWTPM=$(command -v swtpm)
|
||||||
if [ ! -e "${SWTPM}" ]; then
|
if [ ! -e "${SWTPM}" ]; then
|
||||||
|
|
Loading…
Reference in a new issue