Files
a13labs.infra/ansible/files/game_station/bin/system/steamos-session
T
alexandre.pires b4f4fe2f07 Refactor SteamOS session management and launcher scripts
- Removed obsolete launch_desktop.sh and launch_session.sh scripts.
- Introduced new steam-launcher script to handle Steam launching and session tracking.
- Added steam-short-session-tracker for monitoring short Steam sessions and triggering repairs.
- Created steamos and steamos-session scripts for managing the SteamOS session.
- Implemented steamos-session-select for switching between Gamescope and Plasma sessions.
- Updated SDDM configuration for autologin and session management.
- Added new systemd services and targets for managing Gamescope and Steam sessions.
- Created desktop entries and icons for ALVR and SteamOS shortcuts.
- Enhanced logging and error handling across scripts.
- Cleaned up unused systemd slice and service files.
- Updated Ansible playbook to reflect new configurations and file structures.
2025-12-01 17:25:18 +01:00

26 lines
834 B
Plaintext

# #!/bin/bash
set -euo pipefail
LOG_FILE="$HOME/.local/logs/session.log"
log() { echo "[$(date --iso-8601=seconds)] $*" | tee -a "$LOG_FILE"; }
env > $XDG_RUNTIME_DIR/steamos-environment
log "Starting SteamOS Session"
while true; do
systemctl --user --wait start steamos.service
wait_status=$?
log "Graphical session service exited with status $wait_status"
if [ $wait_status -ne 0 ]; then
log "Graphical session service exited with error; ending loop."
break
fi
if [ -f "$HOME/.steamos-session-switch" ]; then
log "Graphical session service exited; switch file present -> restarting..."
rm "$HOME/.steamos-session-switch"
continue
fi
log "Graphical session service exited; switch file absent -> ending loop."
break
done
sleep 5
log "SteamOS Session Ended"