[cups.general] How to run script before (and after) printing?

alet at librelogiciel.com alet at librelogiciel.com
Fri Aug 29 01:08:55 PDT 2008


On Fri, Aug 29, 2008 at 01:03:47AM -0700, Tijmen Stam wrote:
> Hello,
> 
> I have just installed a new printer using CUPS and it works perfectly. However, I print very rarely - maybe once a month or so - and it's a waste to have the printer on wasting power all the time. Therefore, I have bought a Gembird SIS-PMS power block, which can switch off and on power outlets via USB. Also works perfectly.
> 
> What I'd like to do is that before CUPS start printing, the printer is switched on, and afterwards a timer is set to switch it off in 15 minutes (printing again cancels that timer - I still have to work out the details). The start command can be as simple as "sispmctl -o 1" - but later on will have to be some kind of shell script that also cancels the timer.
> 
> Question: I can't find anywhere to issue pre-printing commands. However I can't believe such a thing doesn't exist. Where can I find this?

<shameless plug="ON">
  http://www.pykota.com/software/tea4cups/
</shameless>

hth

Jerome Alet





More information about the cups mailing list