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.

Sometimes when I start the system my web camera is set on /dev/video0, and sometimes it's on /dev/video1 and the TVtuner is on /dev/video0.
I'd like to set it consistently, that one device is always on /dev/video0 and other /dev/video1, not that they interchange if I disconnect the USB or randomly on system start.

share|improve this question
add comment

1 Answer 1

You need to create a persistent udev rule, in /etc/udev/

See /lib/udev/rules.d for help on how to configure the specific rule.

I am not sure how the rule should exactly look like, however it should be similar to these network rules:

# PCI device 0x8086:0x1242 (iwlagn)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:12:ab:52:44:36",
  ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

which says that if the hardware address of the device is 00:12:ab:52:44:36, then it should use the name wlan0.

UPDATE: See http://reactivated.net/writing_udev_rules.html and http://hackaday.com/2009/09/18/how-to-write-udev-rules/ for instructions.

share|improve this answer
    
Is there somewhere a comprehensive manual for this? –  chmi Nov 5 '11 at 23:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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