Author Topic: Properly formatted script to toggle on/off integrated laptop webcam  (Read 436 times)

PackRat

  • Posts: 1888
    • View Profile
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 so it's easy to blacklist the module at boot and then use the command:

Code: [Select]
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.
I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo