jmri: gui launcher uses last-session profile instead of --profile flag

This commit is contained in:
Hermes Agent service account
2026-07-29 22:32:22 -05:00
parent 9ebd19ab52
commit 0e741aab38

View File

@@ -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."