From e6a4ee16cf2dcedce4e2d5e0b9b3051ae70ad90f Mon Sep 17 00:00:00 2001 From: kyle Date: Wed, 31 Dec 2025 04:26:57 -0800 Subject: [PATCH] Add setup-firefox-autologin.sh --- setup-firefox-autologin.sh | 45 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 setup-firefox-autologin.sh diff --git a/setup-firefox-autologin.sh b/setup-firefox-autologin.sh new file mode 100644 index 0000000..9b7d754 --- /dev/null +++ b/setup-firefox-autologin.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# Setup Firefox to auto-login to Home Assistant by saving credentials +# This requires manually logging in once, then Firefox will remember + +echo "Firefox Auto-Login Setup" +echo "========================" +echo "" +echo "This will configure Firefox to save and auto-fill your Home Assistant credentials." +echo "" +echo "STEP 1: Stop the current dashboard" +~/scripts/stop-dashboard.sh +sleep 2 + +echo "" +echo "STEP 2: Launching Firefox in normal mode (not kiosk)" +echo "You will need to log in manually ONCE, then Firefox will remember." +echo "" +echo "Press Enter when you see Firefox open..." +read + +export XDG_RUNTIME_DIR=/run/user/1000 +export WAYLAND_DISPLAY=wayland-0 + +# Launch Firefox normally (not kiosk) so user can log in +MOZ_ENABLE_WAYLAND=1 firefox "http://homeassistant.local:8123" & + +echo "" +echo "INSTRUCTIONS:" +echo "1. Log in to Home Assistant in the Firefox window that just opened" +echo "2. When Firefox asks to save your password, click 'Save'" +echo "3. Navigate to: http://homeassistant.local:8123/lovelace/default_view" +echo "4. Close Firefox when done" +echo "" +echo "Press Enter after you've logged in and closed Firefox..." +read + +echo "" +echo "STEP 3: Testing auto-login" +echo "Launching dashboard - it should now auto-login..." +sleep 2 +~/scripts/launch-dashboard.sh + +echo "" +echo "If it worked, the dashboard should show without a login screen!" +echo "If not, we may need to use trusted networks instead."