feat: improve Linux bootable USB stability and user experience

- Enhanced Live USB environment detection and support
- Added troubleshooting guide (TROUBLESHOOTING.md)
- Added installation test script (test-installation.sh)
- Improved error handling in PowerShell scripts
- Better network retry logic for downloads
- Enhanced desktop integration for Live environments
- Added detailed improvements summary (IMPROVEMENTS_SUMMARY.md)
- Updated README with troubleshooting links

Key improvements:
1. Auto-detection of Live USB environment (boot=casper)
2. Additional dependency installation for Live environments
3. Network download retry mechanism (3 attempts)
4. Smart browser opening with fallback instructions
5. Comprehensive installation validation script
6. Detailed fault diagnosis and recovery guide
This commit is contained in:
dongsheng123132
2026-03-16 19:59:58 +08:00
parent a93e9161dd
commit 5813e384af
7 changed files with 736 additions and 8 deletions

View File

@@ -18,14 +18,22 @@ export OPENCLAW_CONFIG_PATH="$DATA_DIR/.openclaw/openclaw.json"
# --- Sanity checks ---
if [[ ! -x "$NODE_BIN" ]]; then
echo "[ERROR] Node.js not found at $NODE_BIN"
echo "Please run setup-openclaw.sh first."
echo ""
echo "Possible solutions:"
echo "1. Run setup script: sudo bash /opt/u-claw/setup-openclaw.sh"
echo "2. If on Live USB, the script might be at:"
echo " /media/ubuntu/u-claw-linux/setup-openclaw.sh"
echo ""
read -rp "Press Enter to exit..."
exit 1
fi
if [[ ! -d "$CORE_DIR/node_modules/openclaw" ]]; then
echo "[ERROR] OpenClaw not installed in $CORE_DIR"
echo "Please run setup-openclaw.sh first."
echo ""
echo "Please run the setup script first:"
echo "sudo bash /opt/u-claw/setup-openclaw.sh"
echo ""
read -rp "Press Enter to exit..."
exit 1
fi
@@ -73,8 +81,16 @@ fi
echo "Opening browser at http://localhost:$PORT ..."
# Open browser after a short delay
(sleep 3 && xdg-open "http://localhost:$PORT" 2>/dev/null) &
# Open browser after a short delay - 检查是否在图形环境中
if [[ -n "$DISPLAY" ]] && command -v xdg-open >/dev/null 2>&1; then
(sleep 3 && xdg-open "http://localhost:$PORT" 2>/dev/null) &
echo " Browser will open automatically."
else
echo ""
echo "[INFO] No graphical environment detected or xdg-open not available."
echo " Please open http://localhost:$PORT in your browser manually."
echo ""
fi
"$NODE_BIN" "$OPENCLAW_ENTRY" gateway run \
--allow-unconfigured \