debug.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/bash
  2. echo "This script helps debug audio and USB KVM devices."
  3. echo "Make sure you have the necessary permissions to access audio and USB devices."
  4. echo ""
  5. echo "------------------"
  6. echo "Checking for required tools..."
  7. # Check if 'arecord' (ALSA tool) is installed
  8. if ! command -v arecord &> /dev/null; then
  9. echo "Warning: 'arecord' (ALSA audio recorder) is not installed. Please install it for audio debugging."
  10. else
  11. echo "'arecord' is installed."
  12. fi
  13. # Check if 'v4l2-ctl' (Video4Linux2 control tool) is installed
  14. if ! command -v v4l2-ctl &> /dev/null; then
  15. echo "Warning: 'v4l2-ctl' (Video4Linux2 control tool) is not installed. Please install it for USB video device debugging."
  16. else
  17. echo "'v4l2-ctl' is installed."
  18. fi
  19. # List all audio devices
  20. echo "------------------"
  21. echo "Listing audio devices"
  22. sudo ./dezukvmd -mode=debug -tool=audio-devices
  23. # List all USB KVM devices
  24. echo "------------------"
  25. echo "Listing USB KVM devices"
  26. sudo ./dezukvmd -mode=debug -tool=list-usbkvm
  27. echo "------------------"
  28. echo "The finalized KVM device group is listed below: "
  29. sudo ./dezukvmd -mode=debug -tool=list-usbkvm-json