Best Industrial Training in C,C++,PHP,Dot Net,Java in Jalandhar

Saturday, 21 September 2013

CUPS and Configure in Linux O.S.

CUPS (formerly an acronym for Common Unix Printing System, but now with no official expansion) is a modular printing system for Unix-like computer operating systems which allows a computer to act as a print server. A computer running CUPS is a host that can accept print jobs from client computers, process them, and send them to the appropriate printer.
CUPS consists of a print spooler and scheduler, a filter system that converts the print data to a format that the printer will understand, and a backend system that sends this data to the print device. CUPS uses the Internet Printing Protocol (IPP) as the basis for managing print jobs and queues. It also provides the traditional command line interfaces for the System V and Berkeley print systems, and provides support for the Berkeley print system's Line Printer Daemon protocol and limited support for the server message block (SMB) protocol. System administrators can configure the device drivers which CUPS supplies by editing text files in Adobe's PostScript Printer Description (PPD) format.
CUPS provides a mechanism that allows print jobs to be sent to printers in a standard fashion. The print-data goes to a scheduler which sends jobs to a filter system that converts the print job into a format the printer will understand. The filter system then passes the data on to a backend—a special filter that sends print data to a device or network connection. The system makes extensive use of PostScript and rasterization of data to convert the data into a format suitable for the destination printer.
CUPS offers a standard and modularised printing system that can process numerous data formats on the print server. Before CUPS, it was difficult to find a standard printer management system that would accommodate the very wide variety of printers on the market using their own printer languages and formats. For instance, the System V and Berkeley printing systems were largely incompatible with each other, and they required complicated scripts and workarounds to convert the program's data format to a printable format. They often could not detect the file format that was being sent to the printer and thus could not automatically and correctly convert the data stream. Additionally, data conversion was performed on individual workstations rather than a central server.
CUPS allows printer manufacturers and printer-driver developers to more easily create drivers that work natively on the print server. Processing occurs on the server, allowing for easier network-based printing than with other Unix printing systems. With Samba installed, users can address printers on remote Windows computers and generic PostScript drivers can be used for printing across the network.
Scheduler
The CUPS scheduler implements Internet Printing Protocol (IPP) over HTTP/1.1. A helper application (cups-lpd) converts Line Printer Daemon protocol (LPD) requests to IPP. The scheduler also provides a web-based interface for managing print jobs, the configuration of the server, and for documentation about CUPS itself.
An authorization module controls which IPP and HTTP messages can pass through the system. Once the IPP/HTTP packets are authorised they are sent to the client module, which listens for and processes incoming connections. The client module is also responsible for executing external CGI programs as needed to support web-based printers, classes, and job status monitoring and administration. Once this module has processed its requests, it sends them to the IPP module which performs Uniform Resource Identifier (URI) validation to prevent a client from sidestepping any access controls or authentication on the HTTP server. The URI is a text string that indicates a name or address that can be used to refer to an abstract or physical resource on a network.
The scheduler allows for classes of printers. Applications can send requests to groups of printers in a class, allowing the scheduler to direct the job to the first available printer in that class. A jobs module manages print jobs, sending them to the filter and backend processes for final conversion and printing, and monitoring the status messages from those processes.
The CUPS scheduler utilizes a configuration module, which parses configuration files, initializes CUPS data structures, and starts and stops the CUPS program. The configuration module will stop CUPS services during configuration file processing and then restart the service when processing is complete.
A logging module handles the logging of scheduler events for access, error, and page log files. The main module handles timeouts and dispatch of I/O requests for client connections, watching for signals, handling child process errors and exits, and reloading the server configuration files as needed.
Other modules used by the scheduler include:
  • the MIME module, which handles a Multipurpose Internet Mail Extensions (MIME) type and conversion database used in the filtering process that converts print data to a format suitable for a print device;
  • a PPD module that handles a list of Postscript Printer Description (PPD) files;
  • a devices module that manages a list of devices that are available in the system;
  • a printers module that handles printers and PPDs within CUPS.

