VSIDO Community

VSIDO Support => Scripts => Scripts and How To's => Code Challenges => Topic started by: PackRat on April 22, 2017, 09:29:12 PM

Title: Properly formatted script to toggle on/off integrated laptop webcam
Post by: PackRat on April 22, 2017, 09:29:12 PM
I seldom use the webcam on my laptop. Privacy issues aside, it would be nice to have a properly formatted bash script that will tooggle the integrated webcam off/on and save myself some memory and power use.

This method works just fine (http://www.hecticgeek.com/2012/10/how-to-disable-your-webcam-in-ubuntu/) so it's easy to blacklist the module at boot and then use the command:

sudo modprobe uvcvideo

to load the module if I want to use the webcam.

But my inner script-kiddee says there has to be an elegant way to do this (surprisingly, I didn't find one online - but I didn't specifically check the Arch Forum either).

I could probably hack something together but that would fail the elegant test.

So a script that checks and then  loads/unloads the uvcvideo module would be a handy item.