Resolved ReferenceError: showView is not defined when clicking sites in nav menu.
Changes:
- Changed showView() to attachView() - the correct function name
- Added manualNavigationMode=true to stop auto-rotation on manual navigation
- Added markActivity() to reset inactivity timer
- Added inactivityExtensionUntil=0 to clear extensions
- Added additional logging for debugging
- Added error logging for invalid view indices
This makes navigation menu behavior consistent with nextTab() and
previousTab() functions throughout the codebase.
Resolved ReferenceError: config is not defined in the 'get-config' IPC handler.
Changes:
- Modified IPC handler to read config.json directly using fs.readFileSync
- Added proper error handling with try/catch block
- Added fallback to send empty config if file doesn't exist or can't be read
- Added console logging for debugging config transmission
This fixes the JavaScript error that was displaying on screen and prevents
the navigation menu from loading sites properly.
Fixed Issues:
1. Icon rendering - Replaced emoji 🔑 with SVG key icon for better compatibility
2. JavaScript errors - Added try/catch blocks throughout navigation menu code
3. Sites not loading - Fixed IPC communication with extensive error logging
4. Menu becoming part of rotation - Ensured proper overlay with z-index and pointer-events
5. Missing auto-dismiss - Added 30-second timeout that auto-closes menu
6. Improved close button positioning - Moved to top-right with better visibility
Technical Changes:
- Changed navButton.innerHTML from emoji to SVG path for key icon
- Added NAV_MENU_TIMEOUT constant (30000ms)
- Added navMenuTimer variable for timeout management
- Enhanced createNavMenu() with console logging and error handling
- Fixed content positioning with 'position:relative'
- Added pointer-events:auto to ensure menu captures events
- Enhanced showNavMenu() with try/catch and 30-second auto-dismiss timer
- Enhanced hideNavMenu() with timer cleanup and error handling
- Enhanced toggleNavMenu() with logging
- Fixed loadSitesIntoNav() with error handling
- Enhanced config-data IPC handler with extensive logging and validation
- Changed siteBtn.innerHTML to siteBtn.textContent to prevent XSS
- Added user-select:none to prevent text selection on buttons
- Added stopPropagation to content to prevent background clicks from closing
- Fixed close button event handler with proper logging
Console Output:
- All navigation menu actions now log to console with [NAV] prefix
- Helps diagnose issues: button clicks, menu show/hide, config requests, site loading
- Error messages clearly identify failure points
This should resolve all reported issues with the navigation menu.
Bug Fixes:
- Fixed virtual console menu display (now checks both getty and X11 DontVTSwitch)
- Fixed complete_uninstall to properly remove LMS/Squeezelite services
- Fixed full_reinstall to clean all addons and settings (except saved VPN/VNC)
Named Websites Feature:
- Added 'name' field to config.json schema for all sites
- Added NAMES array throughout codebase for site name management
- Added update_site_names() function with menu option (Sites → option 3)
- Names prompted during site addition (both new installs and adding sites)
- Site listings now display as "Name" - URL when name is provided
- All management functions (add, update, delete, reorder) handle names properly
- Names fully integrated with save/load config operations
Navigation Menu Feature:
- Added enableNavButton config option (defaults to true)
- Added navigation button at top-left (purple key icon 🔑)
- Button shows on user interaction (same logic as pause/keyboard buttons)
- Navigation menu overlay with 2-column layout:
* Column 1: Clickable list of all non-hidden sites (uses names if available)
* Column 2: Touch gesture cheat sheet and keyboard shortcuts reference
- Menu accessible via key icon click
- IPC handlers added: get-config and navigate-to-tab
- Menu excludes hidden sites (duration === -1) as requested
- Optional feature configurable via Optional Buttons menu
README Updates:
- Updated all version references to 0.9.8
- Updated installation commands to use install_kiosk_0.9.8.sh
- Added comprehensive "Why Use Named Sites?" section with use cases:
* Home/Family kiosks examples
* Business kiosks examples
* Digital signage examples
* Multi-location setups examples
- Updated Multi-Site Management section to include named sites and navigation menu
- Updated Touch Controls section to reflect correct gesture (3-finger DOWN toggle)
- Updated Project Status to version 0.9.8
- Updated menu access commands throughout document
Technical Implementation:
- preload.js: Added nav button/menu variables, create/show/hide functions
- preload.js: Added IPC listener for 'nav-button-enabled'
- preload.js: Integration with user interaction handlers
- main.js: Added enableNavButton variable and config loading
- main.js: Added 'get-config' and 'navigate-to-tab' IPC handlers
- main.js: Send nav-button-enabled state on page load
- Bash script: Added site name prompts in add_new_sites() and add_new_sites_simple()
- Bash script: Added update_site_names() function for updating existing site names
- Bash script: Updated configure_optional_buttons() to include navigation button
- Bash script: Updated all save/load config operations to handle NAMES array
Script now at 9607 lines (242 lines added for navigation menu feature)
All syntax validated with bash -n
Bug fixes completed:
- Fixed virtual console menu display bug (checks both getty and X11)
- Fixed complete_uninstall to properly remove LMS/Squeezelite
- Fixed full_reinstall to clean all addons and settings
Named websites feature completed:
- Added 'name' field to config.json schema
- Added site name management throughout (add, update, delete, reorder)
- Added update_site_names() menu option
- Names display in site listings
Navigation button configuration completed:
- Added enableNavButton config option
- Added to optional buttons menu
- Integrated with save/load config
TODO: Navigation menu UI implementation in preload.js still needed
- Removed PTT (Push-to-Talk) functionality (moved to separate project)
- Fixed power menu to display both local and VPN IP addresses
- Updated Electron to v39.2.4 with enhanced rollback instructions
- Updated README dates to 2025 and version references to 0.9.7-5
- Removed stray text from README printer section
Issue: Option 10 was immediately returning to main menu instead of
performing the reinstall.
Root Cause: The menu case statement had 'return' after full_reinstall,
which caused it to exit the core_settings_menu even when the user
cancelled the reinstall (by not typing 'YES').
Fix: Removed the 'return' statement from line 8994.
Now when users cancel, they stay in the core settings menu.
When reinstall completes, the pause() at the end lets them press enter
and naturally return to the menu for additional configuration.
Note: Option 11 (complete_uninstall) correctly keeps 'return' since
uninstalling should exit the entire menu system.
Major Changes:
1. FIXED: Virtual console Ctrl+Alt+F1-F8 key combinations now work properly
- Updated configure_virtual_consoles() to modify X11 serverflags
- Enable/disable now updates both systemd getty AND X11 VT switching
- Added restart lightdm notification for changes to take effect
- Fixed initial installation to set X11 VT switching based on user choice
- Users who previously enabled consoles must re-enable for keys to work
2. IMPROVED: Simplified hidden tab gesture to single toggle
- 3-finger DOWN now toggles hidden tabs (both show AND hide)
- Removed separate 3-finger UP gesture (simpler UX)
- Updated all gesture handlers in both standard and Jitsi modes
- Updated all console.log messages and documentation
README Updates:
- Updated all version references to 0.9.7-4
- Updated Touch Gesture Quick Reference table
- Simplified gesture: 3-finger DOWN = Toggle hidden tabs
- Updated hidden tabs documentation to reflect toggle behavior
- Added important notes about virtual console fix in 0.9.7-4
- Added instructions to re-enable consoles for existing users
- Updated menu system access examples
- Updated project status to "Gesture & Console Improvements"
This release focuses on fixing the console key combo issue and improving
the hidden tab gesture for easier one-handed use.
Completed Changes:
- Updated version header to 0.9.7-4 with release notes
- FIXED: Virtual console Ctrl+Alt+F1-F8 key combinations now work
- Updated configure_virtual_consoles() to modify X11 serverflags
- Enable/disable now updates both systemd getty AND X11 VT switching
- Added restart lightdm notification for changes to take effect - Fixed initial installation to set X11 VT switching based on user choice
- FIXED: Swapped hidden tab gestures for easier use
- 3-finger DOWN now shows hidden tabs (easier than UP)
- 3-finger UP now returns to normal tabs
- Updated all gesture handlers and documentation
- Changed in both standard and Jitsi preload modes
In Progress:
- URL naming feature (requires config schema changes)
- Navigation hot corner menu (substantial new feature)
These changes fix the immediate issues and improve usability.
The navigation menu feature requires extensive additional development.
Version Changes:
- Created install_kiosk_0.9.7-3.sh with updated version number
- Updated script header with release notes for 0.9.7-3
- Updated SCRIPT_VERSION constant to "0.9.7-3"
README Updates:
- Updated all references from 0.9.7-2 to 0.9.7-3
- Updated Quick Install wget command
- Updated Menu System Access examples
- Updated Complete Uninstall examples
- Updated Project Status section
- Updated footer version
Release Notes for 0.9.7-3:
- Fixed missing complete_uninstall function (line 8704 error)
- Added virtual console configuration (Ctrl+Alt+F1-F8)
- Added emergency hotspot to initial installation
- Enhanced security options and documentation
Documentation updates:
- Update Quick Install script name to install_kiosk_0.9.7-2.sh
- Document virtual console configuration feature
- Document emergency hotspot configuration during install
- Document complete uninstall functionality
- Add comprehensive "Why Use Hidden Tabs?" section with:
- Private communication use cases
- Administrative access scenarios
- Content management applications
- Secure entertainment options
- Business use cases
- Real-world example scenarios
- Add new "Installation & Management Features" section with:
- Virtual Console Configuration details
- Emergency WiFi Hotspot documentation
- Complete Uninstall process and safety features
- Update menu system documentation
- Update system behavior security notes
- Update version and date to 0.9.7-2, December 2, 2024
- Fix line 8704: Add missing complete_uninstall() function
- Provides full system cleanup and uninstallation
- Removes kiosk user, services, and all configurations
- Offers reboot option after uninstall
- Add virtual console configuration feature
- New configure_virtual_consoles() function
- Allows enabling/disabling Ctrl+Alt+F1-F8 console access
- Added to Advanced menu (option 7)
- Integrated into initial installation with security prompt
- Add emergency hotspot to initial installation
- Prompts user at end of installation
- Can be configured immediately or deferred
- Provides automatic WiFi hotspot when internet is down
Fixed critical bug where jq command was incomplete in save_config function,
causing configuration save to fail with jq usage error when configuring
rotation sites.
Issue: The jq -n command on lines 3476-3493 had all arguments but was
missing the JSON template/filter, causing jq to output its help text
instead of creating the config file.
Fix: Added complete JSON object template to jq command with all required
fields (unit, autoswitch, enableTouch, etc.) and empty tabs array.
Version bumped from 0.9.6-2 to 0.9.6-3.
Created setup_intercom_simple.sh using talkiepi (barnard fork) instead of
talkkonnect for a more stable and lightweight intercom solution.
Advantages over talkkonnect:
- Simpler build process (no Opus patching required)
- Fewer dependencies (just Go, libopenal, libopus)
- Full CLI support for server, username, password, and channel
- More stable and less fragile
- Better suited for headless/kiosk automation
Also added INTERCOM_COMPARISON.md documenting all evaluated options
(talkkonnect, talkiepi, barnard, mumbler) with recommendations.
The uninstall function was only removing old installation paths, causing
talkkonnect to appear as "still installed" after uninstalling.
Fixed both check_talkkonnect_status() and uninstall_talkkonnect():
check_talkkonnect_status():
- Now checks for both old and new installation locations
- Old: ~/go/bin/talkkonnect and ~/talkkonnect.xml
- New: /usr/local/bin/talkkonnect and ~/.config/talkkonnect/
- Checks all locations to accurately determine if installed
uninstall_talkkonnect():
- Removes binaries from BOTH /usr/local/bin and ~/go/bin
- Removes config from BOTH ~/.config/talkkonnect and ~/talkkonnect.xml
- Properly stops and disables service before removing
- Shows progress with descriptive messages
- Optionally removes source directory ~/talkkonnect
- Only performs actions if files/directories actually exist
Now uninstall properly removes everything and status correctly shows
"Not installed" after uninstalling.
Completely replaced the install_talkkonnect_with_config() function in
setup_intercom.sh with the proven method from talkkonnect_complete_install.sh.
Key improvements:
- Uses working Opus patch for x86_64 architecture
- Installs to /usr/local/bin/talkkonnect (not ~/go/bin)
- Config in ~/.config/talkkonnect/ (proper XDG location)
- Sets <insecure>true</insecure> by default (handles self-signed certs)
- Proper XDG_RUNTIME_DIR in systemd service for PipeWire/audio
- Automatically enables service (starts on boot)
- Better progress feedback and error handling
- Uses Go 1.24.1 (latest stable)
The function now:
1. Installs all dependencies correctly
2. Builds with proper Opus library integration
3. Creates config with user's server/credentials from prompts
4. Sets up systemd service properly
5. Enables and starts service automatically
This makes setup_intercom.sh a complete, reliable one-stop solution
that uses the same proven method as talkkonnect_complete_install.sh
while maintaining the interactive prompt workflow.
Included files:
- setup_intercom.sh - Updated with new function
- setup_intercom.sh.backup - Backup of original
- setup_intercom_talkkonnect_function.txt - Reference for the new function
- update_setup_intercom.sh - Script used to perform the replacement
Created fix_talkkonnect_now.sh to resolve immediate issues:
- Sets <insecure>true</insecure> for self-signed certificates
- Warns about SuperUser account (admin-only, not for clients)
- Fixes file ownership and permissions
- Creates/updates systemd service
- Enables and starts talkkonnect service automatically
This fixes:
- Certificate errors ("wrong certificate")
- SuperUser connection issues (can't connect as SuperUser)
- Service not starting automatically
The script detects existing installations and fixes them in-place.
Minor update to setup_intercom.sh to indicate improved method.
Added fix_talkkonnect_audio.sh diagnostic script:
- Checks PipeWire/PulseAudio session availability
- Lists all audio devices (ALSA, PulseAudio/PipeWire)
- Shows current talkkonnect audio configuration
- Provides specific recommendations for audio issues
- Includes test commands for verifying audio
Updated TALKKONNECT_SETUP.md:
- Added "Common Warnings (Usually Non-Fatal)" section
- Explains "Unable to Unmute" error (cosmetic, audio usually works)
- Explains "Unable to Find Channel Name" warning
- Explains "Failed to connect PipeWire event context" error
- Added reference to audio diagnostic script
- Included quick audio test commands
These help users understand that common errors like "Unable to Unmute"
are non-fatal and audio typically works despite the warnings.
The installation script was failing with "Permission denied" when trying
to create the config directory in another user's home directory.
Fixes:
1. Added home directory existence check before creating config
2. Use sudo -u to create directory as target user when needed
3. Use sudo tee to write config file (handles all permission scenarios)
4. Use sudo for sed command to modify the created config file
5. Always set proper ownership and permissions after creation
This fixes the "mkdir: cannot create directory '/home/kiosk': Permission denied" error.
Now the script will:
- Verify target user's home directory exists (fail gracefully if not)
- Create config directory as the target user
- Write config file with sudo to avoid permission issues
- Set proper ownership (user:user) and permissions (755 dir, 644 file)
Added diagnose_talkkonnect.sh to help troubleshoot installation issues:
- Checks binary installation
- Finds all config files and shows ownership
- Analyzes systemd service configuration
- Detects audio/PipeWire sessions for each user
- Identifies permission mismatches
- Provides specific recommendations
Improved fix_talkkonnect_permissions.sh:
- Now automatically updates systemd service file if needed
- Changes service user to match target user
- Updates config path in service file
- Reloads systemd after changes
- Stops service before making changes
These tools help resolve the "permission denied" error when talkkonnect
is configured to run as one user but config is owned by another.
The installation script had a critical bug where it created the config
directory in the script runner's home directory instead of the target
user's home directory. This caused "permission denied" errors when the
systemd service tried to run as the target user.
Changes:
- Fixed CONFIG_DIR to use $TARGET_HOME instead of $HOME
- Updated config path replacements to use $TARGET_HOME
- Added ownership change after config creation when running as different user
- Created fix_talkkonnect_permissions.sh script to repair existing installations
- Added comprehensive TALKKONNECT_SETUP.md with troubleshooting guide
This fixes the "open /home/user/.config/talkkonnect/talkkonnect.xml: permission denied" error.
The script was exiting immediately after showing "Devices found: 14" because
the timeout command returns exit code 124, which caused the script to bail
due to 'set -euo pipefail'. Added '|| true' to wait and bluetoothctl scan off
commands to allow the script to continue executing and display the device list.
install_kiosk_0.9.6-2.sh:7185-7186
Fixes:
1. Addons menu: Remove duplicate menu items (1,2 appeared twice)
- Fixed numbering: Remote Access is now option 5 instead of 6
2. Bluetooth scanning improvements:
- Make controller pairable/discoverable before scanning
- Capture scan output to show DISCOVERED devices (not just paired)
- Real-time progress indicator during 30-second scan
- Separate display of discovered vs already-paired devices
- Better error handling for pairing failures
- Proper cleanup of scan process with 'scan off'
- Helpful hints when pairing fails (e.g., AuthenticationFailed)
The bluetooth scan previously only showed paired devices after scanning,
which made it appear that no devices were found even when they were
broadcasting. Now it properly captures and displays discovered devices.
Created check_talkkonnect_fix.sh to verify if the terminal initialization
fix has been applied to the talkkonnect systemd service. This script checks
for the presence of:
- Environment="TERM=dumb"
- StandardInput=null
These settings are required to prevent the "Cannot Initialize Terminal" error
when talkkonnect runs as a systemd service without a TTY.
PROBLEM:
- talkkonnect fails with "Cannot Initialize Terminal" error
- Service shows "Talkkonnect Terminated Abnormally" in logs
- Root cause: talkkonnect uses termbox-go which requires a TTY
- Systemd services don't provide TTY by default
SOLUTION:
- Added Environment="TERM=dumb" to systemd service
- Added StandardInput=null to prevent terminal initialization
- Both changes allow talkkonnect to run headless as a service
CHANGES:
- Updated install_kiosk_0.9.6-1.sh with the fix
- Created install_kiosk_0.9.6-2.sh (new version with fix)
- Added fix_talkkonnect_terminal.sh for quick patching of existing installations
Created new version 0.9.6-1 that removes all WebRTC and Jitsi intercom
functionality and adds comprehensive Bluetooth support instead.
Changes:
- REMOVED: WebRTC intercom system (all auto-discovery, mesh networking, PWA client)
- REMOVED: Jitsi web intercom (all configuration, PTT service, PIN dialog)
- ADDED: Bluetooth addon with device management
* Scan and pair bluetooth devices
* Connect/disconnect bluetooth audio devices
* Auto-reconnect to trusted devices
* Battery status display for supported devices
- UPDATED: Addon menu now shows "Bluetooth Audio & Devices" instead of Jitsi
- UPDATED: Logs menu now includes Bluetooth logs
- UPDATED: Installation overview lists bluetooth instead of Jitsi
- UPDATED: Version header documents this as "Bluetooth Edition"
Recommended: Users should use talkkonnect addon for native PTT intercom
instead of web-based solutions for better audio quality and lower latency.
File size reduced from 338KB to 322KB (removed ~400 lines of code)
All bash syntax validated successfully
The status check was showing "Not installed" even after successful
installation because it relied on PATH and file checks that weren't
working reliably.
Changes:
- Check for /etc/systemd/system/talkkonnect.service first
- This is the most reliable indicator of installation
- Systemd service file is created during install and requires root
- Falls back to command/file checks if service file doesn't exist
This ensures status shows correctly immediately after installation.
Fixes "Text file busy" error and "Not installed" status:
1. **Stop service before install** (lines 535-547)
- Check if talkkonnect service is running
- Stop systemd service if active
- Kill any stray processes
- Sleep 1 second to ensure file is released
- Then copy the new binary
2. **Fix status check** (line 72)
- Changed from $HOME/go/bin/talkkonnect
- To /home/$KIOSK_USER/go/bin/talkkonnect
- Now correctly detects installed binary
3. **Separate build and install steps**
- Build completes inside first sudo block
- Installation happens in second sudo block after stopping service
- Clean error handling for each step
This matches the working talkkonnect_complete_install.sh approach.
The build was succeeding but the post-build verification was failing
because it tried to check /home/kiosk/talkkonnect-binary from outside
the sudo -u kiosk block.
Changes:
- Move binary verification and installation inside the sudo -u block
- Use ~ instead of /home/$KIOSK_USER (more reliable inside sudo)
- Remove redundant chmod/chown after sudo block
- Binary now installed while running as kiosk user
This matches the approach from talkkonnect_complete_install.sh where
all file operations happen inside the user context.
Implements comprehensive Bluetooth speaker/headphone support:
- Interactive pairing wizard using expect/bluetoothctl
- Device management (add, remove, disconnect, reconnect)
- Auto-reconnect on boot via systemd service
- Audio routing with PipeWire/PulseAudio integration
- Built-in diagnostics for troubleshooting
- Status display in addons menu
- Avoids CLI complexity with automated pairing workflow
Features:
- Section 14.5: Complete Bluetooth addon module
- Menu integration: New option 7 in Addons menu
- Status tracking: Shows paired/connected device counts
- Compatible with existing Squeezelite/Jitsi audio stack
Changed from /tmp to ~/talkkonnect to match working script approach:
- Clone to /home/$KIOSK_USER/talkkonnect instead of /tmp/talkkonnect-src
- Build to ~/talkkonnect-binary then copy to ~/go/bin/talkkonnect
- Run all operations as kiosk user from the start
- No chown needed - user owns their own home directory
This eliminates all "Permission denied" errors when:
- Creating vendor directory
- Removing old source files
- Building the binary
Matches the proven approach from talkkonnect_complete_install.sh
Added chown after git clone to give kiosk user ownership of the
/tmp/talkkonnect-src directory. This allows 'go mod vendor' to
successfully create the vendor directory when running as kiosk user.
Without this fix, the build would fail with:
"go: mkdir /tmp/talkkonnect-src/vendor: permission denied"
"Warning: gopus not found in vendor directory"
"[ERROR] Binary not executable after build"
Critical fixes to resolve "[ERROR] Binary not executable after build":
1. **Opus x86_64 Compatibility Patch**
- Added gopus library patch to use system libopus for x86_64
- The embedded Opus source in gopus is ARM-optimized and incomplete for x86_64
- Now uses pkg-config to link against system libopus library
2. **Vendored Dependencies**
- Added `go mod vendor` to create vendored dependencies
- Build now uses `-mod=vendor` flag to ensure patched gopus is used
3. **Enhanced Build Process**
- Set CGO_CFLAGS and CGO_LDFLAGS for proper Opus compilation
- Build in cmd/talkkonnect directory (correct location)
- Added build-essential and pkg-config to dependencies
4. **Improved XML Configuration**
- Updated to modern talkkonnect/xml document type
- Added critical voicetargets section to prevent crashes
- Added proper global settings structure
- Created .config/talkkonnect directory for logs
5. **Additional Dependencies**
- Added libopus0, libopusfile-dev for complete Opus support
- Added build-essential and pkg-config for compilation
This integrates the working approach from talkkonnect_complete_install.sh
into the setup_intercom.sh script.
Changes:
- Add SCRIPT_DIR variable for locating companion scripts
- Update addon_talkkonnect_intercom() to launch setup_intercom.sh
- Replace 134 lines of duplicate code with 30-line integration
- Update INTERCOM_README.md with clear usage instructions
Benefits:
- Single source of truth for intercom functionality
- Easier maintenance (update only setup_intercom.sh)
- Cleaner separation: install_kiosk handles UBK, setup_intercom handles intercom
- Both scripts work standalone or together automatically
Usage:
- Option 1: Run install_kiosk_0.9.6.sh → Addons → Intercom (option 4)
- Option 2: Run setup_intercom.sh directly
- Both scripts must be in same directory (automatic when cloning repo)
Created modular, standalone intercom system to avoid bloating the
10,000+ line main install script.
New Files:
- setup_intercom.sh: Complete standalone installation and management
* Install Murmur server (one kiosk becomes the server)
* Install talkkonnect client (connect to existing server)
* Install both (all-in-one setup)
* Full service management (start/stop/restart)
* Configuration tools
* Log viewing
* Uninstall options
- INTERCOM_README.md: Comprehensive documentation
* Quick start guide
* Use cases and scenarios
* Multi-kiosk setup instructions
* Troubleshooting guide
* Integration instructions
* Technical details
- integrate_intercom.sh: Integration helper
* Shows how to wire into main install script
* Example menu integration code
* Alternative sourcing method
Features:
✓ Menu-driven interface with dynamic options
✓ Status display (installed/running state)
✓ Server configuration (password, port, welcome text)
✓ Client configuration (server, credentials, channel)
✓ Service management (enable/disable/start/stop)
✓ Log viewing for diagnostics
✓ Clean uninstallation
Use Cases:
1. Single kiosk (server + client)
2. Multi-kiosk (one server, multiple clients)
3. Connect to external Mumble server
4. Other devices can connect (desktop/mobile Mumble apps)
Technical:
- Murmur server on port 64738
- talkkonnect built from source with Go
- Systemd service management
- Audio through ALSA/PipeWire
- PTT via keyboard (default: spacebar)
Next Steps:
- Test installation on clean system
- Wire into main install script addon menu
- Consider auto-discovery for multi-kiosk setups
The installation prompt was only accepting lowercase 'y', causing the
script to exit when users entered uppercase 'Y'. This fix aligns the
prompt behavior with all other y/n prompts in the script by using
case-insensitive pattern matching (=~ ^[Yy]$).
Fixes issue where installation would bail after selecting Y to proceed.
Fixes JavaScript error "given browserview is not attached to the window"
that occurred when unlocking the screen after boot with password protection.
Changes to unlockScreen() function:
- Add try-catch around hidden view restoration to prevent crashes
- Ensure view is attached with addBrowserView() before setTopBrowserView()
- Add fallback to regular views if hidden view restoration fails
- Validate currentIndex is within bounds before using it
- Check views.length>0 before attempting to attach views
This ensures safe view restoration in all unlock scenarios, particularly
when unlocking immediately after boot with password protection enabled.
Key changes:
- Remove time-based lockout prompt ("Only enforce lockout during specific hours?")
- Detach all browser views when locked to prevent content visibility
- Show power menu on solid black screen (lockoutWindow) when locked
- Password protection now always active when enabled (more reliable)
Fixes:
- Users can no longer see URLs or content when password screen is active
- Pressing Ctrl+Alt+Delete shows power menu on solid screen, not over content
- All browser views completely hidden until password is entered
CRITICAL FIX: Removed lockoutActivityTime reset from markActivity()
- markActivity() was resetting lockoutActivityTime on EVERY activity
- This prevented inactivity lockout from EVER triggering
- Now lockout timer only resets when user unlocks or selects extension
ROOT CAUSE:
The markActivity() function was resetting lockoutActivityTime (line 3904):
if(enablePasswordProtection && lockoutTimeout > 0){
lockoutActivityTime = now; // ← PROBLEM
}
markActivity() is called on EVERY:
- Mouse move
- Mouse click
- Keyboard press
- Page load
- Focus change
Result: lockoutActivityTime was CONSTANTLY being reset, so lockout could
NEVER reach the configured timeout (user reported 17 minutes wasn't working).
FIX:
Removed the lockoutActivityTime reset from markActivity() entirely (line 3908).
Now lockoutActivityTime only resets when:
1. User unlocks screen (unlockScreen() function)
2. User selects time extension (showPauseDialog/showInactivityPrompt)
This is the correct, simple behavior: lockout should trigger after X minutes
of inactivity, period. If user wants to extend, they can select an extension.
USER REPORT:
- Scheduled lockout works ✓ (lock at 15:00)
- Inactivity lockout doesn't work ✗ (lock after 17 min idle)
- This fix addresses the inactivity lockout issue
SIMPLIFIED: Removed unnecessary complexity added in v0.9.5-7 and v0.9.5-8.
The simple fix was just to stop resetting the timer on every activity.
CRITICAL FIX: Extensions now properly reset lockout activity timer
- Pause button extensions now reset lockoutActivityTime when selected
- Manual site timeout extensions now reset lockoutActivityTime when selected
- Prevents lockout from counting idle time accumulated BEFORE extension
- Lockout timer now truly starts fresh when user selects an extension
ROOT CAUSE (v0.9.5-7 was incomplete):
In v0.9.5-7, I added code to checkLockoutTimer() to SKIP lockout checks during
active extensions. This prevented lockout from triggering during the extension
period. However, the extension handlers themselves didn't reset lockoutActivityTime.
TWO PLACES WERE MISSING lockoutActivityTime reset:
1. showInactivityPrompt() - Manual site timeout extensions (line 4632)
When user selects "15 minutes" on manual site inactivity prompt:
✓ Set inactivityExtensionUntil = now + 15min
✓ Set lastUserInteraction = now
✓ Set siteStartTime = now
✗ Did NOT set lockoutActivityTime = now
2. showPauseDialog() - Pause button extensions (line 4680)
When user clicks pause button and selects "15 minutes":
✓ Set inactivityExtensionUntil = now + 15min
✓ Set lastUserInteraction = now
✓ Set siteStartTime = now
✗ Did NOT set lockoutActivityTime = now
BROKEN SCENARIO IN v0.9.5-7:
- Lockout configured for 30 minutes of inactivity
- User is idle for 10 minutes
- User clicks "15 minutes" extension
- lockoutActivityTime still shows 10 minutes ago (NOT reset)
- Extension blocks lockout for 15 minutes (v0.9.5-7 fix working)
- After 15 minutes, extension expires
- v0.9.5-7 code resets lockoutActivityTime to now
- Lockout would happen 30 minutes later
The problem: This means lockout NEVER enforced the configured timeout if
users kept selecting extensions, because each extension expiration reset
the lockout timer.
FIX IN v0.9.5-8:
Added lockoutActivityTime = now to BOTH extension handlers:
- Lines 4637-4641: Manual site inactivity prompt extension handler
- Lines 4684-4688: Pause button extension handler
NEW BEHAVIOR:
- User idle for 10 minutes
- User clicks "15 minutes" extension
- lockoutActivityTime = now (RESET on extension selection)
- User is now considered "active" (selected extension = user interaction)
- Extension blocks lockout for 15 minutes
- After 15 minutes, lockoutActivityTime shows 15 minutes ago
- Lockout happens 30 minutes after extension selected (at 15 + 30 = 45 min total)
This is more intuitive: selecting an extension is a user interaction that
proves the user is present, so lockout timer should start fresh.
Includes all fixes from v0.9.5-7 (checkLockoutTimer respects extensions)
CRITICAL FIX: Inactivity lockout now respects time extensions
- Lockout timer was completely ignoring pause button extensions
- Lockout timer was ignoring manual site timeout extensions
- Added inactivityExtensionUntil check to checkLockoutTimer() function
- Time extensions now properly prevent BOTH site timeout AND lockout
- When extension expires, lockout timer resets (doesn't trigger immediately)
FIXED: Manual sites (duration: 0) now fully support time extensions
- Pause button extensions now work on manual sites
- Manual site timeout extensions now prevent lockout
- Extensions apply to both rotation blocking AND lockout prevention
ROOT CAUSE:
The checkLockoutTimer() function (line 4061) only checked:
- lockoutActivityTime vs lockoutTimeout
- Did NOT check inactivityExtensionUntil
This meant when a user clicked "15 minutes" on pause button:
✓ Site rotation/timeout was blocked (lines 4317, 4375 checked extension)
✗ Inactivity lockout still triggered after configured time
EXAMPLE SCENARIO THAT WAS BROKEN:
- Manual site with 2 min inactivity timeout to return home
- Lockout after 5 minutes of inactivity
- User idle for 1m 50s, clicks "15 minutes" extension
- Expected: Can stay for 15 more minutes
- Actual v0.9.5-6:
* Home return prompt blocked ✓
* Lockout happens at 5 min idle ✗
- Fixed v0.9.5-7:
* Home return prompt blocked ✓
* Lockout also blocked for 15 min ✓
FIX (lines 4083-4100):
Now checkLockoutTimer() checks inactivityExtensionUntil FIRST:
1. If within extension period: return early (skip lockout check)
2. If extension just expired: reset lockoutActivityTime (prevent immediate trigger)
3. Then check normal lockout timeout
This matches the pattern used in rotation (line 4317) and home return (line 4375).
Includes all fixes from v0.9.5-6 (boot password sequence, limited power menu)
CRITICAL SECURITY FIX#1: Boot password now required BEFORE showing websites
- Password screen now appears IMMEDIATELY on boot (no website flash)
- Websites and rotation timer only start AFTER successful password entry
- Root cause: attachView() was called before checking boot flag
- Fix: Reordered code to check boot flag FIRST, only call attachView() if no boot
- unlockScreen() now starts master timer when unlocking from boot password
CRITICAL SECURITY FIX#2: Limited power menu when locked out
- Ctrl+Alt+Del when locked now shows LIMITED menu: Shutdown/Restart/Cancel
- NO Reload option available when locked (prevents bypass)
- Full menu (with Reload) only available when unlocked
- Still allows emergency shutdown/restart without password
- Message clearly indicates "System is locked. Limited options available."
ROOT CAUSE OF BOOT PASSWORD BYPASS:
In v0.9.5-5, the code sequence was:
1. attachView(startIndex) - shows website
2. Check boot flag - if exists, show password screen
This meant users saw the website for ~1 second, then password screen appeared.
Pressing Ctrl+Alt+Del at that moment would reload and bypass the password.
NEW SEQUENCE in v0.9.5-6:
1. Check boot flag FIRST
2. If boot flag exists: show password screen, DON'T load websites
3. If no boot flag: load websites normally
4. When password entered: attachView() and startMasterTimer()
Includes all fixes from v0.9.5-5 and v0.9.5-4
CRITICAL SECURITY FIX:
- Fixed Ctrl+Alt+Del bypassing boot password requirement
* Added isLockedOut check to showPowerMenu() function
* Power menu (Shutdown/Restart/Reload) now blocked when system is locked out
* Prevents bypassing boot password via Reload option
* Also prevents bypassing inactivity lockout and time-based lockout
ROOT CAUSE:
The showPowerMenu() function was missing the isLockedOut check that other
navigation functions (nextTab, prevTab) already had. This allowed users to
press Ctrl+Alt+Del during boot password screen, select "Reload", and bypass
the password requirement entirely.
NAVIGATION TROUBLESHOOTING:
Added troubleshooting notes for users experiencing navigation issues:
- Check config.json for hidden sites (duration: -1)
- Hidden sites don't count toward navigation
- Need at least 2 visible sites for Ctrl+Tab/swipe to work
Includes all fixes from v0.9.5-4 (polkit restrictions, X server hardening,
autostart compatibility, xbindkeys fixes)
This was the root cause of extensions not working. When user clicked
extension buttons (15 min, 30 min, etc.), that click triggered markActivity()
which immediately cleared the extension that was just set.
Now extensions work correctly - they only expire when:
- Time runs out naturally
- User explicitly goes home
- User cancels the extension
This fixes:
- Pause button extensions not working (rotating after 1 min)
- Manual site timeout extensions not working (prompt after 1 min)
- Both rotation and inactivity timer extensions
This release fixes multiple critical bugs reported in v0.9.5-1:
## Configuration Persistence Fixes
- **CRITICAL**: Fixed sites being wiped when editing password/pause/OSK settings
- Added load_existing_config() function to load all settings before any menu
- Now called before configure_optional_features and configure_password_protection
- Prevents empty URLS/DURS arrays from overwriting existing sites in save_config
- **Fixed password protection not being saved on reboot**
- Settings now properly persist through load_existing_config function
- All password protection variables properly loaded from config.json
- **Fixed sites not being saved on reboot**
- Configuration persistence issue resolved with load_existing_config
## Timing & Extension Fixes (main.js)
- **Fixed time extension rotating to wrong site**
- Added checks to prevent rotation while pause dialog is open
- Added checks to prevent rotation while inactivity prompt is open
- Extension is now applied to the current site, not the next one
- **Fixed pause not working correctly**
- Pause dialog no longer allows rotation during user selection
- Extension properly blocks rotation until time expires
- **Fixed manual site timeout popup appearing after 1 minute**
- Fixed extension expiration to reset lastUserInteraction
- Prevents prompt from showing immediately after extension expires
- Added proper checks to prevent duplicate prompts
## User Experience Improvements
- **Added cancel/exit option to menus**
- configure_optional_features now asks "Save these changes?"
- configure_password_protection now asks "Save these changes?"
- Users can discard changes by answering "no"
- **Added comprehensive settings display**
- show_current_config now displays all sites with [HOME] marker
- Shows home URL and inactivity timeout
- Shows optional features status (pause/keyboard buttons)
- Shows complete password protection configuration
- Shows lockout timeout, lock time, active hours, and boot password
## Version Updates
- Bumped SCRIPT_VERSION to 0.9.5-2
- Bumped main.js VERSION to 0.9.5-2
All reported issues from 0.9.5-1 have been addressed.
New Features:
- Time-based session lockout: Automatically lock at a specific time daily
- Active hours for lockout: Only enforce timeout during configured hours
- Password on boot: Require password when system powers on/reboots
- Enhanced lockout timeout: Now respects active hours configuration
Configuration Options:
- lockoutAtTime: Time to auto-lock (e.g., "17:00")
- lockoutActiveStart/End: Time range for lockout enforcement
- requirePasswordOnBoot: Boolean to require password on system boot
Technical Changes:
- Updated configure_password_protection() with new prompts
- Added lockout time validation (HH:MM format)
- Enhanced main.js with isWithinActiveHours() and checkScheduledLockTime()
- Added boot flag creation in openbox autostart
- Updated config.json schema with new fields
The session timeout (inactivityTimeout) continues to work as before,
returning to home page after inactivity. The lockout timeout provides
an additional security layer with password protection.
- Fixed missing closing brace in keyboard auto-close section
- Removed duplicate line in showKeyboardIcon function
- Corrects SyntaxError: missing ) after argument list at line 441
Based on v0.9.2-6 (includes enhanced Electron update tool)
Version 0.9.4 introduces configurable optional features and security:
New Features:
- Optional pause button: Can be disabled during install/rerun
* Disables functionality entirely, not just hides the UI
* Configured in Core Settings menu (option 7)
- Optional keyboard button: Can be disabled during install/rerun
* Disables on-screen keyboard functionality completely
* Configured in Core Settings menu (option 7)
- Password protection with session lockout:
* Customizable lockout timeout (in minutes of inactivity)
* Blank screen during lockout with no interaction allowed
* Password required to unlock after timeout
* Password required after display schedule wake-up
* SHA-256 password hashing for security
* Option to only require password after display wake (0 minute timeout)
Configuration:
- New configure_optional_features() function for pause/keyboard buttons
- New configure_password_protection() function for security setup
- Added to Core Settings menu (options 7 & 8)
- All settings saved to config.json and loaded on startup
Implementation:
- Main.js: Password lockout window with blank screen
- Main.js: Lockout timer check in master timer loop
- Main.js: Display wake flag detection (.display-wake file)
- Main.js: Conditional pause button visibility based on config
- Preload.js: Conditional keyboard button based on config
- Display-on script: Creates flag file to trigger password requirement
All features are configurable on first install or by rerunning the script.
Fixed two critical issues preventing Electron update from completing:
1. cd permission denied error
Problem: Script tried to `cd /home/kiosk/kiosk-app` which failed with
"Permission denied" because the directory has restricted permissions (drwxr-x---)
and the regular user can't enter it.
Fix: Use `sudo -u kiosk bash -c "cd '/home/kiosk/kiosk-app' && npm install ..."`
instead of separate cd + npm commands. This runs both commands as the kiosk
user in a single bash session, avoiding the permission issue.
2. Wrong service name (kiosk vs lightdm)
Problem: Scripts tried to stop/start "kiosk" service which doesn't exist on
the user's system. Their kiosk runs under lightdm service.
Fix: Changed all references from:
- `systemctl stop/start kiosk` → `systemctl stop/start lightdm`
- "Restart kiosk service" → "Restart kiosk display"
- `journalctl -u kiosk` → `journalctl -u lightdm`
Additional fixes:
- Updated file checks: `[ -d ]` → `sudo test -d` for restricted directories
- Applied fixes to both update paths: successful install and failure/restore
- Updated both update_electron.sh and install_kiosk_0.9.2-6.sh
Changes in both scripts:
- update_electron() function: removed cd, added bash -c wrapper, changed service name
- Backup restore paths: same fixes applied
- Success path: updated restart prompts and service checks
- Failure path: fixed restore process with proper directory access
The update should now complete successfully without permission errors.
Fixed two issues preventing the Electron update from working properly:
1. Log messages appearing in version output
- get_latest_electron_version() was outputting log messages to stdout
- These messages were being captured along with the version number
- Result: "Target version: [INFO] Fetching...39.2.3" in output
- Fix: Redirect log_info and log_error to stderr with >&2
- Now only the version number is captured in the variable
2. Backup function permission errors
- stat command needed sudo to read owner of restricted directories
- File checks [ -f ] couldn't access files in drwxr-x--- directories
- mkdir failed with "cannot create directory '/home/kiosk': Permission denied"
- Fix: Use sudo for all file operations in create_backup():
* sudo stat -c '%U' to get directory owner
* sudo test -f/d for file/directory checks
* sudo -u owner for mkdir, cp, and file writes
Changes in both update_electron.sh and install_kiosk_0.9.2-6.sh:
- get_latest_electron_version functions: Added >&2 to log statements
- create_backup functions: Added sudo to stat and all file checks
- Ensures backup works with restricted /home/kiosk permissions
The update process should now complete successfully without permission errors
or garbled version output.
The scripts were failing to find the kiosk installation at /home/kiosk/kiosk-app
because the /home/kiosk directory has restricted permissions (drwxr-x---),
preventing regular users from reading it.
Changes in both update_electron.sh and install_kiosk_0.9.2-6.sh:
1. Updated find_kiosk_dir() to use sudo for all file checks
- sudo test -f for checking if main.js exists
- Prevents "permission denied" errors on restricted directories
2. Added Method 4: Detect from running electron process
- Parses ps output to find electron executable path
- Extracts app directory from the path
- Provides fallback when directory searches fail
3. Updated get_current_electron_version functions
- Use sudo test -f to check if package.json exists
- Use sudo grep to read package.json and get version
- Ensures version detection works with restricted permissions
4. Fixed directory existence checks
- Use sudo test -d for checking kiosk directory
These changes allow the scripts to:
- Find kiosk installations in directories with restricted permissions
- Detect installations even when run as a regular user
- Work correctly with the standard /home/kiosk setup (drwxr-x---)
- Provide better fallback detection using running processes
The scripts will now prompt for sudo password when needed to check
for files in restricted directories, then continue normally.
Changed the script to run as a regular user instead of requiring sudo.
The script now:
- Checks that it's NOT being run as root (prevents sudo usage)
- Uses sudo for individual commands that need elevated privileges
- Prompts for sudo password only when needed
Changes:
- Removed EUID check that required running with sudo
- Added check to prevent running as root
- Added sudo to backup operations (mkdir, cp, file writes)
- All systemctl and npm install commands already use sudo appropriately
This matches the behavior of install_kiosk scripts which should be run
as a regular user, not with sudo.
Usage: ./update_electron.sh (not sudo ./update_electron.sh)
This new version of the install script includes a completely rewritten
manual Electron update tool that fixes all the issues with the previous version:
NEW FEATURES:
- Smart installation detection across multiple locations
- Verifies Electron is actually running (not just installed)
- Gets current version from both package.json and node_modules
- Fetches latest stable version from npm with multiple fallback methods
- Clear version comparison display (current vs latest)
- Breaking changes warning with direct links to Electron documentation
- Automatic backup creation before any changes
- Provides clear restore instructions
- Multiple user confirmation prompts before making changes
- Automatic rollback if update fails
- Fixes chrome-sandbox permissions after installation
- Manages kiosk service stop/start automatically
FIXES:
- No more "no electron app found" errors
- No more "script just bails" - proper error handling throughout
- Proper detection of running Electron instances
- Network failure handling with multiple fallback methods
- Clear feedback at every step of the process
The enhanced update tool is accessible from:
Advanced Menu → Manual Electron Update
Version updated from 0.9.2 to 0.9.2-6 to reflect the enhancement.
This script addresses issues with the manual Electron update process by:
- Detecting kiosk installation across multiple methods (user home, systemd service)
- Checking if Electron is actually running (not just installed)
- Getting current Electron version from both package.json and node_modules
- Fetching latest stable Electron version from npm registry with fallbacks
- Displaying clear version comparison (current vs latest)
- Warning users to check for breaking changes with links to documentation
- Creating automatic backups of package.json, package-lock.json, and version info
- Providing clear restore instructions if something goes wrong
- Requiring user confirmation at multiple steps before making changes
- Automatically attempting rollback if the update fails
- Fixing chrome-sandbox permissions after installation
- Managing kiosk service stop/start around the update
The script handles edge cases like:
- Missing or moved installations
- Network failures when fetching versions
- Failed npm installations with automatic recovery
- Permission issues with proper sudo user handling
Users can now safely update Electron with confidence that they can restore
if needed, and with clear visibility into what versions are being used.
The pause button wasn't appearing because preload.js variables were being
reset when pages reloaded/navigated, but the visibility message was only
sent once in attachView().
Now sends pause-button-visibility on EVERY page load (did-finish-load event)
to ensure the button state persists across page reloads and navigation.
Major UX improvement: Replaced problematic home return popup on timed sites
with an on-demand pause button that appears on user interaction.
Changes:
- NEW: Pause button appears in bottom-left corner on user interaction
- Shows only on timed rotation sites (duration > 0)
- Auto-hides after 5 seconds of inactivity
- Reuses existing inactivity prompt logic for pause dialog
- Pause durations: 15 min, 30 min, 1 hour, 2 hours
- Home return popup now ONLY appears on manual sites (duration = 0)
- Timed sites use pause button instead (cleaner UX)
Implementation details:
- Added pause button state/functions to preload.js (outside DOMContentLoaded)
- Added pause-dialog.html with time selection UI
- Added showPauseDialog() function and IPC handler in main.js
- Modified attachView() to send pause-button-visibility based on site duration
- Modified HOME RETURN CHECK to skip timed sites (line 3622-3625)
- Button creation reuses keyboard icon pattern for consistency
This fixes the issue where the home return popup would appear but sites
could rotate under it on timed rotation sites. Now users get a clean,
on-demand pause control that doesn't interfere with normal browsing.
The home return inactivity popup was only working on manual sites (duration=0)
and hidden sites, but not on timed rotation sites (duration>0). This was because
the site rotation logic had an early return statement that prevented the home
return check from ever executing.
Changes:
- Removed early return after rotateToNextSite() call (line 3605)
- Now both auto-rotation AND home return checking work together
- Home popup will appear on ALL site types after inactivity period
- Updated version to 0.9.1-1 with changelog
Technical details:
The master timer had two sections - section 6 for site rotation and section 7
for home return checking. When a timed site rotated, section 6 would return
early, preventing section 7 from executing. Removing the return allows both
features to work in harmony.
Root cause: Pause button state variables and IPC listener were declared inside
DOMContentLoaded, causing them to reset every time a page loaded.
Symptoms:
- Main process sends shouldShow=true when switching to rotation site
- Preload receives it and sets pauseButtonShouldShow=true
- Page loads → DOMContentLoaded fires → variables reset to false
- User taps screen → sees shouldShow=false → no button appears
Fix:
- Moved pause button variables outside DOMContentLoaded (persist across page loads)
- Moved pause button functions outside DOMContentLoaded (called by IPC listener)
- Moved IPC listener outside DOMContentLoaded (registers once, not per page)
- Kept only user interaction handlers inside DOMContentLoaded
This ensures pause button state persists across page navigations within a tab.
**Return-to-Home Popup Logic (CORRECTED):**
- FIXED: Return-to-home inactivity prompt now appears ONLY on manual sites (duration=0)
- Rotation sites (duration>0) skip return-to-home logic and use auto-rotation instead
- Previous commit had this backwards - now corrected
**Pause Button Auto-Hide:**
- Pause button now auto-hides after 5 seconds of inactivity (like keyboard icon)
- Each user interaction resets the 5-second timer
- Debug logging shows when button auto-hides
- Prevents button from staying on screen permanently
**Manual Electron Update Detection:**
- Added main.js file check to Method 1 (default kiosk user)
- Added Method 6: Check /opt/kiosk-app and /usr/local/kiosk-app
- Added Method 7: Query systemd kiosk.service for working directory
- Improved parent directory detection with cleaner variable usage
- Enhanced error message with numbered search locations and kiosk user home path
- Better debug output to help diagnose installation issues
**Display Schedule Logic (CRITICAL FIX):**
- FIXED: Reversed display off/on time comparison logic
- Overnight case (22:00 off, 06:00 on): Now correctly checks off_mins > on_mins
- Same-day case (08:00 off, 17:00 on): Now correctly checks off_mins < on_mins
- Display will now properly stay OFF during scheduled times
- Fixes issue where "keep display on" watchdog was too aggressive
All changes improve UX and fix critical scheduling bugs
- Add comprehensive console logging for pause button lifecycle:
* Main process logs when sending visibility updates with duration info
* Renderer logs visibility changes and user interaction events
* Helps diagnose why pause button may not appear on rotation sites
- Fix return-to-home inactivity prompt appearing on manual sites:
* Skip inactivity timeout logic when on manual sites (duration=0)
* Manual sites should not trigger return-to-home prompts
* Only rotation sites should show inactivity prompts
These changes help diagnose pause button issues and improve UX for manual sites
Major Fixes:
1. FIXED: Pause button visibility logic completely rewritten
- Pause button now properly hidden on duration=0 sites
- Shows ONLY on user interaction (mousedown/touchstart/keydown)
- Main process sends pause-button-visibility on tab switch
- Preload receives visibility state and enforces it
- Button hidden immediately when switching to manual sites
2. FIXED: Pause dialog window conflict resolved
- Created separate pauseWindow variable (was reusing promptWindow)
- Pause dialog no longer disappears immediately
- Prevents conflicts with inactivity prompt window
- Each dialog has its own window lifecycle
3. FIXED: Mixed header characters now uniform
- All =--- and =-- patterns replaced with ---
- Consistent use of dashes throughout script
- Better terminal display compatibility
4. FIXED: Manual Electron update detection improved
- Three-method detection strategy:
* Method 1: Check /home/kiosk/kiosk-app
* Method 2: Search all /home/*/kiosk-app with main.js verification
* Method 3: Check current directory for kiosk-app
- Added debug output showing search paths and current context
- More robust detection across different installation scenarios
Implementation Details:
- pauseButtonShouldShow tracks if button is allowed on current site
- pauseButtonShown tracks if button is currently displayed
- User interaction only shows button if pauseButtonShouldShow is true
- attachView() sends visibility message on every tab switch
- Throttled user interaction handling (100ms) prevents spam
Critical Fixes:
- FIXED: npm installation verification added
* Now explicitly checks if npm is installed after nodejs
* Falls back to installing npm separately if missing
* Displays npm version after installation
* Prevents "npm: command not found" error during Electron install
- FIXED: Pause button now appears only on user interaction
* Hidden by default (display:none)
* Shows on mousedown/touchstart/keydown events
* Similar behavior to keyboard icon
* Throttled to check every 5 seconds
* Better UX - less visual clutter
- FIXED: Pause button hidden on manual sites (duration=0)
* Main process checks site duration when visibility requested
* Sends pause-button-visibility message to views
* attachView() function controls visibility on tab switch
* Prevents confusion on sites where return-to-home popup appears
Implementation:
- Added 'request-pause-button-visibility' IPC message
- Main process responds with 'pause-button-visibility' based on duration
- Pause button automatically hidden/shown when switching tabs
- User interaction triggers visibility check
Key Changes:
- FIXED: All box drawing characters replaced with consistent standard chars
* Changed === to --- for better terminal compatibility
* Removed all special Unicode box drawing symbols
- FIXED: Pause button time options now match return-to-home dialog
* Changed from 5/15/30/60 to 15/30/60/120 minutes
* Consistent user experience across both dialogs
* Icons match the inactivity prompt style
- FIXED: Site rotation now respects user interaction
* Rotation pauses for 1 minute after last user activity
* Prevents sites from rotating while user is actively using them
* Similar to keyboard auto-close behavior (30 sec inactivity)
* Provides better UX - no interruptions during use
- FIXED: Manual Electron update directory detection
* Now dynamically searches for kiosk installation
* Checks /home/kiosk/kiosk-app first
* Falls back to searching all /home/*/kiosk-app directories
* Displays detected user and directory path
* Fixes "directory not found" error
Implementation Details:
- Pause button works on all pages including home URL
- Rotation logic: respects both pause extension AND user activity
- Electron update creates backup before updating
- Verifies update completion and offers rollback if needed
Version 0.9.0:
- Renamed from v09.9.1_4 to use cleaner version numbering (0.9.0)
- Updated all internal version references
Version 0.9.1 - New Features and Fixes:
- NEW: Pause button feature (bottom-left, orange button)
* Allows users to pause rotation and inactivity timers
* Time extension options: 5, 15, 30, or 60 minutes
* After extension expires, normal rotation/home logic resumes
* Provides better user control without complex automation
- FIXED: Site rotation timing now more consistent
* Rotation now happens on schedule regardless of user interaction
* User activity only blocks return-to-home, not site rotation
* Sites will display for their configured duration more reliably
* Added logging to show rotation timing
- FIXED: Manual Electron update feature completely rewritten
* Added comprehensive error checking at each step
* Creates backup before updating
* Verifies update after completion
* Provides rollback instructions if update fails
* Shows current and new versions
* Logs update process to /tmp/electron-update.log
- IMPROVED: Removed all box drawing characters (╔╗╝╚) from output
* Replaced with standard characters for better compatibility
- IMPROVED: Code cleanup and better comments throughout
Modified the inactivity check to show the return to home popup on both
timed and manual websites by removing the manualNavigationMode condition.
Previously, the popup only appeared on manual (0-duration) websites.
CRITICAL FIXES:
- Removed userRecentlyActive early return that blocked ALL rotation
- v0.9.15 had bug where any interaction blocked rotation for 60 seconds
- Sites now rotate on schedule unless user specifically interacted with that site
BEHAVIOR NOW CORRECT:
- Sites with time rotate on schedule automatically
- User interaction pauses rotation ONLY on that specific site
- After 1 minute of inactivity, "Return to Rotation" popup appears
- Popup only appears on sites where user actually interacted
- No popup on home screen unless user interacted with home screen
- Media playback check every 3 seconds (good performance)
This fixes the issues where:
- No rotation was happening even with sites having time set
- Popup was appearing without user interaction
- Popup was appearing on home screen when there was no rotation
This commit fixes the initial v0.9.15 implementation to match the
actual vision:
CORRECTED BEHAVIOR:
- User interaction PAUSES rotation on that site
- After 1 minute of inactivity → popup appears
- Popup gives options: extend time or return to rotation
- No response (15 sec) → auto-return to rotation
- Works on ALL sites including home URL
- Media playback blocks popup and rotation
KEY FIXES:
1. Removed wrong "popup on first interaction" logic
2. Restored userInteractedWithCurrentSite flag (removed in v0.9.14)
3. markActivity() now sets interaction flag instead of showing popup
4. Rotation blocked when userInteractedWithCurrentSite=true
5. Inactivity check works on ANY site where user interacted
(not just home or manualNavigationMode)
6. Changed default timeout from 2 minutes to 1 minute
7. Prompt response clears interaction flag on "return to rotation"
8. Extension expiry clears interaction flag to resume rotation
9. Updated all bash script defaults from 120s to 60s
TECHNICAL CHANGES:
- Line 3639: Changed popupShownForCurrentSite → userInteractedWithCurrentSite
- Line 3706-3711: Set flag in markActivity() instead of showing popup
- Line 3937: Block rotation if userInteractedWithCurrentSite
- Line 3947-3989: Simplified inactivity check - works on ANY interacted site
- Line 3651: Default timeout 60000ms (was 120000ms)
- Line 3671: Config default 60s (was 120s)
- Line 3970: Clear flag when extension expires
- Line 4078: Reset flag when site changes
- Line 4179, 4197: Clear flag on return to rotation
- Bash section: Updated all 120s→60s, 2min→1min defaults
This matches the original vision: rotation pauses on interaction,
popup after inactivity gives control, auto-return prevents stuck kiosk.
Major changes:
- Return to rotation popup now appears on ANY user interaction
with a site (click, touch, scroll, keyboard)
- Exception: popup does NOT appear when media is playing
- Popup gives immediate option to extend time on current URL
(15/30/60/120 minute selections)
- Popup pauses rotation while displayed
- Appears once per site load to avoid spam
- Updated popup message from "Are you still here?" to
"Pause Rotation - Would you like to stay on this page?"
Technical implementation:
- Added popupShownForCurrentSite flag to track popup state
- Modified markActivity() to check media playback and show popup
on first interaction (with 5-second debounce)
- Reset popup flag in attachView() when site changes
- Kept existing inactivity-based prompt as backup mechanism
- Updated prompt HTML with more appropriate messaging
Version bumped: 0.9.14 → 0.9.15
MAJOR REFACTOR: Reverted to the simpler, working logic from v09.9.1_7
that had fewer problems.
Changes:
1. Removed userInteractedWithCurrentSite flag completely
- This flag was causing inactivity prompts to appear on every site
- Much simpler logic without it
2. Removed rotation-blocking logic from markActivity()
- No longer sets manualNavigationMode=true on user touch
- Sites rotate freely based on time, NO blocking
3. Inactivity prompts only appear in two scenarios:
- On the home page (after configured timeout)
- When user manually swiped to a different site
4. Manual swipe behavior restored:
- nextTab/prevTab now set manualNavigationMode=true
- Inactivity prompt shows after timeout on manually navigated sites
- "Return to Rotation" resets manualNavigationMode=false
5. Rotation logic simplified:
- No checks for manualNavigationMode - just rotates based on time
- No checks for prompts or session state
- Much cleaner, less edge cases
Expected behavior:
- Home page loads, sites auto-rotate for their configured duration
- Inactivity prompt only on home page or manually navigated sites
- Media plays and stops normally, rotation continues
- No black screens, no premature popups
This brings back the simpler architecture that worked better.
Fixes two critical bugs reported by user:
1. Fixed inactivity popup appearing on home page without interaction
- markActivity() now only sets userInteractedWithCurrentSite when
resetLockoutTimer=true (actual user touches)
- System events (prompt responses, app initialization) no longer
trigger the interaction flag
- Home page won't show popup until user physically touches screen
- Resolves: "return to rotation popup appears before page rotates"
2. Fixed media playback black screen after couple minutes
- Improved rotation resume logic after media grace period
- Removed narrow 2-second time window (30-32s) that could be missed
- manualNavigationMode now reliably resets after media ends AND
user has been inactive for 60 seconds
- Rotation properly resumes when user walks away after media stops
- Resolves: "media playback stops with black screen, no rotation"
Expected behavior:
- Home page loads, no popup until user touches screen
- Sites rotate for full configured duration (10 seconds)
- Media plays, stops, 30s grace + 60s inactivity, then rotation resumes
- Time extensions (15 min) continue to work correctly
Fixes three critical bugs:
1. Fixed inactivity popup appearing on every rotated site
- userInteractedWithCurrentSite now resets when switching sites
- Each site independently tracks user interaction
- Popup only appears on sites user actually touched
2. Fixed rotation not resuming after "I'm still here" response
- Clicking "I'm still here" now sets manualNavigationMode=false
- Rotation resumes after user acknowledges prompt
3. Fixed rotation stuck after media playback ends
- After media grace period (30s), manualNavigationMode resets
- Prevents black screen when media stops
- Normal rotation automatically resumes
User-reported issue: Sites showing for full duration, no popup spam,
media playback properly returns to rotation.
This release clarifies the media playback behavior and fixes an incorrect
"smart grace period" implementation that violated the core principle.
Core Principle:
- Media playback TRUMPS everything (rotation and inactivity prompts)
- Media plays uninterrupted until: ends naturally, user pauses, session
lockout, or display schedule
- After media stops: 30-second grace period ALWAYS applies (no exceptions)
- After grace period: Normal inactivity and rotation rules resume
Changes:
- Restored simple grace period logic (always 30 seconds after media stops)
- Removed incorrect "smart" grace period that could skip the delay
- Added clarifying comments about media blocking behavior
- Documented that inactivity timeout is user-configurable (default 2 minutes)
The grace period ensures smooth transitions when media ends naturally,
preventing jarring interruptions with popups or rotation changes.
CRITICAL FIX: Manual swipes to 0-time pages now trigger inactivity prompts.
The problem:
- User swipes to a 0-time (manual) page but doesn't touch it
- userInteractedWithCurrentSite stays false
- No inactivity prompt ever appears
- Kiosk stuck on that page forever
The fix:
- Manual swipe now explicitly sets userInteractedWithCurrentSite=true
- Swipe counts as engagement with the new page
- After inactivity timeout, prompt appears even if user never touched page
- Ensures "Return to Rotation" mechanism works on ALL pages
Complete flow now works as designed:
1. Normal rotation with duration > 0 sites
2. User interacts with ANY site → rotation pauses
3. After 2min inactivity → prompt appears
- "Return to Rotation" → returns to home, resumes rotation
- "I'm still here" → waits another 2min, prompt again
- Time extension (5/15/30/60 min) → waits that long, prompt again
- No response (15 sec) → auto-returns to rotation
4. User swipes to new page → counts as interaction, rotation resumes
5. Media playing → blocks all rotation and prompts (30s grace period)
6. Display schedule → screen blanks, app keeps running
7. Password/lockout → takes precedence on boot/resume/timeout
Technical changes:
- Lines 4072-4075: Set userInteractedWithCurrentSite=true in nextTab()
- Lines 4097-4100: Set userInteractedWithCurrentSite=true in prevTab()
- Ensures inactivity logic works even on untouched 0-time pages
This completes the comprehensive rotation/inactivity system.
CRITICAL FIX: Manual swipes now properly resume rotation instead of keeping it paused.
The issue:
- User interacts with page A → rotation pauses
- User swipes to page B → rotation should resume, but was staying paused
- This was because manualNavigationMode stayed true
The fix:
- nextTab() and prevTab() now set manualNavigationMode=false AFTER markActivity
- This overrides the manualNavigationMode=true set by markActivity
- Manual swipes are navigation, not content interaction
- Rotation will now resume on the new page (if it has duration > 0)
Complete flow now:
1. User touches page → manualNavigationMode=true → rotation pauses
2. After 2min idle → prompt appears with options:
- "Return to Rotation" → manualNavigationMode=false → rotation resumes
- "I'm still here" → manualNavigationMode stays true → rotation stays paused
- Time extension → rotation paused during extension, prompt reappears when expires
- No response (15sec) → auto-returns to rotation
3. User swipes to new page → manualNavigationMode=false → rotation resumes
Technical changes:
- Lines 4054-4072: Reordered nextTab() to set manualNavigationMode=false AFTER markActivity
- Lines 4074-4092: Reordered prevTab() to set manualNavigationMode=false AFTER markActivity
- Time extensions still cleared on manual swipe (correct behavior)
This release fixes critical issues with rotation behavior and user interaction:
ROTATION LOGIC FIXES:
- Rotation now properly pauses when user interacts with any URL
- Added manualNavigationMode check to rotation logic
- User interaction (touch, scroll, type) sets manualNavigationMode=true
- "Return to Rotation" button resets manualNavigationMode=false
- Prevents unwanted auto-rotation when user is actively using content
USER INTERACTION IMPROVEMENTS:
- markActivity() now sets manualNavigationMode=true for actual user interaction
- Differentiates between content interaction and prompt responses
- Time extensions continue to be honored during user interaction
- Inactivity prompt closes when user interacts with content
EDGE CASE HANDLING:
- Fixed return to rotation when home URL exists but all URLs have 0 time
- Return to home URL still works even with no rotation configured
- Inactivity prompt properly fires on home URL in no-rotation scenario
PASSWORD/LOCKOUT PRECEDENCE:
- Verified password prompt blocks all interaction on boot
- Lockout properly blocks rotation and prompts
- System resume, screen lock trigger password protection correctly
Technical changes:
- Line 3913: Added !manualNavigationMode check to rotation condition
- Lines 3647-3651: Set manualNavigationMode on user content interaction
- Line 4086-4090: Enhanced returnToHome() documentation for no-rotation case
- Updated VERSION constants and release notes
All existing functionality preserved including:
- Time extensions honored
- Manual tab switching clears extensions
- Prompt only appears on interacted sites
- Password takes precedence on boot/resume/lockout
Password Protection Enhancements:
- Password prompt now appears on bootup if lockout enabled
- Password prompt on system suspend/resume (via powerMonitor)
- Password prompt on screen lock events
- Ensures kiosk is always protected when password feature is enabled
Critical Inactivity Popup Fix:
- Fixed popup not appearing on rotation sites (major UX bug)
- Auto-rotation now preserves userInteractedWithCurrentSite flag
- Added isAutoRotation parameter to attachView()
- Only resets interaction flag on manual navigation
- Inactivity check moved BEFORE rotation check
- Rotation pauses while inactivity prompt is displayed
Lockout Timer Independence:
- Lockout timer now uses lastLockoutCheck instead of lastUserInteraction
- Responding to inactivity prompts no longer resets lockout timer
- Added resetLockoutTimer parameter to markActivity()
- Only actual user interactions (touches, swipes, keyboard) reset lockout
- Ensures lockout fires even if user keeps responding to prompts
Other Fixes:
- Fixed script bailing on manual electron update (graceful error handling)
- Changed "Nuclear reinstall" to "Reinstall complete! System is fresh."
- Moved Session Lockout from Sites menu to Core Settings menu (option 7)
All markActivity() calls updated with proper resetLockoutTimer flags
Critical fix:
- Rotation now pauses completely when session is locked
- Previously rotation would continue running in background while lockout screen displayed
- This caused the lockout screen to disappear after ~1 minute when rotation occurred
- Added sessionLocked check to rotation logic (line 3888)
- Added sessionLocked check to inactivity prompt logic (line 3836)
- Password lockout screen now stays visible until correct password is entered
Major improvements:
- Moved Session Lockout configuration from Sites menu to Core Settings menu
- Now accessible as option 7 in Core Settings for easier access
- Removed from Sites menu to reduce clutter
- Fixed critical inactivity popup bug on rotation sites
- Popup now appears on ALL sites where user has interacted
- Previously only worked on manual (0-timed) sites
- Inactivity check now happens BEFORE rotation check
- Prevents sites from rotating away before popup can appear
- Rotation pauses while inactivity prompt is displayed
Version bump: v0.9.8 → v0.9.9
This commit addresses multiple user-reported issues:
1. UI Improvements:
- Replace box-drawing characters (╔ ╗) with simple equals signs (=)
- Updated addon status display header
- Updated timer logging format
- Updated Squeezelite audio fix header
2. Performance Optimization:
- Removed redundant systemctl calls from show_addon_status()
- Addon status now uses fast file-based checks only
- Eliminates slow service status queries that delayed menu display
3. Password Lock Feature Visibility:
- Added session lockout configuration to initial setup flow
- Users can now set password protection during first-time configuration
- Previously only available in edit menu after setup
4. Return to Rotation (RTR) Popup Fix:
- Fixed RTR popup not appearing on rotation sites
- Removed requirement for Home URL to be configured
- Inactivity prompt now works with or without Home URL
- When typing on rotation site, popup appears after inactivity timeout
- "Return to Rotation" works correctly in both configurations
Bug fixes ensure expected behavior across all use cases.
This update provides a unified, predictable inactivity prompt behavior
regardless of how the user navigated to a page.
Changes:
- Added userInteractedWithCurrentSite flag to track user touch on each site
- Modified markActivity() to set flag when user interacts (tap, swipe, scroll)
- Modified attachView() to clear flag when site changes
- Updated inactivity check to use interaction flag instead of navigation mode
New Behavior (Consistent UX):
✅ Scenario A: Auto-rotation to recipe → user taps → prompt after timeout
- Site auto-rotates to recipe page
- User taps screen to scroll/interact
- userInteractedWithCurrentSite = true
- After 2 min idle → prompt appears
- User can extend time or return to rotation
✅ Scenario B: User swiping through photos every 30 seconds
- Each swipe resets inactivity timer via markActivity()
- No prompt appears (user is actively interacting)
- Prompt only appears after they stop swiping for timeout period
✅ Scenario C: Sites auto-rotating with no user interaction
- userInteractedWithCurrentSite = false on each site
- No prompt appears
- Rotation continues normally
Technical Details:
- Single-finger swipes (in-page content): Reset timer via markActivity()
- Two-finger swipes (tab navigation): Also sets manualNavigationMode
- Both types of interaction trigger the flag
- Flag cleared on every site change (auto or manual)
- If manual swipe, markActivity() re-sets it immediately
Use Cases:
- Recipe viewing: User can interact with page, get timeout prompt, extend time
- Photo browsing: Continuous swiping prevents timeout
- Digital signage: No interaction = no prompt = smooth rotation
- MagicMirror modules: Single-finger swipes keep resetting timer
This provides the consistent UX requested where ANY user interaction
on ANY site enables the inactivity prompt logic.
Changed the inactivity prompt behavior based on user feedback:
Changes:
- Renamed button from "🏠 Return to home now" to "🔄 Return to rotation"
- Reverted inactivity check to work on ALL pages (including home screen)
- Updated returnToHome() function comments to clarify rotation behavior
Behavior:
- Inactivity prompt now appears on home screen AND other pages
- If user is viewing a recipe (or any page), they can extend time
- Clicking "Return to Rotation":
* If NOT on home page: goes to home page first, then starts rotation
* If on home page: just starts the rotation
- This allows users to get "30 extra minutes" before touching the screen
with dirty hands (e.g., when following a recipe)
Use Case:
User navigates to a recipe on menu app, inactivity prompt appears,
they can click "30 more minutes" to read the recipe without any
further screen interaction needed.
This release adds password-protected session lockout and fixes several
reported bugs from v0.9.9.1 testing.
New Features:
- Password-protected session lockout
* Configurable lockout password (separate from sudo user)
* Auto-lock after configurable timeout (default 30 minutes)
* Black lockout screen with password prompt
* Session unlocks with correct password
* New "Configure Session Lockout" menu option
Bug Fixes:
- Fixed return-to-home popup appearing on home screen
* Popup now only appears on timed sites
* Home screen no longer triggers inactivity prompt
* Updated logic: only check inactivity when NOT on home page
- Fixed site edit menu flow
* Edit site URL function now returns properly to menu
* Added explicit return statement to prevent bail
* Added blank line for better UX
Version Updates:
- Updated to semantic versioning: v0.9.8
- Updated all version references in header and script
- Updated changelog with new features and fixes
Technical Changes:
- Added LOCKOUT_ENABLED, LOCKOUT_PASSWORD, LOCKOUT_TIMEOUT config vars
- Created lockout.html template with black screen and password entry
- Added lockout state tracking in main.js
- Implemented showLockout() and hideLockout() functions
- Added unlock-session IPC handler
- Integrated lockout check into master timer
- Updated save_config() to persist lockout settings
- Updated loadConfig() to load lockout settings
Addresses user feedback from testing:
- Time extensions now work correctly
- Return to home popup fixed
- Site edit menu no longer bails