Common Unix Print System (CUPS) Operation

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
no matter what operating system you're using probably one of the most important services it offers is the ability to send print jobs to a printer if you don't believe me just go and unplug your office printer for about an hour and observe what happens ok don't really do that because your co-workers will probably inflict bodily harm upon you if you do the point is is that printing is vital to most users and because of this you need to be very familiar with how Linux printing works now the most common Linux printing system in use today is the common UNIX printing system or we just call it cups cups was designed from the ground up to makes Linux printing as easy as possible whether you're printing to just a locally attached printer like through a USB or parallel port connection or whether you're printing to a remote network printer now the cups service is provided by the cups Dee daemon and one of the cool things that cups Dee can do is announce the availabilities of all the printers that it services out on the local network segment and this is cool because cup client systems can actually listen for these announcements and that allows an individual user somewhere on the network to select the printer that he or she wants to print to without having any networking knowledge they just see the printer they select it and they send the print job they don't have to set it up now the cups daemon provides Network printing using the internet printing protocol or IPP which runs on IP port 631 the cup system itself is composed of several different parts the first one is the cup scheduler which is really just a web server and its job is to handle these IPP printing requests that come in over the network from cups client now in addition to processing print jobs the cup scheduler also functions as a web server which is what it is it provides cups documentation and it also provides a web-based cups administration tool the next component that you need to be familiar with are the cups filters now in order to understand what a cups filter is you need to be familiar with the concept of a page description language or PDL now a PDL is used by most modern printers to define print jobs here's the key thing that you need to understand in a linux system almost all applications running on linux will generate print jobs using Adobe's PostScript PDL or PS now this configuration works great if you have a postscript compatible printer however not all printers include PostScript support because of the fact that if the printer does then the printer manufacturer has to pay a licensing fee to Adobe which increases the price of the unit which is the reason why I don't actually own a postscript compatible printer as a result most printer manufacturers actually define their own PD LS for example hewlett-packard printers use the printer control language or PCL which is a form of a PDL other manufacturers like Epson use the escape P PDL well why do we care because if your printer isn't PostScript compatible and there's a high probability that your printer is not PostScript compatible then what you have to do is use a cups filter to convert print jobs from the default PostScript PDL that's used by most Linux applications into the appropriate PDL of the printer to which they're being sent that's what a cups filter does and these filters are stored in the slash USR slash live slash cup slash filter directory on your Linux system basically this allows the Adobe print jobs that are being generated by the applications on your system to work with just about any printer that you purchase on the market now the next component that you need to be familiar with are the cups back ends now back ends are responsible for providing an interface between this cup scheduler up here and the actual printer hardware your cups back ends are located in slash USR slash slash cup slash backends because there are different types of printer interfaces that are used to connect printers to the system we need a different back-end for each one cups provides backends for printer interfaces such as parallel serial USB and so on the important thing to remember is that every time the cups daemon starts it queries each back-end installed on the system and each back-end responds to the daemon reporting whether or not it's got a printer connected to it if a printer is connected they report information about that printer such as its make and it's model and by doing this the cups daemon has the information that it needs to send print jobs to that printer the next cups component that you need to be familiar with are the PPD files that stands for PostScript printer description now PPD's are used by the cups D daemon to determine what the capabilities are for a particular printer that's connected to a printer interface on the system for example cannot print in color can it print duplex printing on both sides of the paper and so on these PPD files are stored in the /xe slash cup slash PPD directory the last cups component that you need to be familiar with is the web-based administration utility remember we said earlier that the cups scheduler provides the web-based administrative interface this administration utility can be used to set up printers it can be used to manage print jobs on most printers and so on to access the cups web-based administration utility on your system open up a web browser and then navigate to the URL you see here HTTP colon forward slash forward slash followed by the server's IP address or its DNS name colon 631 remember that the scheduler uses the IPP protocol which uses port 631 by default if you're accessing the cups administration interface from the same system where the cups daemon is running then it should have no problem in fact you could just use localhost instead of the server IP address but if you're trying to access the web-based administration utility from a different system over the network then you need to make sure that port 631 is open in the host-based firewall otherwise remote hosts aren't going to be able to connect to the scheduler and access the administration interface so now that you're familiar with all the different components that are required for cups printing to work let's talk about how they work together when a print job is submitted first an application running down here on the client system generates a print job and it sends it to the cups D daemon on the server now because the printer might be busy or the cups T daemon might be receiving multiple jobs at the same time instead of sending the print job directly to the printer what cups D will do is actually save that print job to a directory called the spooling directory on the hard disk drive basically it queues it up so that when the printer is available the next job would be processed and when that jobs done the next job will be processed and so on now by default this print queue is slash var slash slash cups this is where the print jobs are saved waiting for the printer to be available so when the printer is ready and it's time for the print job to actually be printed the cups tea daemon is going to send the print job to the appropriate filter that we talked about earlier so that that print job can be converted to the appropriate PDL for the printer down here once that's done the converted print job is sent from the filter to the back end which remember is just the interface that that printer is connected to the back end will then forward the job on to whatever printer is connected to that interface after sending the print job to the printer the back end will notify the cups T daemon that the print job was sent and so cup ste will then find the print job in the queue over here and delete it but it's already been sent to the printer we don't need it saved on the hard drive anymore that's it for this lesson in this lesson we introduced you to printing on linux using the cups daemon we reviewed how cups works and we also listed the various components that are used by the cups daemon to send print jobs to a printer
Info
Channel: The Linux Man
Views: 10,550
Rating: 4.9431281 out of 5
Keywords: Linux
Id: jdQfHEwrAkw
Channel Id: undefined
Length: 8min 37sec (517 seconds)
Published: Thu Nov 24 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.