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.

I have two USB printers. They are assigned a path depending on the order of turning them on. The first one is /deb/usb/lp0 and the second one /deb/usb/lp1. However, I sometimes echo to these printers directly and need to know which one is lp0 and which one is lp1. Can I assign a fixed path in some way?

Thanks!

share|improve this question
add comment

1 Answer 1

up vote 4 down vote accepted
+25

You can write udev-rules to assign different names to the printer, depending on their serial numbers.

See http://www.reactivated.net/writing_udev_rules.html#example-printer for an example of a udev printer rule.

share|improve this answer
1  
please note that in Ubuntu (at least 10.04 and later) use udevadm info instead of udevinfo. So to check up on your lp0 printer you'd use the command udevadm info --attribute-walk --name /dev/usb/lp0 (note that it generates tons of data) –  Guss Apr 15 '11 at 17:58
add comment

Your Answer

 
discard

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