From 0e741aab3864df5f7604718992997c39efe8bf86 Mon Sep 17 00:00:00 2001 From: Hermes Agent service account Date: Wed, 29 Jul 2026 22:32:22 -0500 Subject: [PATCH] jmri: gui launcher uses last-session profile instead of --profile flag --- ansible/roles/jmri/templates/jmri-gui.j2 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ansible/roles/jmri/templates/jmri-gui.j2 b/ansible/roles/jmri/templates/jmri-gui.j2 index 45fef56..bc65523 100644 --- a/ansible/roles/jmri/templates/jmri-gui.j2 +++ b/ansible/roles/jmri/templates/jmri-gui.j2 @@ -15,7 +15,6 @@ set -euo pipefail JMRI_DIR="{{ jmri_install_dir }}" -JMRI_PROFILE="{{ jmri_profile_id }}" JMRI_SERVICE="jmri.service" MONITOR_SERVICE="jmri-monitor.service" @@ -57,7 +56,7 @@ launch() { sudo systemctl stop "$JMRI_SERVICE" fi - echo "Launching $binary (profile: $JMRI_PROFILE)..." + echo "Launching $binary (last-used profile)..." echo "Close the window to return to daemon mode." echo "" @@ -68,8 +67,9 @@ launch() { # Force AWT out of headless mode export JMRI_OPTIONS="-Djava.awt.headless=false" - # Run directly — we are already the jmri user, DISPLAY is set by SSH - "$JMRI_DIR/$binary" --profile="$JMRI_PROFILE" + # Run without --profile so JMRI uses its last-session preference. + # The daemon service uses --profile explicitly for headless reliability. + "$JMRI_DIR/$binary" echo "" echo "$binary closed."