jmri: gui launcher uses last-session profile instead of --profile flag
This commit is contained in:
@@ -15,7 +15,6 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
JMRI_DIR="{{ jmri_install_dir }}"
|
JMRI_DIR="{{ jmri_install_dir }}"
|
||||||
JMRI_PROFILE="{{ jmri_profile_id }}"
|
|
||||||
JMRI_SERVICE="jmri.service"
|
JMRI_SERVICE="jmri.service"
|
||||||
MONITOR_SERVICE="jmri-monitor.service"
|
MONITOR_SERVICE="jmri-monitor.service"
|
||||||
|
|
||||||
@@ -57,7 +56,7 @@ launch() {
|
|||||||
sudo systemctl stop "$JMRI_SERVICE"
|
sudo systemctl stop "$JMRI_SERVICE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Launching $binary (profile: $JMRI_PROFILE)..."
|
echo "Launching $binary (last-used profile)..."
|
||||||
echo "Close the window to return to daemon mode."
|
echo "Close the window to return to daemon mode."
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
@@ -68,8 +67,9 @@ launch() {
|
|||||||
# Force AWT out of headless mode
|
# Force AWT out of headless mode
|
||||||
export JMRI_OPTIONS="-Djava.awt.headless=false"
|
export JMRI_OPTIONS="-Djava.awt.headless=false"
|
||||||
|
|
||||||
# Run directly — we are already the jmri user, DISPLAY is set by SSH
|
# Run without --profile so JMRI uses its last-session preference.
|
||||||
"$JMRI_DIR/$binary" --profile="$JMRI_PROFILE"
|
# The daemon service uses --profile explicitly for headless reliability.
|
||||||
|
"$JMRI_DIR/$binary"
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "$binary closed."
|
echo "$binary closed."
|
||||||
|
|||||||
Reference in New Issue
Block a user