feat: Add scripts and systemd services for SteamOS session management and game launching

This commit is contained in:
2025-10-31 19:57:42 +01:00
parent 7a7f2711fe
commit d42d717f6c
18 changed files with 63 additions and 13 deletions
@@ -36,6 +36,8 @@ start_gamescope() {
log "HDR disabled, no HDR flag added"
fi
env | tee -a "$LOG_FILE"
# Build gamescope argument array for safe quoting and readability
GAMESCOPE_ARGS=(
--generate-drm-mode fixed
@@ -82,10 +84,7 @@ start_kwin() {
exec dbus-run-session -- "$KWIN_BIN" ${KWIN_ARGS} "$@" >>"$LOG_FILE" 2>&1
}
export XDG_SEAT=seat0
export XDG_RUNTIME_DIR=/run/user/$(id -u)
export DBUS_SESSION_BUS_ADDRESS=unix:path=$XDG_RUNTIME_DIR/bus
if [[ -f "$HOME/.desktop-session-plasma" ]]; then
log "Plasma session selected."
@@ -0,0 +1,4 @@
#!/bin/bash
set -euo pipefail
systemctl --user start steamos.target
@@ -1,10 +1,7 @@
[Unit]
Description=User session service
After=graphical-session.target systemd-user-sessions.service
Description=User graphical session service
After=steamos.target
[Service]
ExecStart=/usr/bin/bash /usr/local/bin/launch_session.sh
Restart=on-failure
[Install]
WantedBy=default.target
@@ -0,0 +1,10 @@
[Unit]
Description=SteamOS user graphical session service
After=graphical-session.target systemd-user-sessions.service
[Service]
ExecStart=/usr/bin/bash /usr/local/bin/steamos.sh
Restart=on-failure
[Install]
WantedBy=default.target
@@ -0,0 +1,15 @@
[Unit]
Description=SteamOS Target
Requires=graphical-session.target
BindsTo=graphical-session.target
After=graphical-session.target
PropagatesStopTo=graphical-session.target
Requires=session.service
BindsTo=session.service
# Wants=ibus-gamescope.service
# Wants=steam-notif-daemon.service
# Wants=gamescope-xbindkeys.service
# Wants=galileo-mura-setup.service
# Wants=gamescope-mangoapp.service