[cups.general] Custom print command -- adding a new backend?
Jerome Alet
alet at librelogiciel.com
Mon Jun 6 12:53:44 PDT 2005
Hi,
On Mon, Jun 06, 2005 at 02:50:05PM -0400, hanspv at klodrik.uio.no wrote:
>
> I try to set up a CUPS queue that uses a shell command to print. I.e. not just
> dropping a file to a device, or using some pre-defined protocole like LPD,
> but giving it to a script on stdin.
>
> The documentation doesn't mention this (or I didn't find it), but I got the
> impression that a "backend" script (bash/perl/whatever) could do the trick.
>
> Is that right? If so, how do I create a backend? I found a few "extra"
> scripts under /usr/lib/cups/backend/ , but creating a script here & restarting
> cupsd doesn't seem to get me anywhere. The GUI still doesn't allow me to
> choose any other connection type (it's only "Locally-connected", "Networked
> CUPS", etc etc...).
>
> Entring an unknown DeviceURI in /etc/cups/printers.conf doesn't work, it's
> rejected by the gui.
>
> How can I expand the list of possible connections, and force CUPS to pour
> the print data to my script's STDIN ?
>
> Any help, or pointers to relevant docs, is appreciated.
Creating CUPS' backends is not as easy as creating a simple script
unfortunately, because there are some special requirements needed
to make it integrate seemlessly into CUPS.
That's why this software :
http://www.librelogiciel.com/software/Tea4CUPS/action_Presentation
was written.
It handles all the dirty work, and exposes a well defined interface
to your own scripts which can access all the print job's
characteristic in a consistent way through the use of environment
variables.
Plugging-in your own scripts into CUPS is now more than easy thanks
to Tea4CUPS.
hth
Jerome Alet
More information about the cups
mailing list