1825800 Members
2469 Online
109687 Solutions
New Discussion

Re: Printer Class...

 
SOLVED
Go to solution
Hazem Mahmoud_3
Respected Contributor

Printer Class...

I have decided to create a printer class for two of our printers. I've created the class, then added the two printers to the class without problems.
The only problem is that when printing to the class (ie: "lp -d "), it always goes to our backup printer. How can I define the primary printer as the first printer the class should try to print to, and then if that's not available to print to the second printer? A rabbit for the person who helps me out:) Thanks!

-Hazem Mahmoud
2 REPLIES 2
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Printer Class...

Assuming all printers in the class are enabled, idle, and accepting jobs, the jobs go to the first printer defined in the class. That is actually a good thing because it allows you to define the newer, faster printers first in the class and the slower, older units later. One of the nice features of a printer class is that all the printers within a class don't have to be the same model.

I would remove the class and then add make the class adding the secondary printer as the last step.

lpadmin -x myclass # remove class myclass
lpadmin -p primary_printer -c myclass # recreate myclass using primary_printer as the first printer
lpadmin -p myclass secondary_printer # add the next printer
accept myclass
enable myclass # this step may not be required
If it ain't broke, I can fix that.
Hazem Mahmoud_3
Respected Contributor

Re: Printer Class...

Unfortunately that did not work, but I figured it out. I modified /var/spool/lp/class/Main_Class by switching the order of the entries in the file:


as opposed to how I set it up where it put it as:


So it looks like the primary printer needs to be defined in that file as the last entry and that should do it. Thanks for your help Clay!