If you ever wanted to install an open source surveillance application on your system, then you can try to use ZoneMinder. It's an open source application which is running on web server to capture, analysis, recording and monitoring of any CCTV or security cameras attached to a Linux based machine.
You can use single or multiple cameras on your system, including a commercial CCTV devices. It is suitable for use as a DIY (Do It Yourself) home video security system and for commercial or professional video security and surveillance. It can also be integrated into a home automation system via X.10 or other protocols.
I think i will try this with my webcam and see if it works.