Created
February 12, 2025 05:05
-
-
Save ssokolow/01e8b9b6029f1a4c73b53b48aa5c770a to your computer and use it in GitHub Desktop.
Script to trigger a KVM switch on Linux by blinking Scroll Lock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Toggle the KVM switch programmatically by toggling the Scroll Lock LED | |
# Source: https://askubuntu.com/a/546989/23552 | |
SLEEP=0.5 | |
LEDNAME="Scroll Lock" | |
echo "Switching..." | |
xset led named "$LEDNAME" | |
sleep $SLEEP | |
xset -led named "$LEDNAME" | |
sleep $SLEEP | |
xset led named "$LEDNAME" | |
sleep $SLEEP | |
xset -led named "$LEDNAME" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment