Created
January 2, 2020 21:16
-
-
Save Thann/1f3bd72dd43e22a4fd5af5e95b40e8f9 to your computer and use it in GitHub Desktop.
Lock computer on USB remove
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
# Note: use following to determine "ID_MODEL" and replace "Micromax_A74" with it | |
# udevadm monitor --environment --udev | |
cat << EOF | sudo tee /etc/udev/rules.d/busKill.rules | |
ACTION=="remove", SUBSYSTEM=="usb", ENV{ID_MODEL}=="Micromax_A74", RUN+="DISPLAY=:0 xscreensaver-command -lock" | |
EOF | |
sudo udevadm control --reload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment