Simple script to turn off screensaver upon motion detection through webcam, uses the excellent motion tool.
sudo apt-get install motion- Edit
/etc/default/motionand changestart_motion_deamontoyes - Replace
/etc/init.d/motionwith modifiedmotion.init - Edit
/etc/init.d/motionand replaceUSER=bobwith 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.confwith the sample included in this repo - Put
disable-screensaversomewhere 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