[cups.general] run script before and after printing?

alet at librelogiciel.com alet at librelogiciel.com
Sun Dec 19 00:38:07 PST 2010


On Sat, Dec 18, 2010 at 11:59:09PM -0800, jaqen wrote:
> I was wondering if there is a way to have cups run a script before starting to print and then again once its done.
>
> I have a remote controlled power switch (tellstick from www.telldus.com) that I'd like to use for turning on and off my printer, so its only on when needed.
>
> so far my best idea has been to monitor the queue (using lpstat -o) and turn on once theres a queue. The problem being that the queue often empties before the printing is done, so I'll have to guess at how log to wait before turning it off again.
>
> anyone have a better idea?

I know someone is doing the very same thing using my Tea4CUPS software
(http://www.pykota.com/software/tea4cups)

You could probably write something using IPP subscriptions as well.

bye

Jerome Alet





More information about the cups mailing list