Thanks to all who responded.
Stanley Hinshaw <shinshaw_at_mnu.edu>
Sean O'Connell <sean_at_stat.Duke.EDU>
Jim Belonis <belonis_at_dirac.phys.washington.edu>
Doug Johnson <drjohn_at_pizero.Colorado.EDU>
I tried the method sent to me by Stanley Hinshaw. It worked well for ascii
text files, but some postscript files, I would get OFfending command. I would
send this to a queue defined as I had defined (using the rm, and the postscript
worked fine). Not sure what the filter does to a postscript file, would think
it would just send it along. We will be using this server to serve all print
request from all sources, Unix, Netware and Macintosh. Printing through
Netware seem to work fine, everythingt hat I printed, however when we printed
through a MAC which has a Netware Client, and thus can access the netware
queues we get an offending command. Strange.
I would appreciate any other suggestions.
Thanks.
*** From: Stanley Hinshaw <shinshaw_at_mnu.edu>
HOW TO CONFIG. TCPIP PRINT QUEUE FOR UNIX V4.0A AND ABOVE
First, you must assign an IP address to the network card
in your printer, or to your terminal server. Then you must associate a
name with that address and put it into your /etc/hosts file.
Next, you must figure out what tcpip port number the network card
is listening on. You can check this out by doing a telnet nodename (the name
you put in the /etc/hosts file) port number.
Example: telnet hpprinter 9100 (or whatever port number the
documentation mentions. The JetDirect EX+3 uses 9100
for port 1, 9101 for port 2, and 9102 for port 3.)
If you are printing to a terminal server, the port number will
will be the number of the telnet listener on the terminal server port.
See the terminal server documentation for information about establishing
a telnet listener on a port. By default, the listener numbers begin at
2001. So port 1 of the terminal server will have listener 2001, port 2
will have 2002, and so on. Once the listener is established on the
port, you should be able to telnet to it:
Example: telnet terminal-server 2001
Once the telnet command is successful, you will need to put that
tcpip port number in the /etc/services file and associate it with a name of
your choice.
Example: hp5si 9100/tcp
or
Example: port1 2001/tcp
Next, run /usr/sbin/lprsetup:
Command < add modify delete exit view quit help:
If this is a new printer, you will want to type a. If it is an
existing printer, that you want to make some changes to, type m. You will
then be asked:
Enter printer name to add [4]. This is what you want to call your
print queue. Then you must select the type printer that you have. Next,
it asks: Enter printer synonym: This will be another name you want to call
the print queue. If you do not want an alias, just type return. The
following question is the device pathname for lp. You will put:
_at_nodename/portname, where nodename is the name you put in the
/etc/hosts file and portname is the name you put in the /etc/services file.
If you want the default, on the next 3 questions, you can just type
return, or put the pathname of your choice. Next, type q, for quit, and it
displays the printcap entry back to you. If you are satisfied with it, just
type return. You will then be asked if you want to add any comments to the
printcap. If no, just type return. When you get back to the line that says:
Command < add modify delete exit view quit help >:, just type and e for
exit, and you will be out of lprsetup. You should then be all set to
print.
The following is what you printcap entry should look like, when
you are done:
hp5lab|lp3:\
:af=/usr/adm/lp3acct:\
:if=/usr/lbin/hplaserof:\
:lf=/usr/adm/lp3err:\
:lp=_at_hpprinter/hp5si:\
:mx#0:\
:of=/usr/lbin/hplaserof:\
:pl#66:\
:pw#80:\
:rw:\
:sd=/usr/spool/lpd3:\
:xf=/usr/lbin/xf:
You can verify if the job went or not, by doing a /usr/sbin/lpc stat
quename. If the job went, it should say:
printer is on device XXX
queuing is enabled
printing is enabled
no entries
no daemon present
>
*** From: Sean O'Connell <sean_at_stat.Duke.EDU>
The only way this will work is to use tcp (aka telnet) printing,
otherwise Digital Unix seems to blithely ignore the filter and
send it off unaltered to the printer.
Try something like the following,
lw-jesup-er|lw_jesup_er:\
:ct=tcp:\
:sd=/var/spool/lpd/queues/lw-jesup-er:\
:lf=/var/spool/lpd/queues/lw-jesup-er/lw-jesup-er.log:\
:if=/usr/local/bin/a2psif:\
:lp=_at_lw-jesup-er.williams.edu/jetdirect:\
:sh:\
:pl#66:\
:pw#80:\
:mx#0:
In /etc/services define,
jetdirect 9100/tcp #HP JetDirect card
*** From: Jim Belonis <belonis_at_dirac.phys.washington.edu>
You are correct. Unix lpr/lpd doesn't use filters unless it thinks the printer
is a local printer device.
A work-around for this is to print to the device /dev/null
but have the filter do whatever filtering you want, then send the
output to the real printer queue.
If you can't modify a2psif or don't want to, you can use a shell script
as the filter and run a2psif from that and pipe through the
lpr command to the correct final queue.
The disadvantage of this is that lprm etc. may not work.
*** From: Doug Johnson <drjohn_at_pizero.Colorado.EDU>
You might want to look at LPRng.
At 08:11 PM 7/21/99 -0400, you wrote:
>I would like to set up filters in printcap so that from
>unix I can print either postscript or text and the
>the filter figures out which and prints it.
>
>However I don't think the filters get used, because
>I am lpring to an HP printer, remote machine.
>
>lw-jesup-er|lw_jesup_er:\
> :sd=/var/spool/lpd/queues/lw-jesup-er:\
> :lf=/var/spool/lpd/queues/lw-jesup-er/lw-jesup-er.log:\
> :of=/usr/local/bin/a2psif:\
> :lp=:\
> :rm=lw-jesup-er.williams.edu:\
> :pl#66:\
> :pw#80:\
> :du#0:pl#72:pw#85:mx#0:\
> :rw:\
> :sh:\
> :sf:\
> :xf=/usr/lbin/xf:
>
>
>Is there a way to set up a queue that will run it through this a2psif filter
>then send it to the remote machine or requeue it to a different queue. I
do not
>want to create a text queue and a postscript and have the user make the
mistake
>of printing to the wrong one.
>
>thanks.
>
>
Received on Fri Jul 23 1999 - 13:38:38 NZST