Linux Demo: Configuring a CUPS Printer

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this demo we're going to configure the cups printing service that's running on this Linux system to first of all provide a local printer that I can send print jobs to locally and then to also share that printer on the network so other computers can send print jobs to this computer's printer over the network connection now the first thing I do need to do is make sure that the cups package has been installed on this system so to do this I'll use the RPM command using the dash Q I option and the name of the package is just cups hit enter and we see that cups is in fact installed so the next thing we need to do is make sure that it's actually running to do this we'll use the system control command status and then the name of the services cups and we see that it is up and running as status is active so at this point we need to configure several configuration steps before we can actually start sending print jobs now the cup service itself is configured using a file in the slash Etsy directory and then within Etsy there is a subdirectory called cups enter do an LS command and here you can see a file named cups decomp so let's go ahead and load the cups d.com file and our VI editor now if we come down here notice that it is configured with browsing turned on which essentially is noted I here shares any printers we define on our local network this allows other systems on our network to see the printer and then to send print jobs to it and that's great but we do have one problem up here that will not let that work very well and this is the listen directive here that specifies localhost 631 with this configuration as it is it will only listen for connections that are coming from the local machine so if we want other printers on the network to be able to send print jobs to this machine we actually have to add an additional directive listen and this time we're going to enter in the IP address of the ethernet interface in this system which happens to be 10 dot 0 dot 0 dot 136 and then we have to specify the IPP port which is 631 and I will point out as well that in order for this to work port 631 has to be opened in the firewall of this system otherwise it'll reject any connection requests that come on that port and I've already done that so we don't have to worry about it here but be aware that if you're having printing problems over the network and the other systems can't seem to see the print queues that you defined that are being run by your cups daemon then probably the first place to check is your firewall config and make sure that port 631 is open I'm gonna go ahead and exit let's save my changes now of course I do need to restart the cups daemon make these changes take effect the restart cups command with system control and let's do a quick status to make sure everything's working the way it's supposed to and we are good no error message is displayed and the status is active so at this point the cups daemon is running but we have not yet configured any printers on the system we need to find a printer you essentially are defining a print queue that print jobs can be sent to now you can do this manually if you want to there's a file right here called printers comp in the slash SD / cups directory and if you have a mind to do so you can edit that file and add printers with a text editor it's actually a lot easier just to use the web-based interface that cups provides let's go ahead and do that so we need to launch Firefox now in order to bring up the cups configuration interface we use a URL of HTTP colon forward slash localhost colon 631 so this is the cups configuration interface so in order to add a new print queue to the system we go to the administration tab on the administration tab I'm going to click on add a printer and we're going to use a printer that's currently connected to my parallel port I'll mark that option and click continue now I need to define a name for that printer now this is a very important parameter because this is essentially defines the print queue where the print jobs are going to be saved this is where local print jobs will be sent and if somebody tries to connect to this printer over the network this is the print queue that they're going to have to connect to it's just called HP LJ and for a description let's just call it an HP laser jet printer the next thing we have to do is define the manufacturer of the printer so we can load the appropriate driver now this is an HP printer so I'll come down to HP select it and then click continue now we have to specify the make and model of the printer will use this driver right here and then we'll click Add Printer if I had a driver file a PPD file that I wanted to use instead I would click browse and select that printer driver but I've already got the one that I need here so I will select add printer and now I can configure my default for that printer I can specify what size of paper I want to use for our purposes we'll select letter I can also select my default print out mode I can either do draft grayscale normal or high quality I set it to normal grayscale this is a color printer we probably don't want to use color printing on every single job that burns up the color cartridges really fast so by default it's going to print black and white and then if we need to print a color print out we'll manually select color printing we also have the option of using the duplexer I'm going to go ahead and leave the duplexing turned off so it'll only print on one side of the paper we'll set the default options and our default options have now been set and you can see that the printer is defined it's idle it's ready to accept jobs and it's currently not shared on the network as print jobs are created they'll appear down here under the jobs heading let's go ahead and create a print job I'll just do a ctrl P command here and we'll print the current page you can see here's the printer we just defined HP LJ go ahead and send the print job and if we get this fast enough I hit the reload key we should see the print job as it's being processed I wanted to I could actually cancel the job at this point or move it to a different print queue when we won't need to here I think if I get reload again we should see that the job has been processed and is out of the queue okay we've got a notification here that the print job has completed it's moved out of the queue and it's no longer listed notice I do have the option over here however to view completed jobs if I click that option I can see the job that's already been completed I can see what its status is this was completed at this time if I needed to I could actually send that job a second time so at this point I can send print jobs to my printer from my local system but I also want to be able to have network users send print jobs to this printer as well in order to do this I need to enable sharing now there's two different places I have to enable sharing first of all I have to share the printer itself let's go here under administration and click on modify printer we'll click continue here and we want to turn this option right here on share this printer click continue and we'll leave the current make and model set the way they are and we'll click on modify printer and the printer has been successfully modified notice now that a status appears changed to shared now I also need to come over here under administration under server settings I need to turn this option on - right now says share printers connected to the system that's great and we also need to allow printing from the internet I'll click change settings so we're good to go there we can actually send jobs to this printer but there is one other thing we need to do if I come back over here go over to my terminal window you'll notice that there is a configuration file here for another cups daemon called cups browse D right now we can send jobs to this printer if we know the IP address of the printer or DNS name and if we know the name of the queue we're okay however to make things easier we would like for our end-users using other systems on the network to be able to browse the network and see the printer because your average end-users not really going to know a whole lot about IP addresses and cue names so what we need to do is turn on browsing now the default configuration here in cups browse DS should work just fine but we do need to load the daemon so I'm going to use the system control command to start the cups - brows D Damon and let's check it make sure it loaded properly and everything looks good so at this point we have our printer defined and we've also loaded the cups browse d daemon which will allow the users on the network to be able to see all the print queues currently being serviced by the cups daemon on this system so at this point I'm going to go over to another Linux system on the network and see if I can connect to the HP LJ printer we defined so at this point I've logged in to another network system on my network it's a SUSE Linux system and I've opened up my ass control Center on the system and under Hardware if I come down to printer and click on it we see the remote printer now because of the way cups works cups is announcing on the network that this printer is available therefore I don't have to go out and try to find it because we enabled the cups browsing Damon we're able to find the printer automatically I select it I can click OK and now I can send print jobs to that printer over the network that's it for this demonstration and this demo we talked about configuring the cup service on a Linux system we first configured cups to support local print jobs and then we reconfigured that printer to share it on the network so that network users can also send print jobs to that printer
Info
Channel: The Linux Man
Views: 42,461
Rating: 4.9266057 out of 5
Keywords: Linux
Id: 1fmPglNYrY0
Channel Id: undefined
Length: 10min 43sec (643 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.