I have some trouble with running script from udev rule. It works normal if I will run it from terminal, but one command doesn't work when udev rule run this script.
ACTION=="remove", RUN+="/bin/bash -c '/usr/bin/sblock.sh >> /home/username/udev_test_log.txt'"
#!/bin/bash echo Hello, its script from udev udev_test_log.txt # this line wors normal xdg-screensaver lock # but screen not block
I expect, that my system will blocks every time I remove usb-flash (I have planned to add some properties of my usb-drive later). But after removing flash I have only line in file
System -- kubuntu 16.04