[cups] How to call a script when a job arrives

Kurt Pfeifle kurt.pfeifle at gmail.com
Fri Apr 5 03:49:37 PDT 2019


Have a look like tea4cups, beh (back end handler of cups-filters by
OpenPrinting) or papercut handle similar problems. Basically, they are
wrappers around the real backends. They re-define the original URIs as
"beh:socket://address" or "papercut:ipp://..." or
"tea4cups://lpd://address". When called, they do their thing and after
finishing just invoke the original backend with the original (or modified)
parameters.

So your script could be called "curl", hooked into CUPS as
"curl:[optional_params]socket://address" similar to "beh" (see example
usage at
https://github.com/OpenPrinting/cups-filters/blob/5e6695a94e1a24b66cac9fe8e39c41571e08971d/README#L1541
)

On Fri, Apr 5, 2019 at 10:13 AM Marc Haber <mh+cups at zugschlus.de> wrote:

> Hi,
>
> I have a network printer that can be turned on by doing a certain curl
> call, and would like CUPS to turn the printer on automatically when a
> print job for this printer arrives.
>
> Must I do this in a filter or is there a more elegant place for this?
> How and where would I specify a filter that is used for all jobs for a
> certain printer?
>
> Greetings
> Marc
>
> --
>
> -----------------------------------------------------------------------------
> Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
> Leimen, Germany    |  lose things."    Winona Ryder | Fon: *49 6224 1600402
> Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421
> _______________________________________________
> cups mailing list
> cups at cups.org
> https://lists.cups.org/mailman/listinfo/cups
>


More information about the cups mailing list