Run Sunshine as a service

Goodbye Flatpak Sunshine. Hello AppImage.
Until a deb package is available for Debian Bookworm, we can just run sunshine as an AppImage.
It is faster to startup and is a little less bloated.

The goal here is to run Sunshine as a service managed by supervisord so that it is kept running and is restarted automatically if stopped.
This commit is contained in:
Josh.5
2023-08-29 17:21:31 +12:00
committed by Josh Sunnex
parent 39d4ce0a0c
commit 97613b227f
10 changed files with 195 additions and 139 deletions

View File

@@ -19,7 +19,12 @@ trap _term SIGTERM SIGINT
# CONFIGURE:
export $(dbus-launch)
# Remove lockfile
rm -f /tmp/.started-desktop
# Start a session bus instance of dbus-daemon
# Note: This script should be the only one that waits for X after exporting this dbus session
rm -fv /tmp/.dbus-desktop-session.env
export_desktop_dbus_session
# EXECUTE PROCESS:
@@ -30,7 +35,6 @@ if [[ ! -f /tmp/.desktop-apps-updated.lock ]]; then
xterm -geometry 200x50+0+0 -ls -e /bin/bash -c "
source /usr/bin/install_firefox.sh;
source /usr/bin/install_protonup.sh;
source /usr/bin/install_sunshine.sh;
sleep 1;
"
touch /tmp/.desktop-apps-updated.lock
@@ -40,6 +44,7 @@ fi
echo "**** Starting Xfce4 ****"
/usr/bin/startxfce4 &
desktop_pid=$!
touch /tmp/.started-desktop
# WAIT FOR CHILD PROCESS:
wait "$desktop_pid"