4f2435ca350e6b0aff95eadc0f9d2b59721b6a82
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.
Languages
Shell
94.1%
JavaScript
4.7%
HTML
0.9%
CSS
0.3%