Commit Graph
8 Commits
Author SHA1 Message Date
Claude be26312ca9 Add quick fix script for talkkonnect issues
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.
2025-11-23 13:01:19 +00:00
Claude 9a1425b137 Fix talkkonnect status detection using systemd service file
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.
2025-11-23 01:03:04 +00:00
Claude f6f2202e32 Stop running talkkonnect before binary replacement
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.
2025-11-23 00:56:03 +00:00
Claude 387cbec099 Move binary installation inside sudo block to fix permission check
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.
2025-11-23 00:50:52 +00:00
Claude e6d0374538 Use kiosk home directory for talkkonnect build (fixes permission errors)
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
2025-11-22 23:50:15 +00:00
Claude d16ca7a408 Fix vendor directory permission denied error
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"
2025-11-22 23:39:37 +00:00
Claude d544c5a702 Fix talkkonnect x86_64 build failure with Opus patch
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.
2025-11-22 23:24:03 +00:00
Claude 8df3695f28 Add standalone intercom setup system (Mumble/Talkkonnect)
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
2025-11-22 22:06:04 +00:00