Merge pull request #99 from outis1one/claude/gifted-bohr-dfzdig
fix: touchscreen input — keyring grab + libinput multitouch driver
This commit is contained in:
@@ -1087,7 +1087,8 @@ See the LICENSE file in the repository for full terms.
|
|||||||
**Current Version:** 1.0.3
|
**Current Version:** 1.0.3
|
||||||
|
|
||||||
**Recent Updates (v1.0.3):**
|
**Recent Updates (v1.0.3):**
|
||||||
- **Touch screen detection:** startup now auto-detects any touch screen (Wacom, ELAN, eGalax, Goodix, etc.) instead of requiring a hardcoded device name
|
- **Touch input fix (keyring):** added `--password-store=basic` to the Electron launch. Under LightDM autologin the GNOME keyring stays locked; when Chromium accessed it, the keyring unlock dialog grabbed all keyboard/touch input — the kiosk rendered fine but ignored every tap and keypress. This flag stops Electron from using the keyring, so the dialog never appears.
|
||||||
|
- **Touch gesture fix (libinput):** finger touch screens are now forced to the `libinput` driver via `/etc/X11/xorg.conf.d/99-finger-libinput.conf`. The `wacom` driver only does single-touch pointer emulation and never passes real multitouch to Chromium, so 1-finger and 2-finger swipe gestures could not fire. libinput delivers proper multitouch; the pen/stylus stays on the wacom driver.
|
||||||
- **Upgrade reliability:** `start.sh` is now refreshed on every upgrade alongside `main.js` and `preload.js`
|
- **Upgrade reliability:** `start.sh` is now refreshed on every upgrade alongside `main.js` and `preload.js`
|
||||||
- **Upgrade fix:** node_modules no longer wiped during upgrade — preserves the ~120MB Electron binary so upgrades don't fail on slow/unreliable connections
|
- **Upgrade fix:** node_modules no longer wiped during upgrade — preserves the ~120MB Electron binary so upgrades don't fail on slow/unreliable connections
|
||||||
- **Authelia fix:** 10-second timeout on Authelia login fetch prevents white screen when Authelia is slow to respond
|
- **Authelia fix:** 10-second timeout on Authelia login fetch prevents white screen when Authelia is slow to respond
|
||||||
|
|||||||
@@ -7346,21 +7346,11 @@ for i in {1..10}; do
|
|||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
||||||
# Fix touch device coordinate mapping and enable multi-touch gestures.
|
|
||||||
# Loop over all touch/finger input devices (excludes touchpads).
|
|
||||||
while IFS= read -r dev; do
|
|
||||||
# Reset Coordinate Transformation Matrix to identity — without this,
|
|
||||||
# the Wacom driver can initialise the CTM to all-zeros, which maps
|
|
||||||
# every touch to (0,0) on screen and makes the touchscreen appear dead.
|
|
||||||
xinput set-prop "$dev" "Coordinate Transformation Matrix" 1 0 0 0 1 0 0 0 1 2>/dev/null || true
|
|
||||||
# Enable multi-touch gesture mode (Wacom-specific; ignored by other drivers).
|
|
||||||
xinput set-prop "$dev" "Wacom Enable Touch Gesture" 1 2>/dev/null || true
|
|
||||||
done < <(xinput list --name-only 2>/dev/null | grep -i "touch\|finger" | grep -iv "touchpad\|trackpad")
|
|
||||||
|
|
||||||
exec node_modules/electron/dist/electron . \
|
exec node_modules/electron/dist/electron . \
|
||||||
--no-sandbox --disable-gpu-sandbox --disable-dev-shm-usage \
|
--no-sandbox --disable-gpu-sandbox --disable-dev-shm-usage \
|
||||||
--enable-features=UseOzonePlatform --ozone-platform=x11 \
|
--enable-features=UseOzonePlatform --ozone-platform=x11 \
|
||||||
--enable-audio-service-sandbox=false --autoplay-policy=no-user-gesture-required \
|
--enable-audio-service-sandbox=false --autoplay-policy=no-user-gesture-required \
|
||||||
|
--password-store=basic \
|
||||||
2>&1 | tee -a /home/kiosk/electron.log
|
2>&1 | tee -a /home/kiosk/electron.log
|
||||||
LAUNCHER
|
LAUNCHER
|
||||||
sudo chmod +x "$KIOSK_DIR/start.sh"
|
sudo chmod +x "$KIOSK_DIR/start.sh"
|
||||||
@@ -7368,20 +7358,21 @@ LAUNCHER
|
|||||||
echo "[18/27] Configuring Openbox with AGGRESSIVE screen keep-alive..."
|
echo "[18/27] Configuring Openbox with AGGRESSIVE screen keep-alive..."
|
||||||
sudo -u "$KIOSK_USER" mkdir -p "$KIOSK_HOME/.config/openbox" "$KIOSK_HOME/.config/pulse"
|
sudo -u "$KIOSK_USER" mkdir -p "$KIOSK_HOME/.config/openbox" "$KIOSK_HOME/.config/pulse"
|
||||||
|
|
||||||
# Configure Wacom touch devices to start in touch event mode (not pointer emulation).
|
# Force finger touch screens to use the libinput driver instead of wacom.
|
||||||
# Without this, the driver initialises in pointer mode and generates mouse events
|
# The wacom driver does single-touch pointer emulation and does NOT pass
|
||||||
# instead of XI2 TouchBegin/TouchEnd events — which means Electron never sees touch.
|
# real multitouch through to Chromium, so app gestures (2-finger swipe,
|
||||||
# The MatchProduct is Wacom-specific; non-Wacom touch screens work natively.
|
# 1-finger swipe) never fire. libinput delivers proper XI2 multitouch
|
||||||
|
# which Chromium turns into real JS touch events. The pen/stylus is left
|
||||||
|
# on the wacom driver (this rule only matches "Finger" touch screens).
|
||||||
sudo mkdir -p /etc/X11/xorg.conf.d
|
sudo mkdir -p /etc/X11/xorg.conf.d
|
||||||
sudo tee /etc/X11/xorg.conf.d/99-wacom-touch.conf > /dev/null <<'WACFG'
|
sudo tee /etc/X11/xorg.conf.d/99-finger-libinput.conf > /dev/null <<'TOUCHCFG'
|
||||||
Section "InputClass"
|
Section "InputClass"
|
||||||
Identifier "Wacom Touch Settings"
|
Identifier "Finger touch use libinput"
|
||||||
MatchProduct "Wacom*Finger*"
|
MatchProduct "Finger"
|
||||||
Driver "wacom"
|
MatchIsTouchscreen "on"
|
||||||
Option "Gesture" "on"
|
Driver "libinput"
|
||||||
Option "Touch" "on"
|
|
||||||
EndSection
|
EndSection
|
||||||
WACFG
|
TOUCHCFG
|
||||||
|
|
||||||
# Create empty xbindkeysrc to prevent errors
|
# Create empty xbindkeysrc to prevent errors
|
||||||
sudo -u "$KIOSK_USER" touch "$KIOSK_HOME/.xbindkeysrc"
|
sudo -u "$KIOSK_USER" touch "$KIOSK_HOME/.xbindkeysrc"
|
||||||
@@ -11303,17 +11294,19 @@ upgrade_kiosk() {
|
|||||||
sudo rm -f "$config_backup"
|
sudo rm -f "$config_backup"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Ensure Wacom touch devices start in touch event mode (not pointer emulation)
|
# Force finger touch screens to use libinput (proper multitouch for Chromium).
|
||||||
|
# Remove the old wacom-touch override from earlier versions — it sorts after
|
||||||
|
# this file and would otherwise win and re-bind the device to the wacom driver.
|
||||||
sudo mkdir -p /etc/X11/xorg.conf.d
|
sudo mkdir -p /etc/X11/xorg.conf.d
|
||||||
sudo tee /etc/X11/xorg.conf.d/99-wacom-touch.conf > /dev/null <<'WACFG'
|
sudo rm -f /etc/X11/xorg.conf.d/99-wacom-touch.conf
|
||||||
|
sudo tee /etc/X11/xorg.conf.d/99-finger-libinput.conf > /dev/null <<'TOUCHCFG'
|
||||||
Section "InputClass"
|
Section "InputClass"
|
||||||
Identifier "Wacom Touch Settings"
|
Identifier "Finger touch use libinput"
|
||||||
MatchProduct "Wacom*Finger*"
|
MatchProduct "Finger"
|
||||||
Driver "wacom"
|
MatchIsTouchscreen "on"
|
||||||
Option "Gesture" "on"
|
Driver "libinput"
|
||||||
Option "Touch" "on"
|
|
||||||
EndSection
|
EndSection
|
||||||
WACFG
|
TOUCHCFG
|
||||||
|
|
||||||
# Install simplified power button handler
|
# Install simplified power button handler
|
||||||
echo " Updating power button handler..."
|
echo " Updating power button handler..."
|
||||||
|
|||||||
Reference in New Issue
Block a user