Online Book Reader

Home Category

UNIX System Administration Handbook - Evi Nemeth [431]

By Root 2902 0
to use the Solstice Printer Manager available in the Solstice AdminSuite. If your site has not purchased this product, the Admintool (found at /usr/bin/admintool) is a good second choice. For those of you who want a better understanding of the printing system, we discuss the gory details here.

Solaris provides several nonstandard printing commands. lpfilter views and adds new interface programs to the system.5

The lpset and lpget commands facilitate the editing and review of printer configuration information. lpset provides basically the same functionality as lpadmin, but it has the unique characteristic of working on both system-wide and personal configuration files.

The lpusers command manages a slightly enhanced prioritization and access control system, and lpforms provides a system for standardizing page presentation across a group of users. Neither of these commands is particularly exciting and we do not discuss them further.

Solaris provides the BSD printing commands as part of the “SunOS/BSD Compatibility Package,” which is included by default in Solaris distributions. Ergo, you can use lpd for all network printing between your Solaris hosts if you so choose.

Solaris printer configuration information is stored in a printcap-like file that’s called /etc/printers.conf. Additional information is stored in the /etc/lp directory, and printer-specific information in /etc/lp/printers/printername. Users can customize their printing environment with an optional ~/.printers file, which allows them to set defaults for printers and aliases for print commands. Errors from the spooler lpsched are logged by default to /var/lp/logs/lpsched.

Unlike commands in the traditional SysV printing family, Solaris’s print commands accept a space between option flags and their values (e.g., lpstat -p anchor-lj instead of lpstat -panchor-lj). However, they seem to accept the older format as well. It’s probably best to stick with the documented (spaceful) syntax.

Solaris requires you to specify what types of input your device can handle. With this information the printing system determines whether a printer will be able to handle a given print job. The interface programs reject input that is not of one of the correct types, so if you do not specify a type, your printer is useless. Use lpadmin -I to set this value. -I PostScript,simple works well for PostScript printers. For line printers that can understand only text, use -I simple.

You must also specify the type of printer; use the -T flag of lpadmin. The printing system needs the type specification to determine how to initialize and communicate with the printer. Some filters also depend on this value being properly set. A printer’s type can be any value listed in the terminfo database in /usr/share/lib. Look for an entry that matches your printer. A generic PostScript printer can use the PS type:

# lpadmin -p howler-lw -T PS

Solaris stores new interface programs in /etc/lp/interfaces, although no filters are provided there with a fresh installation. For a listing of all the interface programs available on your machine, run the lpfilter command:

# lpfilter -f all -l

Setting up a local serial printer under Solaris


First, connect your serial printer and determine the device with which it is associated. Common Solaris serial devices are /dev/term/a and /dev/term/b. The device needs to be owned by the user lp, and the permissions must be set so that only the user lp can read or write to the device:

# chown lp /dev/term/a

# chmod 600 /dev/term/a

Next, configure the printer with lpadmin. You must specify the printer name, the device, the printer type (PostScript or simple text), and the content types the printer can handle. Your lpadmin command should look something like this:

# lpadmin -p printername -v /dev/term/a -T printertype -I contenttype

-D "description"

Tell the spooler to start accepting print jobs and tell the printer to start printing them:

# enable printername

# accept printername

Finally, check that the printer installation was successful

Return Main Page Previous Page Next Page

®Online Book Reader