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