* Installing a "dummy" printer
@ 1998-07-07 4:00 stever
1998-07-07 4:00 ` Pierre Asselin
0 siblings, 1 reply; 5+ messages in thread
From: stever @ 1998-07-07 4:00 UTC (permalink / raw)
I'm looking for help on installing a "dummy" printer on Digital UNIX. I have
a shell script which I want executed on an incoming spool file. Rather than
being sent to a physical print device, the spool file will be processed by my
shell script, which copies the file off to another part of the system.
I have experimented with setting up a printer using 'lprsetup'. I defined a
printer of type 'unknown' and specified my shell script for the 'if' and 'of'
parameters -- but this doesn't seem to have any effect.
Has anyone ever done this?
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Installing a "dummy" printer
1998-07-07 4:00 Installing a "dummy" printer stever
@ 1998-07-07 4:00 ` Pierre Asselin
1998-07-09 4:00 ` stever
1998-07-09 4:00 ` stever
0 siblings, 2 replies; 5+ messages in thread
From: Pierre Asselin @ 1998-07-07 4:00 UTC (permalink / raw)
stever@opin.com writes:
>I'm looking for help on installing a "dummy" printer on Digital UNIX. I have
>a shell script which I want executed on an incoming spool file. Rather than
>being sent to a physical print device, the spool file will be processed by my
>shell script, which copies the file off to another part of the system.
I think all you have to do is specify /dev/null as the device
and your script as the :if: filter. Your script is called with
possible arguments `-n user', `-h host' and `accountingfile'
and receives the file on stdin.
>I have experimented with setting up a printer using 'lprsetup'. I defined a
>printer of type 'unknown' and specified my shell script for the 'if' and 'of'
>parameters -- but this doesn't seem to have any effect.
What I do is set up a vanilla entry with lprsetup and edit the
/etc/printcap directly.
>Has anyone ever done this?
My machine has dummy PostScript printers set up that way. The input
filter feeds the data to ghostscript and tells it to pipe its output
into an `lpr -Praw_printer'. So it can be done.
--
--Pierre Asselin, Westminster, Colorado
lpa@netcom.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Installing a "dummy" printer
1998-07-07 4:00 ` Pierre Asselin
@ 1998-07-09 4:00 ` stever
1998-07-11 4:00 ` Pierre Asselin
1998-07-09 4:00 ` stever
1 sibling, 1 reply; 5+ messages in thread
From: stever @ 1998-07-09 4:00 UTC (permalink / raw)
In article <lpaEvquz2.3wo@netcom.com>,
lpa@netcom.com (Pierre Asselin) wrote:
> stever@opin.com writes:
>
> >I'm looking for help on installing a "dummy" printer on Digital UNIX. I have
> >a shell script which I want executed on an incoming spool file. Rather than
> >being sent to a physical print device, the spool file will be processed by my
> >shell script, which copies the file off to another part of the system.
>
> I think all you have to do is specify /dev/null as the device
> and your script as the :if: filter. Your script is called with
> possible arguments `-n user', `-h host' and `accountingfile'
> and receives the file on stdin.
>
> >I have experimented with setting up a printer using 'lprsetup'. I defined a
> >printer of type 'unknown' and specified my shell script for the 'if' and 'of'
> >parameters -- but this doesn't seem to have any effect.
>
> What I do is set up a vanilla entry with lprsetup and edit the
> /etc/printcap directly.
>
> >Has anyone ever done this?
> My machine has dummy PostScript printers set up that way. The input
> filter feeds the data to ghostscript and tells it to pipe its output
> into an `lpr -Praw_printer'. So it can be done.
>
> --
> --Pierre Asselin, Westminster, Colorado
> lpa@netcom.com
>
On further inspection, I found that the script I specified in ':if' actually
*is* getting executed, but I can't see the output. One of the things that
script does is some "echo" commands. I need to have the output from those
directed to a log file. Any idea how I would do that? Again, here is my
printcap file:
# Test of dummy printer
revtest2|lp0:\
:if=/home/stever/reveal/bin/reveal.lp:\
:lf=/usr/adm/lperr:\
:lp=/dev/reveal.log:\
:mx#0:\
:of=/usr/lbin/lpf:\
:pl#66:\
:pw#80:\
:sd=/usr/spool/lpd:\
:xf=/usr/lbin/xf:
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Installing a "dummy" printer
1998-07-09 4:00 ` stever
@ 1998-07-11 4:00 ` Pierre Asselin
0 siblings, 0 replies; 5+ messages in thread
From: Pierre Asselin @ 1998-07-11 4:00 UTC (permalink / raw)
stever@opin.com writes:
>On further inspection, I found that the script I specified in ':if' actually
>*is* getting executed, but I can't see the output. One of the things that
>script does is some "echo" commands. I need to have the output from those
>directed to a log file. Any idea how I would do that? Again, here is my
>printcap file:
Why not do an `echo ... >>logfile' from the script itself?
--
--Pierre Asselin, Westminster, Colorado
lpa@netcom.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Installing a "dummy" printer
1998-07-07 4:00 ` Pierre Asselin
1998-07-09 4:00 ` stever
@ 1998-07-09 4:00 ` stever
1 sibling, 0 replies; 5+ messages in thread
From: stever @ 1998-07-09 4:00 UTC (permalink / raw)
In article <lpaEvquz2.3wo@netcom.com>,
lpa@netcom.com (Pierre Asselin) wrote:
> stever@opin.com writes:
>
> >I'm looking for help on installing a "dummy" printer on Digital UNIX. I have
> >a shell script which I want executed on an incoming spool file. Rather than
> >being sent to a physical print device, the spool file will be processed by my
> >shell script, which copies the file off to another part of the system.
>
> I think all you have to do is specify /dev/null as the device
> and your script as the :if: filter. Your script is called with
> possible arguments `-n user', `-h host' and `accountingfile'
> and receives the file on stdin.
>
> >I have experimented with setting up a printer using 'lprsetup'. I defined a
> >printer of type 'unknown' and specified my shell script for the 'if' and 'of'
> >parameters -- but this doesn't seem to have any effect.
>
> What I do is set up a vanilla entry with lprsetup and edit the
> /etc/printcap directly.
>
> >Has anyone ever done this?
> My machine has dummy PostScript printers set up that way. The input
> filter feeds the data to ghostscript and tells it to pipe its output
> into an `lpr -Praw_printer'. So it can be done.
>
> --
> --Pierre Asselin, Westminster, Colorado
> lpa@netcom.com
>
I must be missing something. Let me explain again -- when a file is entered
into this queue, I want to process it with a shell script (which will make a
copy of the file sent by lp), and log some status messages to a log file.
Here is my /etc/printcap entry currently:
# Test of dummy printer
revtest2|lp0:\
:if=/home/stever/reveal/bin/reveal.lp:\
:lf=/usr/adm/lperr:\
:lp=/dev/reveal.log:\
:mx#0:\
:of=/usr/lbin/lpf:\
:pl#66:\
:pw#80:\
:sd=/usr/spool/lpd:\
:xf=/usr/lbin/xf:
This doesn't do it. I get a banner in '/dev/reveal.log', but what I was
hoping for was the output from my script (specified in :if).
Any other suggestions?
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1998-07-11 4:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-07-07 4:00 Installing a "dummy" printer stever
1998-07-07 4:00 ` Pierre Asselin
1998-07-09 4:00 ` stever
1998-07-11 4:00 ` Pierre Asselin
1998-07-09 4:00 ` stever
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox