Simple script to turn off screensaver upon motion detection through webcam, uses the excellent motion tool.
sudo apt-get install motion
- Edit
/etc/default/motion
and changestart_motion_deamon
toyes
- Replace
/etc/init.d/motion
with modifiedmotion.init
- Edit
/etc/init.d/motion
and replaceUSER=bob
with the user who logged into X (the motion deamon needs to run as the same user so it has permissions to stop the screensaver) - Update
/etc/motion/motion.conf
with the sample included in this repo - Put
disable-screensaver
somewhere sensible and update the path to it in/etc/motion/motion.conf
sudo service start motion
- Create dedicated project that can run along side motion so it doesn't require hacking a bunch of system files
- Figure out how run motion as a dedicated user instead of the currently logged in user
- Add a start screensaver script and update config so when motion event ends, the screensaver will start again
Apache License, Version 2.0