CUPS Interface Script By-Passed
I am trying to set up a CUPS printer that will print a single print
job on two separate printers. I saw a technique online using a CUPS interface script, but when I set it up it seems the interface script is being by-passed when I send a job to the printer. The method I found and am trying to use is to create a printer with the URI set to /dev/null and define an interface on that same printer that spawns two new print jobs, one to each of the two printers I want it to print on. Here is what I have done: Created interface_script: #!/bin/bash echo "Interface script is running." >>/home/me/debug /usr/bin/lp -d printer1 $6 /usr/bin/lp -d printer2 $6 _________________________________ Created Printer: lpadmin -p twoprint -i interface_script -v /dev/null -E The lpadmin copies the interface_script into /etc/cups/interfaces/twoprint as expected and the permissions on the twoprint script are 755. The CUPS LogLevel is set to debug2 and I don't see anything that looks to me to be an obvious problem in /var/log/cups/error_log after I send a print job to twoprint. Does anyone have an idea why the twoprint interface script is not getting run? |
Have you verified the new printer does not show any errors and is enabled? Have you checked the jobs to see if anything is stuck in the queue?
With a similar set up that I had already had but using a real printer i.e. instead of /dev/null I used ipp://localhost/printers/myprinter and a interface script it worked for me. The next step is to create a null printer to duplicate your exact configuration. |
Ok I duplicated your setup and it worked for me.
What distribution/version are you running? |
michaelk,
Thank you for working on my problem and for your reply. The fact that you were able to get it to work pushed me to keep trying. I eventually figured out what I was doing wrong and it was not in the set up - it was in the lp command I was using to send the original job to the printer. Being fairly new to linux, I used lp command options I had seen used other places without really looking into what they do. I was using the -o raw option which, as I now understand, tells cups to not execute any interfaces/filters. I sure feel stupid right now. When I enter the lp command like this the job prints on both printer1 and printer2: lp -s -d twoprint filename Thanks again for setting it up yourself and getting it to work. |
Your welcome.
You can mark this thread as solved via the thread tools menu at the top of the page. |
All times are GMT -5. The time now is 09:29 AM. |