diff --git a/quickemu b/quickemu index 9f1232d941..586a8cb048 100755 --- a/quickemu +++ b/quickemu @@ -2295,7 +2295,7 @@ function usage() { echo " --cpu-pinning : Choose which host cores correspond to which guest cores." echo " --delete-disk : Delete the disk image and EFI variables" echo " --delete-vm : Delete the entire VM and its configuration" - echo " --display : Select display backend. 'sdl' (default), 'cocoa', 'gtk', 'none', 'spice' or 'spice-app'" + echo " --display : Select display backend. 'gtk' (default), 'sdl', 'cocoa', 'none', 'spice' or 'spice-app'" echo " --fullscreen : Starts VM in full screen mode (Ctl+Alt+f to exit)" echo " --ignore-msrs-always : Configure KVM to always ignore unhandled machine-specific registers" echo " --ignore-tsc-warning : Skip TSC stability warning for macOS VMs on AMD" @@ -2338,6 +2338,14 @@ function display_param_check() { usb_controller="xhci" fi + # Fallback to SDL if GTK display is not available + if [ "${display}" == "gtk" ]; then + if ! "${QEMU}" -display help 2>&1 | grep -q "^gtk$"; then + echo " - NOTE: GTK display not available, falling back to SDL" + display="sdl" + fi + fi + if [ "${OS_KERNEL}" == "Darwin" ]; then if [ "${display}" != "cocoa" ] && [ "${display}" != "none" ]; then echo "ERROR! Requested output '${display}' but only 'cocoa' and 'none' are avalible on macOS." @@ -2525,7 +2533,7 @@ cpu_cores="" disk_format="${disk_format:-qcow2}" disk_img="${disk_img:-}" disk_size="${disk_size:-16G}" -display="${display:-sdl}" +display="${display:-gtk}" extra_args="${extra_args:-}" fixed_iso="" floppy=""