Online Book Reader

Home Category

UNIX System Administration Handbook - Evi Nemeth [433]

By Root 2652 0
-v/dev/ttyp2

Finally, we’ll start accepting jobs into the spool, enable the printer, and restart the spooler daemon:

# /usr/lib/accept howler-lw

# /bin/enable howler-lw

# /usr/sbin/lpsched

Printing from HP-UX to a BSD print server


HP-UX provides an interface script called rmodel that can send jobs to a remote lpd. rmodel options are set with lpadmin -o. For example, the following commands make the printer howler-lw on the machine beast available to local users:

# /usr/sbin/lpshut

# /usr/sbin/lpadmin -phowler-lw -v/dev/null -mrmodel -ormbeast

-orphowler-lw -ob3

# /usr/lib/accept howler-lw

# /bin/enable howler-lw

# /usr/sbin/lpsched

The rmodel interface accepts the arguments orm, orp, and ob to specify the remote machine, the remote printer, and the use of BSD-style, three-digit sequence numbers.

The rmodel interface actually calls rlp to send the job to the remote lpd server. Unfortunately, the rlp and rcancel and rlpstat commands are intended only for use by other parts of the printing system; they should never be invoked directly by users. If this limitation frustrates you, consider the rlpr package described on page 740.

Making HP-UX accept network print jobs from BSD


The HP-UX remote printing spooler, rlpdaemon, accepts jobs from lpr/lpd systems. rlpdaemon is usually run from inetd, but a host that receives a large number of print jobs should start it at boot time. rlpdaemon accepts jobs from any hosts listed in /etc/hosts.equiv or /usr/spool/lp/.rhosts.

Adding printers to Red Hat Linux


Red Hat’s printing system is a fairly vanilla implementation of the BSD standard. Some of Red Hat’s tools are very useful, especially the graphical printtool, which automates editing of the /etc/printcap file, and the lpunlock script, which rescues locked print servers. The beloved printtool holds your hand in configuring a variety of printers, including local, remote lpd, SMB (Windows), and NetWare (NCP) printers. Be forewarned that printtool requires the format of the /etc/printcap file to be very precise; if you edit the file by hand, you may not be able to open it in printtool anymore.

Red Hat is notorious for supporting a relatively limited collection of printers. The main reason is that Red Hat Linux uses the GNU version of ghostscript, which supports far fewer printers than the popular Aladdin Enterprises version. The free but quasi-commercial Aladdin ghostscript, used in many other distributions, can rasterize images for many different non-PostScript printers. If you find that your printer is not supported by Red Hat’s default engine, consider installing the Aladdin version of ghostscript from www.aladdin.com.

Setting up a local printer under Red Hat


Red Hat uses the RHS print filters package, which is difficult to configure without printtool. An entry without filters looks like this:

howler-lw|howl|laserjet:\

:sd=/var/spool/lpd/howler-lw:\

:mx#0:\

:lp=/dev/parport0:\

:sh:

The above entry defines three names for the printer, specifies a spool directory and port device, eliminates maximum job sizes, and suppresses print headers.

We can tell from the device file that this is a parallel printer. Serial printers are configured similarly. The device would probably be /dev/ttyS0 (or S1 for your second serial port) instead of /dev/parport0, and the filters would be different. Additionally, you would have to specify serial options such as baud rate. Look up relevant settings in the on-line man pages for printcap.

Printing from Red Hat to a network print server


As with all BSD printing systems, new printers need an /etc/printcap entry on the client machine. For our LaserJet, we’d add something like this:

howler-lw|lp|8-6|"LaserJet 5M, called howler-lw on beast":

:lp=/var/spool/lpd/howler-lw/.null:\

:rm=beast:rp=howler-lw:\

:sd=/var/spool/lpd/howler-lw:mx#0:

We would then create the spool directory and the .null file on the client:

# mkdir /var/spool/lpd/howler-lw

# touch /var/spool/lpd/howler-lw/.null

# chown -R daemon /var/spool/lpd/howler-lw

# chgrp

Return Main Page Previous Page Next Page

®Online Book Reader