In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to configure a network printer and scanner on the ubuntu desktop". In daily operation, I believe many people have doubts about how to configure a network printer and scanner on the ubuntu desktop. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "how to configure a network printer and scanner on the ubuntu desktop"! Next, please follow the editor to study!
Network environment
In this installation tutorial, the IP address of our server (Debian Wheezy version 7.2) is 192.168.0.10, and the IP address of our client (Ubuntu version 12.04) is 192.168.0.105. Note that the two machines are on the same network segment (192.168.0.0amp 24). If we want to allow the printer to access other network segments, we need to modify the following parts of the cupsd.conf file on the server:
Order allow,deny Allow localhost Allow from XXX.YYY.ZZZ.*
In the above example, we grant the printer access to the printer locally or on any system whose IPv4 address starts with XXX.YYY.ZZZ.
To verify which printers work on our server, we can also use the lpstat command on the server, or browse the web page https://192.168.0.10:631/printers page.
Root@debian:~# lpstat-aEPSON_Stylus_CX3900 accepting requests since Mon 18 Aug 2014 10:49:33 AM WARSTPDF accepting requests since Mon 06 May 2013 04:46:11 PM WARSTSamsungML1640Series accepting requests since Wed 13 Aug 2014 10:13:47 PM WARST
Install a network printer on the Ubuntu desktop
In our Ubuntu 12.04 client, we will open the Printing menu (Dash-> Printing). You will notice that this name may be a little different in other distributions (for example, it will be called "Printers" or "Print & Fax"):
No printer has been added to our client:
Here are some steps to install a network printer on the Ubuntu desktop client.
1) the "Add" button brings up the "New Printer" menu. We will select "Network printer"-> "Find Network Printer" and enter the IP address of our server, then click "Find":
2) at the bottom we will see the name of the printer that can be used. Let's select this Samsung printer and press "Forward":
3) We will be asked to fill in some information about our printer. When we finish typing, we will click the "Apply" button.
4) We will next be asked whether to print a test page. Let's click "Print test page":
This print task will be created as local id 2:
5) using the CUPS network excuse on our server, we can observe that the print task has been submitted successfully (printer-> SamsungML1640 series-> show completion of the task):
We can also display the same information by running the following command on the printer server:
Root@debian:~# cat / var/log/cups/page_log | grep-I samsungSamsungML1640Series root 27 [13/Aug/2014:22:15:34-0300] 11-localhost Test Page-- SamsungML1640Series gacanepa 28 [18/Aug/2014:11:28:50-0300] 11-192.168.0.105 Test Page-- SamsungML1640Series gacanepa 29 [18/Aug/2014:11:45:57-0300] 11-192.168.0.105 Test Page--
This page_log log shows the information printed on each page, including only which users sent these print tasks, the print date & time, and the client's IPv4 address.
To install Epson inkjet and PDF printers, we only need to repeat steps 1-5 and select the print queue on the left each time. For example, select the PDF printer in the following figure:
However, notice that according to the CUPS-PDF document, according to the default:
The PDF file will be placed in a subdirectory named by the owner of the print job. In this case, the owner of the print job cannot be identified (i.e. Will not exist in the server) the output is placed in a file that operates anonymously.
These default folders can be modified by changing the out value and the AnonDirName variable in the / etc/cups/cups-pdf directory. Here, ${HOME} is extended to the user's home directory:
Out ${HOME} / PDFAnonDirName / var/spool/cups-pdf/ANONYMOUS
Network print instance
Example # 1
Print from Ubuntu12.04, usually locally using gacanepa (stored on the printer server with the same name).
After printing to the PDF printer, let's check the contents of the / home/gacanepa/PDF directory on the printer server:
Root@debian:~# ls-l / home/gacanepa/PDFtotal 368 RW-1 gacanepa gacanepa 279176 Aug 18 13:49 Test_Page.pdf-rw- 1 gacanepa gacanepa 7994 Aug 18 13:50 Untitled1.pdf-rw- 1 gacanepa gacanepa 74911 Aug 18 14:36 Welcome_to_Conference_-_Thomas_S__Monson.pdf
When the PDF file was created, the permission was set to 600 (- rw-), which means that only the owner of the print task (in this case, gacanepa) can access them. We can change this behavior by changing the value of the UserUMask variable in the the / etc/cups/cups-pdf.conf file. For example, a umask value of 0033 would give PDF printers and other owners permission to create files, but read-only permissions would also be granted to other owners.
Root@debian:~# grep-I UserUMask / etc/cups/cups-pdf.conf### Key: UserUMaskUserUMask 0033
For those who are not familiar with umask (named user file creation pattern mask), it can be used as a group to control those who modify the default permissions when creating new files. Given a specific umask value, the bitwise Boolean AND operation is performed between the basic permissions of the file (0666) and the bitwise complement of the umask when calculating the permission of the final file. Therefore, if you set a umask value of 0033, the default permission for the new file will not be the value of (0033) AND 0666 = 644 (the file owner has read / write / execute permission, others have read-only permission).
Example # 2
Printing is performed on Ubuntu12.04, and the local login user is jdoe (the same account name but does not exist on the server).
Root@debian:~# ls-1 / var/spool/cups-pdf/ANONYMOUStotal 5428 root@debian:~# ls-1 nobody nogroup 5543070 Aug 18 15:57 Linux_-_Wikipedia__the_free_encyclopedia.pdf
This PDF was created with 666 (- rw-rw-rw-) permissions, which means that everyone can access them. We can change this behavior by editing the AnonUMask value in the / etc/cups/cups-pdf.conf file.
At this point, you may wonder why most (but certainly not all) current Linux desktop distributions have a "print to file" feature built in to allow users to create PDF files dynamically with the same network printer installed.
Using a network PDF printer has the following benefits:
A network printer (of any type) allows you to print directly from the command line without having to open the file first.
Install a network client and a spare PDF network printer on other operating systems, so the system administrator no longer needs to install the PDF Creator utility separately (and avoids the risk of end users installing these tools).
Network PDF printers allow you to print a network share directly with configuration permissions, as we have seen in the example.
Install a network scanner on your Ubuntu desktop
Here are some steps for installing and accessing a network scanner through the Ubuntu desktop client. Assume that the network scanner server has been started and running the here.
1) Let's first check to see if there is a scanner available on our Ubuntu client host. Without the previous installation, you will see the message "not recognized by the scanner." $scanimage-L
2) now we need to enable the saned process to preinstall the Ubuntu desktop. To enable it, we need to edit the / etc/default/saned file and set the RUN variable to yes:
$sudo vim / etc/default/saned# Set to yes to start sanedRUN=yes
3) Let's edit the / etc/sane.d/net.conf file and add the server IP address after the scanner is installed:
4) restart the saned process:
$sudo service saned restart
5) now let's see if the scanner is available:
Now we can open the "Simple Scan" (or other scanning tool) and start scanning the file. We can rotate, trim, and save the resulting picture:
At this point, the study on "how to configure a network printer and scanner on the ubuntu desktop" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.