remote printing with pap

Eric Richardson eric@milagrosoft.com
Wed, 03 Jan 2001 12:58:57 -0700


Mike Starke wrote:
> 
> Your question used the word "anything" implying any
> little bit might help. So here goes:

I guess that is a pretty open request. Was hoping someone would help on
this very unglamourous request for help.
> 
> 'rlpr' is what we use.  Set up a /etc/printcap
> on one server. Then use 'rlpr' to print to it.
> The beauty of rlpr is the scalibility. No need
> for any printcap files on the client side.
> 
> Of course, this implies that the printcap file
> you do set up has the printer attached via one
> of your lp's.

I don't have a local printer and I can't get the linux box printcap or
lp to work correctly
yet, that's the problem.

Essentially lpd needs to take the spooled file and send the file via
pap(printer access protocol-which is how a mac prints). Actually the NEC
95 is a postscript printer and with the little asante bridge box which
translates ethertalk to localtalk, it can be plugged in anywhere on the
network so it works like a printer with a ethernet card. So any
appletalk printer could be setup this way.

I don't get how printcap and lpd interact well enough to figure out what
is wrong.
That's why I put all the info in the message below - sorry.

Thanks.
Eric :-)


> > Eric Richardson wrote:
> > >
> > > Hi,
> > >
> > > I have netatalk working and I can send a postscript file to the printer
> > > using pap and it prints fine. The setup is a local area network with one
> > > switch and the printer is connected to the TCP/IP network with a
> > > Ethertalk to localtalk bridge. The printer also works fine with a Mac on
> > > the network.
> > >
> > > I am running SuSE 6.4 and a tried using the yast or whatever to setup a
> > > remote printer with no luck so then I tried to use info on the net to
> > > get close with the printcap file manually. I can't understand the print
> > > filter chain and how this works with the printer daemon and the remote
> > > printer.
> > >
> > > Below is a transcript of what I think might be important. Any help would
> > > be very much appreciated.
> > >
> > > Eric :-)
> > >
> > > maxwell@maxwell:~ > cat /etc/printcap
> > >
> > > lp|nec95|Silentwriter 95:\
> > >         :lp=/var/spool/lpd/nec95-lp/null:\
> > >         :sd=/var/spool/lpd/nec95-lp:\
> > >         :lf=/var/spool/lpd/nec95-lp/log:\
> > >         :of=/usr/lib/atalk/filters/ofpap:\
> > >         :if=/usr/lib/atalk/filters/ifpap:\
> > >         :tf=/usr/lib/atalk/filters/tfpap:\
> > >         :pd=/var/spool/lpd/nec95-lp/nec95.ppd:\
> > >         :ar:bk:mx#0:\
> > >         :tr=:cl:sh:
> > >
> > > maxwell@maxwell:/var/spool/lpd/nec95-lp > ls -la null
> > > crw-rw-rw-   1 root     root       3,   1 Oct 19 07:10 null
> > >
> > > maxwell@maxwell:/var/spool/lpd/nec95-lp > ps -ef | grep lpd
> > > root       244     1  0 08:58 ?        00:00:00 /usr/sbin/lpd
> > > root       247   244  0 08:58 ?        00:00:00 /usr/sbin/lpd
> > > maxwell    552   511  0 09:45 pts/0    00:00:00 grep lpd
> > >
> > > root@maxwell:/var/spool/lpd/nec95-lp > cat status
> > > waiting for lp to become ready (offline ?)
> > >
> > > maxwell@maxwell:~ > cat .paprc
> > > # Apple Printer Access Protocol (PAP)
> > > Silentwriter 95:LaserWriter@*
> > >
> > > This file is also in the spool directory as well since pap needs this
> > > file.
> > >
> > > maxwell@maxwell:~ > pap printcap.ps
> > > Trying 840.85:128 ...
> > > status: idle
> > > Connected to Silentwriter 95:LaserWriter@*.
> > > Connection closed.
> > >
> > > So this works fine and prints the file.
> > >
> > > maxwell@maxwell:~ > lpr printcap.ps
> > > lpr: connect: Connection refused
> > > jobs queued, but cannot start daemon.
> > >
> > > root@maxwell:/etc/rc.d > ./lpd status
> > > OK
> > > root@maxwell:/etc/rc.d > ./lpd stop
> > > Shutting down lpd
> > > done
> > > root@maxwell:/etc/rc.d > ./lpd start
> > > Starting lpd
> > > done
> > >
> > > If I remove everything from the queue and restart the daemon this is
> > > what happens. Notice this time that the lpr doesn't refuse connection as
> > > above.
> > >
> > > maxwell@maxwell:~ > lpr printcap.ps
> > > maxwell@maxwell:~ > lpq
> > > waiting for lp to become ready (offline ?)
> > > Rank   Owner      Job  Files                                 Total Size
> > > 1st    maxwell    44   printcap.ps                           14807 bytes
> > >
> > > I get cf and df files but the files just never print.
> > >
> > > root@maxwell:/var/spool/lpd/nec95-lp > ls
> > > acct           cfA045maxwell  dfA045maxwell  log        null
> > > cfA044maxwell  dfA044maxwell  lock           nec95.ppd  status
> > >
> > > ________________________________________________