DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Adding printers

Installing parallel and serial printers

To install a printer:

  1. Find a safe location for your printer. Make sure that it is properly assembled and plugged into a power outlet.

  2. Log in as root (you do not need to put the system into maintenance mode).

  3. If you are connecting a serial printer, connect the RS-232 cable from a serial port on your computer to the port on your printer. Serial printers must be capable of supporting XON/XOFF or hardware flow control; they must also be configured to use the correct handshaking protocol. Consult your printer hardware manual for more information.

    Next, enter the following command substituting the correct port number for nn (for example, 1a for /dev/tty1a):

    disable /dev/ttynn

    This disables logins on the port you have connected to your printer and allows the port to be used for serial communication.

    If you are connecting a parallel printer, you must first run the Hardware/Kernel Manager or use the mkdev parallel command to create a parallel port. The printer must use a standard Centronics interface cable. The main parallel port is typically a built-in port or on a parallel/serial adapter (as opposed to being on a monochrome video card). The parallel port should have been configured to use interrupt vector 7 and be recognized as /dev/lp0 after running mkdev parallel. See parallel(HW) and ``Adding and configuring parallel ports'' for more information.

  4. Verify that you have connected the printer correctly by sending data directly to the device.

    For serial printers, enter the following command:

    date > /dev/ttynn

    where nn identifies the serial port you are using (for example, 1a for /dev/tty1a).

    You may need to specify the printer's stty(C) settings (speed, parity, data length and so on) if these differ from the serial line's default settings, For example, to test a 4800 baud printer on /dev/tty1a which is set to 9600 baud:

    (stty 4800 ; date > /dev/tty1a) < /dev/tty1a

    For parallel printers, enter the following command:

    date > /dev/lpn

    where n is the number of the parallel port you are using (for example /dev/lp0).

Certain laser printers, such as the HP LaserJet, need to be sent a form feed at the end of a print job; this tells them to eject the page. For example, for a serial printer:

(date ; echo "\014") > /dev/ttynn

or for a parallel printer:

(date ; echo "\014") > /dev/lpn

Laser printers that are in PostScript mode can be tested by sending them a PostScript file. For example, to send the file foo.ps to the serial port nn enter the following command:

cat foo.ps > /dev/ttynn

To send the file to the parallel port n enter the following command:

cat foo.ps > /dev/lpn


Next topic: Troubleshooting printers
Previous topic: Adding printers

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 03 June 2005