Commit Graph
349 Commits
Author SHA1 Message Date
Claude 670b32f53c Fix Electron binary extraction failing silently during upgrade
Two bugs combined to cause the 'Electron binary download failed' error
even though the zip downloaded and unzip reported inflating all files:

1. The upgrade path called install_electron_binary bare (no ||), so
   set -euo pipefail was active inside the function. Any failing command
   (e.g. chmod on a file that wasn't written) killed the script before
   the error messages printed. Fresh install used || exit 1, which
   disables set -e inside the function body. Upgrade now uses
   || { log_error ...; return 1; } to match.

2. The unzip ran as the kiosk user, but node_modules/electron/dist/ can
   be owned by root when npm's electron postinstall script runs with
   --unsafe-perm. The kiosk user can't write there, so unzip's write
   errors go to stderr (not visible in the log) while inflating: lines
   still appear on stdout. The binary is never actually written.
   Fix: run mkdir/unzip/chmod as root, then chown -R to kiosk.

https://claude.ai/code/session_01VQ13Fwq4MXxwThLfCXBeGr
2026-06-16 17:11:56 +00:00
Outis c3ea52dda0 Merge pull request #103 from outis1one/claude/gifted-bohr-dfzdig
Fix permission denied on Electron zip: chmod 644 before kiosk-user unzip
2026-06-16 12:56:55 -04:00
Claude 174bbe46ae Fix permission denied on Electron zip: chmod 644 before kiosk-user unzip
mktemp creates the tmp zip owned by root with mode 600.
sudo -u kiosk unzip then fails with "Permission denied".
Add chmod 644 immediately after download so the kiosk user can read it.

https://claude.ai/code/session_01EyjEQLWbTXcZgbMDarf7NU
2026-06-16 16:54:51 +00:00
Outis 572f0ed01b Merge pull request #102 from outis1one/claude/gifted-bohr-dfzdig
Detect pipe execution; show clear upgrade error instead of cryptic pa…
2026-06-16 12:50:00 -04:00
Claude b7e35c84c9 Detect pipe execution; show clear upgrade error instead of cryptic path failure
When the script is run via curl|bash or wget|bash, BASH_SOURCE[0] is a
pipe descriptor, not a real file. The upgrade function grep-extracts
heredocs from the script file, so it fails with a confusing path error.

Fixes:
- Set SCRIPT_FILE global at startup (empty string when piped)
- upgrade_kiosk() checks SCRIPT_FILE before asking "Continue?" and shows
  a clear message explaining how to download the script to a file first
- Removes the silent failure path (no more cryptic "Cannot find script at
  /proc/.../pipe:[...]" error)

https://claude.ai/code/session_01EyjEQLWbTXcZgbMDarf7NU
2026-06-16 16:45:58 +00:00
Outis 9a9352a9c2 Merge pull request #101 from outis1one/claude/gifted-bohr-dfzdig
Add unzip to apt packages; guard install_electron_binary against miss…
2026-06-16 12:40:25 -04:00
Claude 440b074245 Add unzip to apt packages; guard install_electron_binary against missing unzip
Fresh Ubuntu 24.04 minimal installs don't include unzip. The wget fallback
in install_electron_binary() downloaded the 120MB Electron zip successfully
but then failed on the unzip call. Two fixes:
1. Add unzip to the main apt install step so it's always present.
2. Auto-install unzip inside install_electron_binary() as a safety net for
   upgrades on existing systems that may not have it.

https://claude.ai/code/session_01EyjEQLWbTXcZgbMDarf7NU
2026-06-16 16:39:36 +00:00
Outis 46d42b46c6 Merge pull request #100 from outis1one/claude/gifted-bohr-dfzdig
feat: match any touch screen for libinput (universal touch support)
2026-06-16 11:05:53 -04:00
Claude 27aaf5a15c feat: match any touch screen for libinput, not just Wacom "Finger" devices
Drop the MatchProduct "Finger" restriction from the xorg libinput rule,
leaving only MatchIsTouchscreen "on". MatchIsTouchscreen is set by udev
from hardware capabilities, so it matches finger touch screens of any
brand (ELAN, Goodix, eGalax, Wacom, etc.) while never matching keyboards,
mice, or pen/stylus digitizers (which are tagged as tablets, not
touchscreens). This makes the script work on any touch hardware without
hardcoding device names. Behavior on existing Wacom machines is unchanged
since their finger device matched either way.

https://claude.ai/code/session_01EyjEQLWbTXcZgbMDarf7NU
2026-06-16 15:05:28 +00:00
Outis 981aaf2b6b Merge pull request #99 from outis1one/claude/gifted-bohr-dfzdig
fix: touchscreen input — keyring grab + libinput multitouch driver
2026-06-16 10:53:13 -04:00
Claude 66a633b22c fix: resolve touch input with keyring flag + libinput driver
Two genuinely separate root causes were behind the dead touchscreen:

1. GNOME keyring grab — under LightDM autologin the keyring stays locked.
   When Chromium accessed it, the gcr-prompter unlock dialog grabbed all
   keyboard and touch input at the X level. The app rendered (timers ran)
   but ignored every tap and keypress. Fix: --password-store=basic stops
   Electron from using the keyring, so the dialog never appears.

2. Wacom driver single-touch emulation — the wacom X 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.
   Fix: force the finger touch device to the libinput driver via
   /etc/X11/xorg.conf.d/99-finger-libinput.conf. libinput delivers proper
   XI2 multitouch which Chromium turns into real JS touch events. The
   pen/stylus stays on the wacom driver.

Removed the earlier dead-end attempts (xsetwacom MapToOutput / CTM reset,
Wacom Enable Touch Gesture, 99-wacom-touch.conf) which were all chasing the
wrong cause while the keyring grab masked any real testing. The upgrade path
removes the stale 99-wacom-touch.conf so it can't override libinput.

https://claude.ai/code/session_01EyjEQLWbTXcZgbMDarf7NU
2026-06-16 14:52:31 +00:00
Claude 4e7fbe497c fix: use xsetwacom MapToOutput instead of xinput set-prop for CTM
The Wacom driver owns the Coordinate Transformation Matrix and silently
overrides any xinput set-prop changes. xsetwacom MapToOutput tells the
driver to recalculate the CTM for the primary connected output, which is
the correct API and persists across driver resets.

Dynamically detects the primary output (eDP1, HDMI1, DP1, etc.) so the
fix works on any machine without hardcoding a display name.

https://claude.ai/code/session_01EyjEQLWbTXcZgbMDarf7NU
2026-06-16 13:55:09 +00:00
Outis f7f1624e02 Merge pull request #98 from outis1one/claude/gifted-bohr-dfzdig
fix: reset Coordinate Transformation Matrix so touches land on correct screen coordinates
2026-06-16 09:45:08 -04:00
Claude 3315ccc44a fix: reset Coordinate Transformation Matrix to identity in start.sh
The Wacom driver can initialise the CTM to all-zeros, which maps every
touch event to screen coordinate (0,0). The touchscreen appears completely
dead even though the hardware and kernel are working correctly.

Reset the CTM to the identity matrix for every touch/finger device at
startup, before launching Electron, so coordinates are always correct.

https://claude.ai/code/session_01EyjEQLWbTXcZgbMDarf7NU
2026-06-16 13:44:50 +00:00
Outis c58addcecb Merge pull request #97 from outis1one/claude/gifted-bohr-dfzdig
fix: correct xorg MatchProduct glob pattern for Wacom touch config
2026-06-16 09:13:53 -04:00
Claude 14172782c9 fix: correct xorg MatchProduct glob — Wacom*Finger* not Wacom.*Finger
xorg uses fnmatch (shell glob) for MatchProduct, where . is a literal
dot. Wacom.*Finger never matched "Wacom HID 48E3 Finger touch" because
there is no literal dot in that string. Wacom*Finger* matches correctly.

https://claude.ai/code/session_01EyjEQLWbTXcZgbMDarf7NU
2026-06-16 13:13:41 +00:00
Outis 279dcd2b66 Merge pull request #96 from outis1one/claude/gifted-bohr-dfzdig
fix: xorg.conf.d Wacom touch mode — driver starts in XI2 touch event mode
2026-06-16 09:08:50 -04:00
Claude 5cbade03d7 fix: add xorg.conf.d Wacom touch config so driver starts in touch event mode
Without /etc/X11/xorg.conf.d/99-wacom-touch.conf the Wacom driver initialises
the finger touch device in pointer emulation mode (generating RawButtonPress/
RawButtonRelease/RawMotion). Electron never sees TouchBegin/TouchEnd events so
touchstart/pointerdown(touch) never fire in the renderer.

Setting Option "Gesture" "on" and Option "Touch" "on" at the driver level means
the device initialises in XI2 touch mode on every X server start, regardless of
any post-init xinput set-prop calls.

Added to both fresh install (step 18) and upgrade function.

https://claude.ai/code/session_01EyjEQLWbTXcZgbMDarf7NU
2026-06-16 13:08:38 +00:00
Outis 73eed4a123 Merge pull request #95 from outis1one/claude/gifted-bohr-dfzdig
fix: export XAUTHORITY in start.sh so touch init never fails with auth error
2026-06-16 08:57:35 -04:00
Claude 95027fe6fe fix: export XAUTHORITY in start.sh so xinput touch init never hits auth error
Without XAUTHORITY set, xinput can fail with "Authorization required"
if the display manager doesn't propagate it through the session environment.
Hardcode the kiosk user's .Xauthority path to guarantee xinput works.

https://claude.ai/code/session_01EyjEQLWbTXcZgbMDarf7NU
2026-06-16 12:57:21 +00:00
Outis 8b9d688993 Merge pull request #94 from outis1one/claude/gifted-bohr-dfzdig
chore: restore original ubuntu-based-kiosk-v1.0.2.sh alongside v1.0.3
2026-06-15 22:29:29 -04:00
Claude 55039c510b chore: restore original ubuntu-based-kiosk-v1.0.2.sh alongside v1.0.3
Keep v1.0.2 in the repo as a stable fallback while v1.0.3 touch screen
support is being validated on different hardware.

https://claude.ai/code/session_01EyjEQLWbTXcZgbMDarf7NU
2026-06-16 02:27:13 +00:00
Outis 7f54944ad8 Merge pull request #93 from outis1one/claude/gifted-bohr-dfzdig
Claude/gifted bohr dfzdig
2026-06-15 22:24:24 -04:00
Claude 00dd806e9c chore: bump version to v1.0.3 and rename script file
Update all version strings (header, SCRIPT_VERSION, JS VERSION constant)
and rename ubuntu-based-kiosk-v1.0.2.sh → ubuntu-based-kiosk-v1.0.3.sh.
Update README with v1.0.3 change log and archive v1.0.2 as previous.

https://claude.ai/code/session_01EyjEQLWbTXcZgbMDarf7NU
2026-06-16 02:23:43 +00:00
Claude 6f18a2f897 fix: detect touch screens dynamically instead of hardcoding Wacom device name
The xinput loop now scans all input devices at startup, matches anything
with "touch" or "finger" in the name (excluding touchpads/trackpads), and
attempts to enable Wacom touch gestures on each match. Non-Wacom devices
silently ignore the set-prop call, so the loop is safe on any hardware.

https://claude.ai/code/session_01EyjEQLWbTXcZgbMDarf7NU
2026-06-16 02:21:09 +00:00
Outis 93b944fdb8 Merge pull request #92 from outis1one/claude/gifted-bohr-dfzdig
fix: enable Wacom touch gestures on startup and update start.sh on up…
2026-06-15 22:20:24 -04:00
Claude c18615a78e fix: enable Wacom touch gestures on startup and update start.sh on upgrade
Add xinput call to start.sh so Wacom HID 48E3 touch gesture support is
initialized every time the kiosk starts, not just after lightdm restarts.
Also add start.sh to the upgrade extraction list so it is updated in place
instead of keeping the stale version from the original install.

https://claude.ai/code/session_01EyjEQLWbTXcZgbMDarf7NU
2026-06-16 02:19:03 +00:00
Outis dcf3ba11c7 Merge pull request #91 from outis1one/claude/gifted-bohr-dfzdig
fix: add PointerEvent fallback for swipe detection
2026-06-15 22:02:00 -04:00
Claude 37663be91b fix: add PointerEvent fallback for swipe detection
touchstart/touchend never fire on this device (confirmed by zero [TOUCH]
log entries). The activity tracker already uses pointerdown/pointerup and
works fine, proving PointerEvents reach the preload. Added pointer event
handlers that mirror the touch handlers for all gestures (2-finger swipe,
3-finger toggle, 1-finger arrow keys). A 500ms debounce on the IPC send
prevents double-firing on devices where both event types fire.

https://claude.ai/code/session_01EyjEQLWbTXcZgbMDarf7NU
2026-06-16 01:59:25 +00:00
Outis 690f2daf3c Merge pull request #90 from outis1one/claude/gifted-bohr-dfzdig
revert: restore v1.0.0 touch handler approach for two-finger swipe
2026-06-15 21:55:10 -04:00
Claude 8f886854f2 revert: restore v1.0.0 touch handler approach for two-finger swipe
capture:true and --touch-events=enabled were added to handle Authelia's
login page blocking touch events. Authelia now auto-logs in on startup
so the login page never shows. Reverting to the v1.0.0 approach (passive:true
only, no --touch-events flag) which had working two-finger swipe.

https://claude.ai/code/session_01EyjEQLWbTXcZgbMDarf7NU
2026-06-16 01:52:46 +00:00
Outis 22fb77581c Merge pull request #89 from outis1one/claude/gifted-bohr-dfzdig
fix: add --touch-events=enabled to Electron launch flags
2026-06-15 21:41:57 -04:00
Claude f40d8e337c fix: add --touch-events=enabled to Electron launch flags
With --ozone-platform=x11, Chromium defaults touch event detection to
'auto' and may not identify the hardware as a touchscreen, so touchstart/
touchend never fire in the renderer. --touch-events=enabled forces W3C
touch events on unconditionally, restoring two-finger swipe navigation.

https://claude.ai/code/session_01EyjEQLWbTXcZgbMDarf7NU
2026-06-16 01:16:58 +00:00
Outis b92180c4b2 Merge pull request #88 from outis1one/claude/gifted-bohr-dfzdig
fix: preserve node_modules during upgrade to avoid re-downloading Ele…
2026-06-15 20:56:00 -04:00
Claude d595464400 fix: preserve node_modules during upgrade to avoid re-downloading Electron
The upgrade was wiping node_modules then relying on npm to re-download the
~120MB Electron binary. npm returns exit 0 even when the download times out,
leaving the kiosk with no Electron binary and a blank screen on next boot.

node_modules only needs to be deleted on a fresh install or when explicitly
changing Electron version. For a JS-file-only upgrade, npm install without
a wipe is either a no-op (no changes) or applies dependency updates cleanly.
The install_electron_binary fallback remains as a safety net.

https://claude.ai/code/session_01EyjEQLWbTXcZgbMDarf7NU
2026-06-16 00:52:22 +00:00
Outis 69be816dfe Merge pull request #87 from outis1one/claude/gifted-bohr-dfzdig
fix: use sudo to remove root-owned config backup after upgrade
2026-06-15 20:40:52 -04:00
Claude 543a442775 fix: use sudo to remove root-owned config backup after upgrade
Backup is created with sudo cp (owned by root), so the cleanup rm -f
fails with "Operation not permitted" when run without sudo.

https://claude.ai/code/session_01EyjEQLWbTXcZgbMDarf7NU
2026-06-16 00:39:53 +00:00
Outis 3f1984f9fa Merge pull request #86 from outis1one/claude/gifted-bohr-dfzdig
docs: update Authelia setup instructions to use MERGE workflow
2026-06-15 20:32:36 -04:00
Claude 3d5a5839b3 fix: use capture:true on touch event listeners to prevent page JS interference
Touch handlers used bubble phase (no capture:true), so any page script that
called stopPropagation() on touchstart/touchend — e.g. Authelia's login form
or scroll containers — silently blocked the preload's swipe detection.

Using capture:true fires the preload's listeners in the capture phase (before
any element-level handlers), so swipe works even on pages with their own
touch handling. Applied to both preloads (standard and auto-show keyboard).

Also adds missing [TOUCH] 2-finger HORIZONTAL console.log to the standard
preload so swipe events are visible in electron.log for debugging.

https://claude.ai/code/session_01EyjEQLWbTXcZgbMDarf7NU
2026-06-16 00:31:14 +00:00
Claude 31eb750514 docs: clarify Authelia access_control merge with before/after example
The duplicate-block pitfall (YAML silently ignores duplicate keys, causing
a white screen) is now called out explicitly in both the script's printed
output and the README. Added a before/after example showing the correct
merged result with the kiosk one_factor rule above the two_factor wildcard.
Also explains why one_factor is required (TOTP/WebAuthn need interactive
second step, impossible via API).

https://claude.ai/code/session_01EyjEQLWbTXcZgbMDarf7NU
2026-06-16 00:25:11 +00:00
Claude effb726979 fix: add 10-second timeout to Authelia fetch to prevent white screen
Without a timeout, session.defaultSession.fetch() hangs for 1-2 minutes
on TCP timeout when Authelia is unreachable (wrong URL, server down,
firewall). Since createWindow() awaits autheliaAuthenticate(), the main
window is visible but no BrowserView is attached during that wait —
causing a persistent white screen with ibeam cursor.

https://claude.ai/code/session_01EyjEQLWbTXcZgbMDarf7NU
2026-06-16 00:15:18 +00:00
Claude 0eef318e78 docs: update Authelia setup instructions to use MERGE workflow
- Step 3 now says MERGE (not replace/append) with clear warning to keep existing config
- access_control: kiosk one_factor rule must go ABOVE any existing two_factor rule,
  with explanation that Authelia applies rules top-down (first match wins)
- session block: keep existing values; only add the block if none exists yet
- Kiosk can only do one_factor — TOTP/WebAuthn via API is not possible
- Updated in both configure_authelia() printed output and README Authentication section

https://claude.ai/code/session_01EyjEQLWbTXcZgbMDarf7NU
2026-06-15 23:55:53 +00:00
Outis 09dfcd40af Merge pull request #85 from outis1one/claude/gifted-bohr-dfzdig
fix: shared install_electron_binary() covers both fresh install and u…
2026-06-15 19:39:31 -04:00
Claude 0b52ec27fb fix: shared install_electron_binary() covers both fresh install and upgrade
The upgrade_kiosk() path deleted node_modules then ran npm install but
never checked the binary or set chrome-sandbox permissions — so every
upgrade produced a blank screen.

Changes:
- Extract electron binary verification, fallback downloads, and
  chrome-sandbox chmod 4755 into a shared install_electron_binary()
  function called by both step 17/27 (fresh install) and step 5/6
  (upgrade_kiosk) so neither path can silently skip the permission fix
- Add repair_electron() function: stops display, re-runs
  install_electron_binary, restarts lightdm — no SSH needed
- Wire repair_electron as Advanced menu option 12 "Fix Blank Screen"

https://claude.ai/code/session_01EyjEQLWbTXcZgbMDarf7NU
2026-06-15 23:38:37 +00:00
Outis b003daba85 Merge pull request #84 from outis1one/claude/gifted-bohr-dfzdig
fix: robust Electron binary download with timeouts, retry, and wget f…
2026-06-15 19:35:57 -04:00
Claude bd4d4cadc8 fix: robust Electron binary download with timeouts, retry, and wget fallback
The ~120MB Electron binary download was silently failing because npm's
default 60s fetch timeout is too short on slower connections.

Changes to step 17/27:
- Set npm fetch-timeout to 600s and retries to 5 before running npm install
- If binary still missing after npm install, retry via install.js with
  ELECTRON_FORCE_DOWNLOAD=true
- If still missing, fall back to direct wget download of the exact
  versioned zip from GitHub releases (300s timeout, 3 tries, shows progress)
- Exit 1 with clear message if all three attempts fail
- Log chrome-sandbox permission step for visibility

https://claude.ai/code/session_01EyjEQLWbTXcZgbMDarf7NU
2026-06-15 23:34:00 +00:00
Outis 66ec66362f Merge pull request #83 from outis1one/claude/gifted-bohr-dfzdig
Claude/gifted bohr dfzdig
2026-06-15 19:20:56 -04:00
Claude 2556863129 fix: use sudo for all config.json access in configure_authelia
/home/kiosk/ has 750 permissions so the install user can't read inside
it. The -f check and both jq reads were running as the current user and
failing silently, causing the false "config.json not found" error.

Changed:
  [[ ! -f "$config_file" ]]  →  sudo test -f "$config_file"
  jq -r ... "$config_file"   →  sudo -u kiosk jq -r ... "$config_file"
  jq ... > "$tmp"            →  sudo -u kiosk jq ... > "$tmp" && sudo mv

https://claude.ai/code/session_01EyjEQLWbTXcZgbMDarf7NU
2026-06-15 23:20:14 +00:00
Claude 4c3f5576b9 fix: detect and retry Electron binary download when npm install silently fails
npm install returns 0 even when Electron's postinstall binary download
fails, leaving node_modules/electron/dist/electron missing and causing
a blank screen with no useful error.

After npm install, explicitly check for the binary. If absent, retry
via ELECTRON_FORCE_DOWNLOAD=true node install.js. If still missing,
print a clear error and exit 1 instead of silently continuing to a
broken install.

https://claude.ai/code/session_01EyjEQLWbTXcZgbMDarf7NU
2026-06-15 22:52:49 +00:00
Outis 7634ddbaaf Merge pull request #82 from outis1one/claude/gifted-bohr-dfzdig
Claude/gifted bohr dfzdig
2026-06-15 11:56:26 -04:00