Using the Tesco VGA Webcam in Skype with Ubuntu 10.04

This is a very specific post about using the £8.97 VGA webcam from Tesco with Ubuntu 10.04, namely with Skype. These instructions might work with other webcams and/or other linux distros, but I have not tested this personally. If this does/doesn’t work for your webcam/distro combination then please leave a comment describing your experiences.

Okay, lets get on with it. To make sure you’re using the same webcam as me, type lsusb into the terminal. You should get something like this:

Bus 004 Device 002: ID 093a:2620 Pixart Imaging, Inc.
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 1c6b:a222 Philips & Lite-ON Digital Solutions Corporation
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

If you have a line like the one at the top (in bold) then we’re talking about the same webcam. Specifically, make sure the ID 093a:2620 is the same.

Next, make sure you have the correct Video4Linux drivers installed. To do this, type the following in your terminal:

sudo apt-get install libv4l-0

You will either be told that you already have the newest version, or the drivers will be installed.

Next, make sure your webcam is working. For this you can use a program like cheese. You will probably need to install this too:

sudo apt-get install cheese

Once it’s installed, simply run cheese from the terminal or from a run prompt (Alt + F2), or find the icon in Applications -> Sound & Video -> Cheese Webcam Booth. A light should turn on just below the lens and you should see a picture of yourself. If the program crashes or fails to load, try restarting your computer but leave the webcam plugged in. Sometimes linux does funny things if you plug in the webcam after it has already started up.

If that’s all working then we are ready to get Skype going. For this to work, we need to preload the Video4Linux drivers. Open a terminal and type the following:

64-bit users:
LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so /usr/bin/skype

32-bit users:
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so /usr/bin/skype

(if you’re not sure if you’re a 64-bit user or a 32-bit user, type “uname -m” into a prompt. x86_64 means 64-bit. Anything else is 32-bit).

This should launch Skype with the library preloaded. To see if it worked, go to Options (Ctrl + O), select video devices from the list of icons on the left and click on the test button in the middle of the black box. The light on your webcam should turn on again and you should, after a second or two, see yourself. If you can, then the webcam should now work for you in Skype. But you don’t want to have to type all that garbage into the terminal every time you want to run Skype, so lets write a script to do it for us.

From a terminal, type the following:

sudo gedit /usr/local/bin/skype

And write the following code to the file:

64-bit users:

!/bin/bash

LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so /usr/bin/skype

32-bit users:

!/bin/bash

LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so /usr/bin/skype

(You should only be writing two lines to the file, depending on if you’re a 32-bit or 64-bit user. Don’t include the ??-bit users lines in the file.) Once this is done, save and exit. Finally, we need to make the new script executable:

sudo chmod +x /usr/local/bin/skype

And that’s it. Run Skype like you normally would. It should now be working with your webcam.

Leave a Reply

Your email address will not be published. Required fields are marked *