Printer configuration under FreeBSD

Source: Internet
Author: User

FreeBSD is a multi-user operating system, so there may be multiple users issuing print requests at the same time, and if each request accesses the printer directly, there is a certain conflict problem. To enable the printer to serve all users, FreeBSD uses a pseudo offline print service. In this way, each print user using FreeBSD does not directly access the printer, but instead uses a series of pseudo offline print programs to use the printer.

The FreeBSD print system provides the following features:

Control the user's access to the printer, including local printers and network printers;

Allow users to submit print jobs and allow users to manage their own print jobs;

Maintenance of a print queue to prevent multiple users to use the printer at the same time the phenomenon occurs;

You can choose to print the logo at the beginning of the document so that the printed document is confusing;

can support different printers through the filter;

Provide accounting functions;

System structure

Usually the user uses the program LPR to print, but LPR does not directly send all the printed files to the printer, but it is placed in the print buffer directory. Usually this buffer is in the/var/spool directory, each printer has its own spool directory, the print file is placed here, stored as a temporary file. The system uses daemon LPD to monitor the spool directory, when a document that needs to be printed is found in a buffer directory, LPD replicates itself, creating an LPD process for the print task, which processes the document of the print buffer directory and sends it to the corresponding printer in this directory for printing. Because a printer corresponds to a buffer directory and is managed by an LPD process, there is no more than one print task that accesses the printer and a resource conflict problem occurs.

In this way the ordinary printing system is divided into three parts:

User interface: Print command LPR, etc. is the user used to implement printing and management of the program, it will be printed in the file to the local or remote print buffer;

Print buffers: Each printer has its own buffer, which the user or administrator can maintain through a series of commands;

Printer Manager: The print daemon LPD is the center of the print system, responsible for monitoring the buffer and sending the print job in the buffer to the printer for printing;

This approach, although it looks more complex than direct access to a printer, can support multiple users and multiple printers, and the print buffer and spooler daemons make printing work in the background, and users do not have to wait for the print to end. In addition, this allows the print system to be well integrated with the network, through which you can send print jobs that print to other hosts over the network, or monitor the printed documents sent on the network and put them into the print buffer for processing.

Another advantage of dividing the printing process into three parts is that you can use the filter to process the print jobs placed in the print buffer, so that you can complete many functions such as transformation format, statistics and so on, and give full play to the characteristics of easy management.

This BSD-style print system is FreeBSD by default, and additional packages are required to support multiple printers, as well as to support the printing of Chinese and graphics. including Ghostscript, Psutils, Apsfilter, GB2PS, etc., are installed through packages collection.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.