Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

For example I have "HP 1020 LaserJet" local USB printer successfully installed on a CUPS.

It uses one connection.

If I get another HP 1020 LaserJet printer it wouldn't print, I am having to modify the printer and change it's connection. Why?

How can I avoid this?

I know that it's illogical to use the same type printer on the same computer, but that's my environment.

How to make CUPS to use the same Connection for all printers of the same type, model, manufacturer etc.?

Thank you!!!

EDIT:

I have found out that it's not possible through the configs or any other standard ways.

The only way is to find a nice workaround.

share|improve this question
    
Unfortunately, I have no idea how to solve this, but here's what I suspect to be the problem: grep DeviceURI /etc/cups/printers.conf yields DeviceURI hp:/usb/HP_LaserJet_1020?serial=XXXXXXX. The serial probably is printer-specific (not model-specific); don't know if it works without... –  sr_ Feb 19 '12 at 10:33
    
right, and the serials are different per each printer. There is also an UUID which is also unique but I think they are not printer specific - just random. –  bakytn Feb 19 '12 at 10:59
    
I tried to omit serial parameter - no print :D –  bakytn Feb 20 '12 at 4:41
add comment

1 Answer 1

up vote 4 down vote accepted

The fix is in the UDEV rule.

Since it is not possible through standard ways.

You just create an UDEV rule which would detect printer adding and then run lpadmin -p PRINTERNAME -v CONNECTION?serial=

so printer would be automatically reconfigured to use another connection.

P.S: I would give 300 of points if someone gave me right direction. I hope I will get my 300 back now :D

share|improve this answer
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.