I have a printer HP LaserJet 1020
installed locally (USB).
In my environment, I am having to sometimes use another printers of the same type/model
on the same machine (i.e. just another HP LaserJet 1020
). So printer driver would be 100% the same.
but if I just unplug the first HP LaserJet 1020
and plug another HP LaserJet 1020
(to the same USB port) it wouldn't print.
I am having to either install it as separate printer or modify existing printer to use another connection.
I understand this is rather a "feature" allowing to use multiple printers of the same type simultenously. But I really need to be able to use one connection for the same printer model.
So I could plug the same printers without re configuring them each time I want to use.
I already looked at all possible settings in cupsd.conf
and printers.conf
and wasn't able to find appropriate setting to achieve this.
Alright, I found out that it's not possible normally. Because every DeviceURI must contain serial number of the printer. You can't just remove the serial number part from DeviceURI
here you can read official answer to the question: http://comments.gmane.org/gmane.comp.printing.cups.general/29486
But I couldn't find any such add-ons.
Here are the possible solutions from me:
Solution 1
You can create your own backend: http://en.opensuse.org/SDB:Using_Your_Own_Backends_to_Print_with_CUPS#A_careless_backend_for_a_single_USB_printer
however this didn't work for me..
Solution 2
Use UDEV rules. So whenever printers connects you would rewrite the printers.conf and the DeviceURI to the newly connected one. This worked for me, but wasn't reliable.
Solution 3 You can try to write your own addon to CUPS. f you are a programmer http://cups.org/documentation.php/api-cups.html
I ran in the same problem and found this post useful, this is the solution I created for my problem, hope it helps.
It basically uses this one liner to get the wanted printer and update CUPS configuration.