From 4dad442e76a7aa0d992a9d9537e68f68060a595d Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Feb 09 2025 14:33:00 +0000 Subject: livesys-lxqt: Detect if Wayland is available to use it by default This is part of the LXQt 2.1 Change. Reference: https://fedoraproject.org/wiki/Changes/LXQt_2.1 --- diff --git a/libexec/livesys/sessions.d/livesys-lxqt b/libexec/livesys/sessions.d/livesys-lxqt index dc107f1..09c2a22 100755 --- a/libexec/livesys/sessions.d/livesys-lxqt +++ b/libexec/livesys/sessions.d/livesys-lxqt @@ -5,15 +5,22 @@ # +# determine if wayland session is available +if $(rpm -q lxqt-wayland-session > /dev/null 2>&1) ; then + DEFAULT_DESKTOP="lxqt-wayland.desktop" +else + DEFAULT_DESKTOP="lxqt.desktop" +fi + # set up autologin for user liveuser if [ -f /etc/sddm.conf ]; then sed -i 's/^#User=.*/User=liveuser/' /etc/sddm.conf -sed -i 's/^#Session=.*/Session=lxqt.desktop/' /etc/sddm.conf +sed -i "s/^#Session=.*/Session=${DEFAULT_DESKTOP}/" /etc/sddm.conf else cat > /etc/sddm.conf << SDDM_EOF [Autologin] User=liveuser -Session=lxqt.desktop +Session=${DEFAULT_DESKTOP} SDDM_EOF fi