Mirror external HDMI/monitor output onto primary display automatically

Openbox autostart now detects any connected output beyond the primary and mirrors the kiosk content onto it via xrandr, instead of leaving detected-but-unused external displays dark. Also documents the behavior, its limitation (applies at session start, not live hotplug), and adds an HDMI troubleshooting section to the README.
This commit is contained in:
Claude
2026-08-02 22:34:19 +00:00
parent b5d37fa646
commit 68a7345f5b
2 changed files with 29 additions and 1 deletions
+11
View File
@@ -7392,6 +7392,17 @@ TOUCHCFG
sudo -u "$KIOSK_USER" tee "$KIOSK_HOME/.config/openbox/autostart" > /dev/null <<'AUTOSTART'
#!/bin/bash
# Mirror any connected external display (e.g. HDMI-out to a monitor/TV) onto
# the primary display so the kiosk content shows on both.
PRIMARY_OUTPUT=$(xrandr --query | awk '/ primary/{print $1; exit}')
if [ -n "$PRIMARY_OUTPUT" ]; then
for OUT in $(xrandr --query | awk '/ connected/{print $1}'); do
if [ "$OUT" != "$PRIMARY_OUTPUT" ]; then
xrandr --output "$OUT" --auto --same-as "$PRIMARY_OUTPUT" 2>/dev/null
fi
done
fi
# AGGRESSIVE DPMS disable - multiple methods
xset s off
xset s noblank