Download Troubleshooting

Transcript
Printing with lpr
© 2008, QNX Software Systems GmbH & Co. KG.
Local and remote printers
What if we now want to move one of the two printers (say lpt2) from node1 to
node2?
/dev/par1
/dev/par1
TCP/IP
node1
node2
We have to change the /etc/printcap file on both nodes. Likewise, we need to
change /etc/printcap on any other network nodes we wished to print from:
• On node1:
lpt1:\
:lp=/dev/par1:sd=/usr/spool/output/lpt1:
lpt2:\
:rm=node2:rp=lpt2:sd=/usr/spool/output/lpt2:
• On node2:
lpt1:\
:rm=node1:rp=lpt1:sd=/usr/spool/output/lpt1:
lpt2:\
:lp=/dev/par1:sd=/usr/spool/output/lpt2:
• On other nodes:
lpt1:\
:rm=node1:rp=lpt1:sd=/usr/spool/output/lpt1:
lpt2:\
:rm=node2:rp=lpt2:sd=/usr/spool/output/lpt2:
Make sure you have entries for node1 and node2 in the /etc/hosts file on each
node. You also need entries in the /etc/hosts.lpd file on node1 and node2 for
each node that you want to be able to use the printers.
If you’ve set up your remote printing network according to the examples given, you
should be able to send a file in /tmp/test on node2 to the printer attached to node1
using a command like this:
lpr -h -Plpt1 /tmp/test
Here’s what happens:
1
September 30, 2008
You enter the lpr command to print a file remotely.
Chapter 14 • Printing
217