"intelligent" load balancing or duplex detection

Elvin Lee elvlee at ucdavis.edu
Thu Aug 19 15:48:21 PDT 2004


Helge Blischke wrote:
> Elvin Lee wrote:
> 
>>I had considered writing a backend to perform duplex detection, but I
>>could not discern a way to "select" a printer in the class to perform
>>the print job. Could you enlighten me on this?
> 
> The trick is to define sort of a "dummy printer" (using the PPD of the
> duplex
> capable one, of course) the backend of which only does job forwarding
> (setting
> the raw option or the document-format to
> application/vnd.cups-postscript)
> 
> Use a scripting language, like Perl or Python, and follow the guidelines
> in
> the CUPS programmers manual.
> The logic is simple: save the file to a temporary file if you get the
> data from stdin,
> check for duplexing (see below), print your temporary file to the real
> printer
> (using just the lp or lpr command), and don't forget to erase the
> temporary file.
> That's all.

Yes, I had considered "forwarding" print jobs by using lp or lpr. The 
problem with that, for our system, is that it generates a brand new 
print job rather than true "forwarding". Our system here maintains a 
print quota for each user, and so generating a new print job would cause 
the quotas to be incorrectly updated (or not at all). For security 
reasons, I obviously do not want cups running as root, and so I could 
not have the new print job spawned as a different user. For security 
reasons, I also do not allow "normal" users access to the print server, 
complicating things even further. Again, thanks for taking the time to 
write -- it's very helpful for me to know what will and won't work, or 
where I've missed something. (I am still pretty new to CUPS administration.)

Elvin




More information about the cups mailing list