Add setup-firefox-autologin.sh
This commit is contained in:
45
setup-firefox-autologin.sh
Normal file
45
setup-firefox-autologin.sh
Normal file
@@ -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."
|
||||||
Reference in New Issue
Block a user