Operating System - Tru64 Unix
1752562 Members
4444 Online
108788 Solutions
New Discussion юеВ

Re: Printer issue.

 
SOLVED
Go to solution
vishnu_12
New Member

Printer issue.

When I print reports in alpha GS server, although I specify 2 copies in the print options, I only receive 1 copy.
used this commond
#lp -c -d -n2

pritcap entry is
abc249|lp249:\
:lf=/usr/adm/lp249err:\
:lp=/:\
:rm=xyz.xy.com:\
:rp=text:\
:sd=/usr/spool/lpd249:\
:xf=/usr/lbin/xf:

Your help will be a great favour for me.
9 REPLIES 9
Johan Brusche
Honored Contributor
Solution

Re: Printer issue.

Vishnu,

Since this is a REMOTE print queue the local lpd does not execute any filter actions, whatever filter you specify in printcap ( this is to comply with lpd RFC). The usual workaround is to create a local printqueue with a home-made filter that pipes x copies to the remote lpd.

Rgds,
Johan.

_JB_
Johan Brusche
Honored Contributor

Re: Printer issue.

Q:

How can you send "lpr" switches to a remote printer?

A:

Create a "pass-through" printcap entry that points to the original
printcap entry for the remote printer. As an example, assume your
remote printer entry looks like this.

lp5|5|dot matrix printer:\
:lf=/usr/adm/lp5err:\
:lp=:\
:rm=tom.digital.com:\
:rp=lp2:\
:sd=/usr/spool/lpd5:

And you want to print multiple copies to the printer. When you do
lpr -#2 -P5 filename
you only get one copy. The remote system doesn't interpret the multiple
copies switch on lpr. Create another printcap entry that looks like
this.
lp8|8|pass-through entry:\
:lp=/dev/null:\
:mx#0:\
:of=/usr/lbin/passtolp5:\
:sd=/usr/spool/lpd8:

Then create a file called /usr/lbin/passtolp5 that looks like this.
Make sure the mode of this file is 755.

#!/bin/csh -f
/bin/cat | lpr -Plp5

Now to print 2 copies of filename to printer lp5, do the following.

# lpr -#2 -P8 filename



_JB_
Paul_504
Frequent Advisor

Re: Printer issue.

I have the same problem as vishnu, and vishnu, I empathize. I've been busy trying to solve this all day.

Johan, would the command then work as it's meant to if the printer was locally connected??
Michael Schulte zur Sur
Honored Contributor

Re: Printer issue.

Johan,

I am using tcp/ip printing instead of bsd and it works fine for me. Are there any differences?

below the printcap entry and the services entry. If your printserver supports raw ports this might be an alternative.

greetings,

Michael



abc249|lp249:\
:lf=/usr/adm/lp249err:\
:lp=@xyz.xy.com/lpt1:\
:of=/usr/lbin/lpf_crlf -l72:\
:rp=text:\
:sd=/usr/spool/lpd249:\
:xf=/usr/lbin/xf:

entries in /etc/services
lpt1 9100/tcp
lpt2 9101/tcp
lpt3 9102/tcp
lpt4 9103/tcp
lpt5 9104/tcp
lpt6 9105/tcp

Johan Brusche
Honored Contributor

Re: Printer issue.


Paul,

Yes, printer 8 is local, will use it's input/output filters, producing filtered output (eg multiple copies) ,which is then piped to the remote printer.

Michael,

Yes, tcp printing is different in that respect and would be an alternate (and less difficult to implement) solution.

Rgds,
__Johan__

_JB_
Paul_504
Frequent Advisor

Re: Printer issue.

Johan, hi

I followed step for step the solution you gave, but it doesn't seem to want to work. I get the error:

# lpr -#2 -P1
lpr: No entry in /etc/printcap entry for printer: 1

My printcap file is as follow:

lp0|0|remote_sys:\
:lf=/usr/adm/lp0err:\
:lp=:\
:mx#0:\
:pl#66:\
:pw#100:\
:rm=remote_sys:\
:rp=text:\
:rw:\
:sd=/usr/spool/lpd0:\
lp1|1|pass_through:\
:lp=/dev/null:\
:mx#0:\
:of=/usr/lbin/passtolp0:\
:sd=/usr/spool/lpd1:\

Printing purely through lp0 is fine, but when I redirect it as you've said, it complains. Any ideas??
Michael Schulte zur Sur
Honored Contributor

Re: Printer issue.

Paul,

:sd=/usr/spool/lpd0:\
should be
:sd=/usr/spool/lpd0:

\ is a continue sign and at the moment you have only one printer definition and not two.

greetings,

Michael
Paul_504
Frequent Advisor

Re: Printer issue.

Michael, nice one!

It has just gone through!!!

Thank you for the input, I appreciate it 10 fold. I can now happily go home unfrustrated :-).

Vishnu, score them all 20 :-)
nelson chan_4
New Member

Re: Printer issue.

The solution really helpful, it was great for me to solve the same problem in alpha box.

But recently i have a same problem in redhat linux v8.0 box, since it was using the latest lprng. Can anyone give me a hand on it.

Below are my configuration file.


lp1:\
lp=xlp1@localhost:\
bounce_queue=true:\
pl#66:\
mx=0:\
ff:\
sd=/user/spool/lp1:

xlp1:\
lp=COM1@it.printer:\
bounce_queue=true:\
sd=/user/spool/xlp1:

thank you!!