How to configure printer server in Linux

Linux uses the Common UNIX Printing System, also known as CUPS. CUPS uses the Internet Printing Protocol (IPP) to allow local printing and print sharing. The /etc/cups/ directory stores all the configuration files for printing. However, these files can be easily managed with the Printer Configuration Tool in Linux.
Exam question Raw (Model) printer named printer1 is installed and shared on 192.168.0.254. You should install the shared printer on your PC to connect shared printer using IPP Protocols.
Exam question Raw printer named printerx where x is your station number is installed and shared on server1.example.com. Install the shared printer on your PC to connect shared printer using IPP Protocols. Your server is 192.168.0.254.
Before you can use any printer, you first have to install it on a Linux system on your network. To start the Printer Configuration Tool, go to the System menu on the top panel and select Administration, Printing or execute the commandsystem-config-printer.
printer path
If no printers are available for the system, only the Server Settings view is available for selection. If local printers are configured, a Local Printers menu will available.

Install new printer

click New Printer on the toolbar.
new printer
In the dialog window that appears, accept the default queue name or change it to a short, descriptive name that begins with a letter and does not contain spaces. Then select printer from list and click on forward and click on finsh.
spool directories
When your system prints a file, it makes use of special directories called spool directories. The location of the spool directory is obtained from the printer's entry in its configuration file. On Linux, the spool directory is located at/var/spool/cups under a directory with the name of the printer.
print job
A print job is a file to be printed. When you send a file to a printer, a copy of it is made and placed in a spool directory set up for that printer.
classes
CUPS features a way to let you select a group of printers to print a job instead of selecting just one. That way, if one printer is busy or down, another printer can be automatically selected to perform the job. Such groupings of printers are calledclasses. Once you have installed your printers, you can group them into different classes.
Once you have successfully installed local printer it will show in right pane. and in left pane you can see all administrative options.
printer option
  • To view shared printer on other system Tick mark on first option
  • To share locally attached printer tick mark on second option
  • To allow remote administration of this printer check mark on third option
Tick mark on appropriate option and click on apply
share printer from server

configure window clients

Go on window system and ping from printer server and open internet explorer and give the ip address of server with printer port 631 
internet explorer
This will launch CUPS web application click on manage printer 
manage printer
now you will see the shared printer on server click on print test page 
print test page
A test page will be send on printer server copy this url of printer 
copy url
click on start button select printer and fax and click on add new printer. this will launch add new printer wizard clicknext on welcome screen and select network printer
network printer
On this screen select internet printer and paste the url which you copied from internet explorer 
internet printer
Install appropriate driver from list or use have disk option you have drive cd and click next. On next screen set this printerdefaults and click on next and finish
set defaults

Remote administration of print server

Go on linux system and ping from server and click on printing from administration menu
printer path
Now click on go to server 
go to printer server
Now give print server ip address 
ip address of print server
It will take few minute to connect from server depending on network speed
connecting
Now give root password to connect printer server 
root password
you can see all print administrative Manu in right pane Once you have connected with sever 
print server options

configure Linux clients

Go on linux system and ping from server and click on printing from administration menu
printer path
Now click on new printer 
new printer
Click on forward In the next New Printer screen, select the type of connection to internet printing protocols and in hostname give server ip and printer name in printername 
select ipp
select the appropriate model. If multiple drivers are available, select the one most appropriate for your configuration. If you do not want to choose the default and click forward and finish. The main Printer Configuration window should now include the name of your printer.
make default
To print test page click on print test page and a test page will send to print server 
print test page

Managing Printers from the Command-Line

The lpadmin command enables you to perform most printer administration tasks from the command-line.
lpadmin
 lpc To view all known queues
 lpr To send print requests to any local print queue 
 lpq To see the print queue  
lprm To delete the jobs of your choice use it with the job number 
 lp To print any file. 
lpadmin


No comments:

Post a Comment