This directory contains utility scripts for development, testing, and system configuration.
Purpose: Set up X11 display permissions and test screenshot functionality
Usage:
bash scripts/fix_x11_and_test.shWhat it does:
- Sets up X11 display authorization using xhost
- Checks for .Xauthority file
- Verifies X11 display accessibility
- Runs the real screenshot integration test
- Reports success or failure with troubleshooting tips
When to use:
- When screenshot tests are failing due to X11 permission issues
- After switching from Wayland to X11 session
- When running in remote/SSH sessions
Purpose: Fix broken gnome-screenshot installation
Usage:
bash scripts/fix_gnome_screenshot.shWhat it does:
- Removes snap version of gnome-screenshot (if exists)
- Updates apt package list
- Reinstalls gnome-screenshot from apt
- Tests the installation
- Provides troubleshooting guidance if issues persist
When to use:
- When gnome-screenshot has library conflicts
- After seeing "symbol lookup error" from gnome-screenshot
- When switching between snap and apt packages
When adding new scripts to this directory:
-
Make them executable:
chmod +x scripts/your_script.sh
-
Add shebang: Start with
#!/bin/bash -
Add documentation:
- Purpose comment at the top
- Usage instructions
- Example output
-
Use absolute paths when referencing backend directory:
cd /home/rodrigo/agentic/backend source venv/bin/activate
-
Provide clear output:
- Use echo statements to show progress
- Add separators for readability
- Show success/failure clearly
-
Handle errors gracefully:
command || { echo "Error: command failed"; exit 1; }
-
Update this README with script documentation
- Idempotent: Can be run multiple times safely
- Informative: Clear output about what's happening
- Reversible: Document how to undo changes (if applicable)
- Tested: Test on a clean environment before committing
- Cross-platform aware: Check for platform-specific commands
#!/bin/bash
# Script Name: do_something.sh
# Purpose: Brief description of what this script does
# Usage: bash scripts/do_something.sh [args]
set -e # Exit on error
echo "=================================================="
echo "Script Name - Brief Description"
echo "=================================================="
# Check prerequisites
if ! command -v required_command &> /dev/null; then
echo "Error: required_command not found"
exit 1
fi
# Main logic
echo "Step 1: Doing something..."
# commands here
echo "Step 2: Doing something else..."
# more commands
echo ""
echo "=================================================="
echo "✓ Script completed successfully"
echo "=================================================="Last updated: 2025-10-11