printing a file from cron using cups and/or lpd
Greg Rundlett
greg at freephile.com
Wed Mar 31 20:38:01 EST 2004
p.lussier at comcast.net wrote:
> Assuming you have a cups server properly configured somewhere, and a
> cups client configured to use that server, you should be able to
> simply do:
>
> lp -d<printer name> file.name
>
> I do this daily and it "just works".
Thanks Paul.
When I tried to use
kprinter --nodialog
it still sends a dialog to the x-server saying that the print job was
sent, thus it doesn't work from within a cron job because you get an
error that cron couldn't communicate with X.
I just tested
lp ~/file.txt
from the shell and it printed fine on my CUPS system at home, so I'm
guessing that it will work from cron (although my original problem was
on a different machine that I can't test right now). I didn't know
about the lp command (which is different from the "traditional" lpr).
In fact the man page for lp shows that it is from Easy Software
Products, the same people who make CUPS, so I guess it *is* the
command-line part of a CUPS system.
-Greg
More information about the gnhlug-discuss
mailing list