FreeBSD 6 Unleashed
How lpd, the Print Spooler, and the Print Queue Function in FreeBSD
lpd is the line printer daemon. This software runs in the background and waits for print requests. When it receives them, it sorts the requests through any relevant filters, converts the data to a different format if necessary, and sends the requests to the print queue. A feature common to all modern operating systems, the print queue is an area on the hard disk where print data is stored that is waiting to be sent to the printer. Each printer connected to the system has its own separate queue and spool area. The spool area holds the data for you (in the order it was received, as though on a spool of thread) until it can be sent to the printer. It can hold multiple jobs from the same or different users. When a user submits a job to be printed, it is put in the queue. The spooler then feeds the job to the printer when the printer is available. Jobs can have different priorities that determine in which order they will get printed. Thus the spooler and print queue act as a means for asynchronous printing, where you can create print jobs whenever you want, regardless of whether the printer is available, and the system can print them of its own accord when it's able to do so. The spooler has several advantages over simply piping data directly to the printer, as DOS used to do:
Generally, the spool directories are located in /var/spool. Printer output is sent to a directory within /var/spool that corresponds to your printer, whether a parallel, serial, or USB device; the first printer on the system will normally spool to /var/spool/lpd or /var/spool/output/lpd. However, this can be changed by editing a configuration file, and you will look at how to do this later in the chapter. |
Категории