Created
November 3, 2015 17:37
-
-
Save andresbott/6e48d4f2bfb70767319d to your computer and use it in GitHub Desktop.
64bit GNU/Linux and Webcams (Logitech Quickcam Express)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copied from here: https://www.martineve.com/2011/09/25/64bit-gnulinux-and-webcams-logitech-quickcam-express/ | |
``` | |
I've just been playing around with my webcam, which I haven't hooked up in ages, and was unable to get it working under my 64bit Fedora installation. Having done a bit of reading, and having found that some applications can use the camera, I worked out the solution. | |
32bit applications need to have the 32bit library put into their LD_PRELOAD environment variable. | |
This will work only if your camera is being correctly detected, but doesn't seem to work in certain apps. To check, run dmesg and look for the following output: | |
[ 2.878055] usb 2-4: New USB device found, idVendor=046d, idProduct=0928 | |
[ 2.878261] usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=0 | |
[ 2.878458] usb 2-4: Product: Camera | |
[ 2.878649] usb 2-4: Manufacturer: | |
I tried doing this via .bashrc originally, but the problem was that 64bit applications then continually churned out garbage. The eventual solution was as follows: | |
For each application that uses a 32bit component for which you want webcam access (Firefox/Flash, Skype) create a file called program-cam-fix in /usr/bin/. | |
Here's my firefox-cam-fix file: | |
#! /bin/sh | |
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so firefox $1 | |
My skype-cam-fix file doesn't have the $1 at the end as the launcher doesn't pass any arguments. | |
Next, modify the files /usr/share/applications/mozilla-firefox.desktop and /usr/share/applications/skype.desktop so that the exec lines point to your new scripts (/usr/bin/skype-cam-fix or /usr/bin/firefox-cam-fix). You'll need to use sudo. | |
Now, when you start skype, or firefox, you should be able to use the webcam. | |
URL in ubuntu are other | |
LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so skype | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment