Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

With my webcam plugged in at boot, it always defaults to /dev/video0 and my TV-card defaults to /dev/video1. Tvtime defaults is using /dev/video0. I know that I can run Tvtime with the --device option and force it to switch to /dev/video1, but if i happen to have my webcam unplugged when I boot, the TV-card becomes video0.

This is very inconvenient, as I have tried to write a "udev" rule, to make the webcam video5 but have not been able to get it to work.

This is the rule I tried to use:

SUBSYSTEM=="video4linux", BUS=="usb", SYSFS{idvendor}=="046d", SYSFS{idProduct}=="0807", NAME="video5"

I saved this in /etc/udev/rules.d/75-mystuff.rules, and also tried with a lower number, 15-mystuff.rules, which didn't work.

I am using Ubuntu 10.04 64bit. Any help to resolve this will be very much appreciated.

Thanks

share|improve this question

closed as too localized by Luis Alvarado Mar 14 '13 at 17:07

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers 2

Jan Claesys idea is likely more practical, but...

SYSFS syntax is deprecated or going to be deprecated. You should use ATTRS. The rule should look like:

SUBSYSTEM=="video4linux", BUS=="usb", ATTRS{vendor}=="0x046d", ATTRS{device}=="0x0807", NAME="video5"

Note the 0x to denote a hexadecimal value.

I can't test the rule on my end, but I expect it to work.

share|improve this answer

If using the --device option is not really a problem, you can probably use the link to the device under /dev/v4l/by-id/ instead. I think that one should always be the same...

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.