Category Archives: computing

How to turn off laptop webcam in Ubuntu

I have a Lenovo 3000 V100 laptop.

With Ubuntu 10.04 Lucid Lynx, I was able to turn off the integrated webcam (the led annoys me) by putting these lines in /etc/rc.local

echo 0 > /sys/bus/usb/devices/1-5/bConfigurationValue
echo "suspend" > /sys/bus/usb/devices/1-5/power/level

I don’t quite understand what they do, but they worked. For some reason I also don’t quite understand, after updating to Ubuntu 11.04 Natty Narwhal, they stopped working. However, adding this line to /etc/modprobe.d/blacklist.conf

blacklist gspca_m5602

seems to work (after a reboot). Apparently it prevents the loading of the kernel module containing the driver for the webcam. I used the lsmod command to find out that gspca_m5602 looks like the module related to the webcam.

Are there any other (less brute) ways to turn off the webcam?


Making recursive make verbose

Running recursive make (Makefiles that visit other directories and call make there recursively), if you want all the makes to be more verbose, define an environmental variable VERBOSE=1 on the shell (at least works with bash syntax, I am not sure of other shells) line calling make:

VERBOSE=1 make
make VERBOSE=1

Keeping ssh connection alive

Hotel’s firewall apparently drops inactive connections after a while, and I get that “connection reset by peer” message, and my ssh-connection is lost. An easy fix is:

ssh -o "ServerAliveInterval 300"

This makes some traffic every 300 seconds even if I’m not doing much on the computer, and keeps the connection alive.

SOCKS port forwarding with ssh

Fist open ssh-connection with -D, like:

ssh -D 1234

Then in Firefox, in Edit / Preferences / Advanced / Network / Settings, choose Manual proxy configuration, the Use this proxy server for all protocols has to be unchecked, in SOCKS Host put localhost and in Port 1234. Make sure that all the other lines are empty (well it’s ok if there is 0 on other Port lines).

Now you can browse as if you were browsing from This is handy if the people at host.somewhere do not provide a real proxy server.

(That 1234 above can be any number between 1024–49151.)