From ed1e85fb12b2a4cdc377e1777c6c26f187af0801 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Sat, 11 May 2024 12:09:51 +0100 Subject: [PATCH] fix: only run glxinfo if it is installed --- quickemu | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/quickemu b/quickemu index 324b1cb..4dd48df 100755 --- a/quickemu +++ b/quickemu @@ -1881,11 +1881,15 @@ if [ -n "${VM}" ] && [ -e "${VM}" ]; then # Set the default 3D acceleration. if [ -z "${gl}" ]; then - GLSL_VER=$(glxinfo | grep "OpenGL ES GLSL" | awk '{print $NF}') - case ${GLSL_VER} in - 1*|2*) gl="off";; - *) gl="on";; - esac + if command -v glxinfo &>/dev/null; then + GLSL_VER=$(glxinfo | grep "OpenGL ES GLSL" | awk '{print $NF}') + case ${GLSL_VER} in + 1*|2*) gl="off";; + *) gl="on";; + esac + else + gl="on" + fi fi if [ -z "${PUBLIC}" ]; then