Posts Tagged ‘Linux’

Logitech QuickCam Messenger on Ubuntu 9.04 (Jaunty)

14. June 2009

Thanks to everyone helping me out, making this instruction better. Once again, this shall help you getting a Logitech QuickCam Messenger (ID: 046d:08f0) running on Linux Ubuntu 9.04 (Jaunty) using Skype. Please don’t waste any time posting instructions for other webcams. We don’t care!

To make sure, you got the right cam, plug it into your computer.
Check if your camera matches my ID by running:

lsusb | grep QuickCam

There should be something like this:

Bus 008 Device 003: ID 046d:08f0 Logitech, Inc. QuickCam Messenger

If your ID matches, please continue, otherwise you might be lucky and can start installing Gstfakevideo straight away. However this “Howto” was only tested for a QuickCam Messenger with the ID above. For other IDs please take a look here: https://wiki.ubuntu.com/SkypeWebCams

All you need before we start:

sudo apt-get install libgstreamer0.10-dev pkg-config subversion linux-headers-$(uname -r) build-essential

Remove the old quickcam_messenger module because it will not deliver the correct colors for our cam. If you do find a solution for this problem, please leave a comment! Thanks. Anyway removing the installed module:

sudo rmmod quickcam_messenger

To make sure it is not going to be loaded again we add the following line at the end of /etc/modprobe.d/blacklist.conf

blacklist quickcam_messenger

Download the new qcmessener module:

wget http://home.mag.cx/messenger/source/qc-usb-messenger-1.8.tar.gz
tar xzvf qc-usb-messenger-1.8.tar.gz
cd qc-usb-messenger-1.8

Apply this patch:

wget -v http://kuhrti.de/files/qc_2.6.28_patch.txt
patch -p0 < qc_2.6.28_patch.txt

Continue installing:

make
sudo make install
sudo insmod ./qcmessenger.ko

Ignore the “Kernel configuration is invalid.” errors.

Give it a test:

sudo qcset /dev/video0 compat=dblbuf
sudo gst-launch-0.10 v4lsrc device=/dev/video0 ! ffmpegcolorspace ! ximagesink

If every thing works go on and install Gstfakevideo:

svn checkout http://gstfakevideo.googlecode.com/svn/trunk/ gstfakevideo
cd gstfakevideo
make
sudo make install

Create a new file (i.e. in your home directory) called skype.sh and add these lines:

#!/bin/sh
gstfakevideo v4lsrc device=/dev/video1 ! ffmpegcolorspace

And run:

chmod a+x skype.sh

Now reload the module

sudo rmmod qcmessenger
sudo modprobe qcmessenger compatible=6 video_nr=1

Info: run

sudo modinfo qcmessenger

to view more options.

Create a new file /etc/modprobe.d/qcmessenger.conf and add:

options qcmessenger compatible=6 video_nr=1

This makes sure, that your webcam will always be /dev/video1 (as /dev/vidoe0 is needed for gstfakevideo) and uses “dblbuf” (correct colors).

Add your account to the “video” group:

sudo usermod -a -G video <YOUR USER NAME>

Finally fire up Skype by running skype.sh. That’s it!

Please leave a comment if you got some problems or want to give me feedback.

Here is a test image.

SSH: Connection closed.

13. June 2009

Wer viel mit SSH arbeitet, dem mag vielleicht aufgefallen sein, dass an manchen Standorten eine SSH Verbindung zu einem Server, nach einer gewissen inaktiven Zeit, einfach unterbrochen wird. Ursache dürfte in den meisten Fällen der örtliche Router sein, der nach X Sekunden die Verbindung einfriert.
Um dem entgegenzuwirken müssen wir einfach weiter Traffic senden. Dies kann auf zwei simple Arten geschehen.

Serverseitig
In der /etc/ssh/sshd_config folgende Zeile hinzufügen:

ClientAliveInterval 90

Restart des SSH Dienstes nicht vergessen.

Clientseitig
In der /etc/ssh/ssh_config folgende Zeile hinzufügen:

ServerAliveInterval 90

Persönlich favorisiere ich die serverseitige Variante, da das Verbindungsproblem sowohl client- also auch standortunabhängig heben lässt. Wem der Zugriff auf den Server verwehrt wird, dem bleibt halt nur die clientseitige Version.

Logitech QuickCam Messenger on Linux using Skype

9. November 2008

Update: Ubuntu 9.04 Users klick here…

I am surprised how many people visit my site because their looking for a solution to get a Logitech QuickCam Messenger (046d:08f0) running on Linux using Skype

Since my last post seems to be a bit buggy for newer kernels, I updated my system to Debian (Lenny, 2.6.26-1-686) and gave it try.

All you need before we start:

apt-get install libgstreamer0.10-dev pkg-config subversion linux-headers-$(uname -r) build-essential

Plug in your webcam.
Remove the old quickcam_messenger module:

rmmod quickcam_messenger

To make sure it is not going to be loaded again we add

blacklist quickcam_messenger

at the end of /etc/modprobe.d/blacklist

Download the new qcmessener module:

wget http://home.mag.cx/messenger/source/qc-usb-messenger-1.8.tar.gz
tar xzvf qc-usb-messenger-1.8.tar.gz

Now if you are running kernel 2.6.26 or newer , it is necessary to patch some files.

wget http://bugs.gentoo.org/attachment.cgi?id=167504 -O patch.txt
patch -p0 < patch.txt

Continue installing:

cd qc-usb-messenger-1.8
make
make install
insmod ./qcmessenger.ko

Remember to be root when running make install

Give it a test:

qcset /dev/video0 compat=dblbuf
gst-launch-0.10 v4lsrc device=/dev/video0 ! ffmpegcolorspace ! ximagesink

If every thing works go on and install Gstfakevideo:

svn checkout http://gstfakevideo.googlecode.com/svn/trunk/ gstfakevideo
cd gstfakevideo
make
make install

Create a new file called skype.sh and add these lines:

#!/bin/sh
gstfakevideo v4lsrc device=/dev/video1 ! ffmpegcolorspace

And run:

chmod +x skype.sh

Now reload the module

rmmod qcmessenger
modprobe qcmessenger compatible=6 video_nr=1

Create a new file /etc/modprobe.d/qcmessenger and add:

options qcmessenger compatible=6 video_nr=1

This makes sure, that your webcam will always be /dev/video1 and uses “dblbuf”.

Finally fire up Skype by running skype.sh. That’s it!

Please leave a comment if you got some problems or want to give me feedback.

Update:
Here is a test image.

Wake On LAN

18. October 2008

You got Debian, a 3Com Corporation 3c905C-TX/TX-M [Tornado] (rev 74) Ethernet controller and a PC which needs to be started via LAN and it is not working?

I assume you change the BIOS settings already. All you need to do now, is to tell you Debian not to turn off your Ethernet controller while shutting down your system.

Create a new file /etc/modprobe.d/3c59x and add following line:

options 3c59x enable_wol=1

and run

update-initramfs -t -c -k all

Now you are done.
I use wakeonlan to start my computers.

Linux ist nicht Windows

17. October 2008

Wer ihn noch nicht kennt, sollte den folgenden Artikel unbedingt gelesen haben:

Linux ist nicht Windows

Im Kern des Arikels geht es darum, dass Linux eine Alternative, aber keinesfalls einen vollständigen Ersatz für Windows bietet. Desweitern geht der Autor auf die unterschiedelichen Ziele beider Systeme ein und versucht zu verdeutlichen, dass Linux eben nicht Windows ist und auch nicht so werden will.

Meine persönliche Lieblingsstelle ist folgender Absatz:

Der ‘typische’ Linux-Nutzer ist ein Hobbyist: Er benutzt Computer, weil Computer Spaß machen, Programmierung Spaß macht, Hacking Spaß macht. Und Linux ist ein weitaus besseres Betriebssystem für einen Hobbyhacker: Er kann es nach Belieben bis zur untersten Ebene auseinander nehmen und wieder zusammensetzen.

Wer also Linux Nutzer ist, um von Windows wegzukommen, aber selber gar nicht daran interessiert ist einen eigenen Kernel zu backen, weil ihm das zu “nerdig” erscheint, der ist mit Linux eigentlich mit dem falschen Betriebssystem unterwegs und sollte laut Artikel lieber auf Mac wechseln.

Dateien rekursiv löschen

25. September 2008

Es kann vorkommen, dass ganze Verzeichnisse mit alten Backupdatein das Dateisystem unnötig aufblasen. Meinem Fall waren das Textdateien in From von index.php~. Die alle per Hand löschen? Auf gar keinen Fall:

find . -name *~ -exec rm -v {} \;

Dies eignet sich auch besonders gut, um die aus Windows stammende Thumbs.db aus Fotoalben zu löschen. Das würde dann so aussehen:

find . -name 'Thumbs.db' -exec rm -v {} \;

Wer über alte Subversion-Projekte stolpert und die .svn Ordner loswerden möchte, kann folgendes in seine Konsole eintippen:

find /projektverzeichnis -name .svn -type d -exec rm -rv {} \;

How you should use evdev for your Mouse

18. July 2008

If you are using a mouse with more than three buttons and a wheel on a Linux system, you probably heard about using evdev instead of the default mouse driver. Unfortunately, many of those tutorials on the net contain mistakes due to old parameters or manly by simply mixing up evdev and mouse options. However, it is quite easy to set it up.

If you want to use evdev just add (keep your Configured Mouse block) these lines to your xorg.conf

Section "InputDevice"
Identifier "MX518"
Driver "evdev"
Option "Device" "/dev/input/by-id/usb-Logitech_USB-PS.2_Optical_Mouse-event-mouse"
EndSection

And this line into ServerLayout:

InputDevice "MX518" "SendCoreEvents"

Just make sure you replace the device with the path to your mouse.
Otherwise you can run

find /dev/input/by-id/ -name "*event-mouse"

to get the right device. That’s it! Your done.

(more…)

QuickCam, Linux and Skype – it works!

27. April 2008

Update: Click here to go to a newer version of this article…

This weekend I successfully installed my Logitech QuickCam Messenger (046d:08f0) on my Debian box. In fact it worked out of the box with all kind of programs except for Skype. That was bad because Skype is my main video conference software and I don’t get the point of buying new hardware for Linux.
Anyway, this is the picture you get if you would have skyped me before:
quickcamThat is why I dragged some information together, which you can find all over the web but never on one single page, to fix that problem.

Lets start. On https://wiki.ubuntu.com/SkypeWebCams the Logitech QuickCam Messengerm (046d:08f0) is listed as a ‘Fiddle to Get Working’ webcam:

Logitech QuickCam Messenger (046d:08f0) – On 32-bit systems, works with “quickcam” driver and gstfakevideo.

Debian comes along with quickcam_messenger which has to be removed:

rmmod quickcam_messenger

You need:

apt-get install xawtv kdetv linux-headers-$(uname -r) subversion

And you are ready to go:

wget -v http://home.mag.cx/messenger/source/qc-usb-messenger-1.7.tar.gz
tar xzvf ./qc-usb-messenger-1.7.tar.gz
cd ./qc-usb-messenger-*
./quickcam.sh

If every thing worked well you should be able to get some pictures with camoramic or xawtv.
After that we load the module, move /dev/video0 to /dev/video1 because video0 is reserved for Gstfakevideo.

mv /dev/video0 /dev/video1

Better would be a new udev rule. Create a new line in /etc/udev/rules.d/99-perso.rules (if the file doesn’t exists, create it):

KERNEL=="video0", ATTR{name}=="QuickCam USB", NAME="video1"

Run

/etc/init.d/udev reload

and reconnect your Webcam.

Now we install Gstfakevideo:

apt-get install libgstreamer0.10-dev pkg-config
svn checkout http://gstfakevideo.googlecode.com/svn/trunk/ gstfakevideo
cd gstfakevideo
make
make install

Create a new file called skype.sh and add these lines:

#!/bin/sh
qcset /dev/video1 compat=dblbuf
gstfakevideo v4lsrc device=/dev/video1 ! ffmpegcolorspace

And run:

chmod +x skype.sh

Now fire up Skype by running skype.sh.

You shoud get somthing like this:
gstfakevideo
If not something went wrong. Leave a comment so I might be able to help you out.

Update:
After a few Kernel updates (>2.6.23) I had problems compiling the quickcam module:

qc-usb-messenger-1.7/qc-driver.c: In function ‘qc_int_init’:
qc-usb-messenger-1.7/qc-driver.c:850: warning: passing argument 6 of ‘usb_fill_int_urb’ from incompatible pointer type
qc-usb-messenger-1.7/qc-driver.c: In function ‘qc_isoc_start’:
qc-usb-messenger-1.7/qc-driver.c:2209: warning: assignment from incompatible pointer type
qc-usb-messenger-1.7/qc-driver.c:3649:1: error: unterminated #ifdef

I found a patch on Ubuntuforums.org witch you can download here:
Quickcam Patch

Save it (/usr/src/) und run

patch -p0 > qc-usb-messenger-17-for-2624patch.txt

Follow the instructions and enter the full path to qc-driver.c.
Now edit qc-driver.c and uncomment line 3484:

//hardware: VID_HARDWARE_QCAM_USB,

Run:

make clean && make all && make install

Install it

insmod quickcam.ko

Have fun :)

PS: The patch also works with 2.6.25