modify print job name

Antonis Tsolomitis atsol at aegean.gr
Fri Jul 14 03:47:51 PDT 2006


> See "man backend" regarding how to write your own backend.
> Save it as /usr/lib/cups/backend/pipe
> Set read and execute permissions accordingly.
> Restart the cupsd.
> Verify that the new backend is shown in "lpinfo -v".
>

OK script is in place and the printer "test" is installed with

lpadmin -p test -v pipe:/usr/local/bin/test -E

the file /usr/local/bin/test is just a simple script to see if the new printer works.
It is just
-------------------
#!/bin/sh
cat - > /tmp/file.ps
-------------------
I print a test page from cups web interface and the printer stops with the message
"Error occurred while executing su -c "/bin/cat /var/spool/cups/d00689-001 | /usr/local/bin/test " lp"

However, I do not see any problem with the script. It works on the command line.

One more problem. pipe just does a cat to the script. But the job name is lost.
The job name is important since this is the way to get the phone to which to fax the file.
I am not an export with perl. How do I modify it to get the job name?

If I write a script according to "man backend", is it enough to put it in the right directory
with proper permissions so that cups can use it after a restart?

Antonis.





More information about the cups mailing list