|
|
To install a printer:
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.
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).
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