From 085ba2bcca7b5cd58ec9a48fbd8b02508e2995f8 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Thu, 23 Apr 2026 16:08:20 -0400 Subject: [PATCH] Fix install-session startx wrapper --- .../.local/.functions/game_install_functions.sh | 10 +++++++--- home/stormux/.local/bin/stormux_install_session.sh | 10 ++++++++++ home/stormux/.xinitrc | 7 ------- 3 files changed, 17 insertions(+), 10 deletions(-) create mode 100755 home/stormux/.local/bin/stormux_install_session.sh diff --git a/home/stormux/.local/.functions/game_install_functions.sh b/home/stormux/.local/.functions/game_install_functions.sh index 7e87469..4c9c9ad 100755 --- a/home/stormux/.local/.functions/game_install_functions.sh +++ b/home/stormux/.local/.functions/game_install_functions.sh @@ -2,6 +2,7 @@ # shellcheck disable=SC2154 scriptDir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)" +installSessionScript="${scriptDir%/.functions}/bin/stormux_install_session.sh" # shellcheck disable=SC1091 source "${scriptDir}/download.sh" # shellcheck disable=SC1091 @@ -123,13 +124,16 @@ run_install_x_command() { local quotedCommand="" check_dependencies startx + if [[ ! -x "$installSessionScript" ]]; then + ui_msgbox "Game Installer" "Game Installer" "Missing install session helper: ${installSessionScript}" + exit 1 + fi printf -v quotedCommand '%q ' "$@" quotedCommand="${quotedCommand% }" - env DISPLAY="${DISPLAY:-:0}" \ - STORMUX_X_SESSION_MODE=install \ + env -u DISPLAY \ STORMUX_INSTALL_COMMAND="$quotedCommand" \ - startx + startx "$installSessionScript" } run_wine_headless() { diff --git a/home/stormux/.local/bin/stormux_install_session.sh b/home/stormux/.local/bin/stormux_install_session.sh new file mode 100755 index 0000000..d0232df --- /dev/null +++ b/home/stormux/.local/bin/stormux_install_session.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +set -u + +scriptDir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)" + +# shellcheck disable=SC1091 +source "${scriptDir}/stormux_launch_helpers.sh" + +run_install_session_command diff --git a/home/stormux/.xinitrc b/home/stormux/.xinitrc index 380ab6d..8766ac1 100755 --- a/home/stormux/.xinitrc +++ b/home/stormux/.xinitrc @@ -30,13 +30,6 @@ export MESA_GL_VERSION_OVERRIDE=3.2 export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus export DBUS_SESSION_BUS_PID -if [[ "${STORMUX_X_SESSION_MODE:-}" == "install" ]]; then - run_install_session_command - launchStatus=$? - pkill -15 Xorg - exit "$launchStatus" -fi - dwm & xbindkeys