From 02a94566b2ed9234b6f09f135f502e7b39aa28ba Mon Sep 17 00:00:00 2001 From: "Josh.5" Date: Tue, 22 Aug 2023 15:02:35 +1200 Subject: [PATCH] Revert to starting steam from desktop autostart --- overlay/etc/cont-init.d/90-configure_steam.sh | 32 ++++++++++++++----- overlay/usr/bin/start-desktop.sh | 5 --- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/overlay/etc/cont-init.d/90-configure_steam.sh b/overlay/etc/cont-init.d/90-configure_steam.sh index 954c003..3f0202a 100644 --- a/overlay/etc/cont-init.d/90-configure_steam.sh +++ b/overlay/etc/cont-init.d/90-configure_steam.sh @@ -1,15 +1,31 @@ echo "**** Configure Steam ****" +steam_autostart_desktop="$(cat < /dev/null; then - # rm -fv "${USER_HOME:?}/.config/autostart/Steam.desktop" - # fi - rm -fv "${USER_HOME:?}/.config/autostart/Steam.desktop" + if [ "${MODE}" == "s" ] | [ "${MODE}" == "secondary" ]; then + echo "Enable Steam supervisor.d service" + sed -i 's|^autostart.*=.*$|autostart=true|' /etc/supervisor.d/steam.ini + else + echo "Enable Steam auto-start script" + mkdir -p "${USER_HOME:?}/.config/autostart" + echo "${steam_autostart_desktop:?}" > "${USER_HOME:?}/.config/autostart/Steam.desktop" + fi else echo "Disable Steam service" sed -i 's|^autostart.*=.*$|autostart=false|' /etc/supervisor.d/steam.ini diff --git a/overlay/usr/bin/start-desktop.sh b/overlay/usr/bin/start-desktop.sh index 5505b40..7270f3f 100755 --- a/overlay/usr/bin/start-desktop.sh +++ b/overlay/usr/bin/start-desktop.sh @@ -41,10 +41,5 @@ echo "**** Starting Xfce4 ****" /usr/bin/startxfce4 & desktop_pid=$! -if [ "${ENABLE_STEAM:-}" = "true" ]; then - echo "Start Steam service" - sudo supervisorctl start steam -fi - # WAIT FOR CHILD PROCESS: wait "$desktop_pid"