The lab printer is no longer available !!

Source: Internet
Author: User

Yesterday, my sister-in-law told me that the printer in the lab was broken and I couldn't accept any print tasks! I tried it myself. It was really depressing that I couldn't send a print task from my machine to a printing server. I used to have a hard time doing this, the hateful HP larserjet 1020 does not have a standard driver in Linux, and other drivers will always cause problems!

My previous practices are as follows:

  • Reload the printer driver once. The result is no.
  • Restart the machine once, but the result still does not work.
  • Power down the printer, and re-unplug the USB interface!
  • Reinstall the printer driver and rename the printer queue. No, no.

It's crazy. After checking, I found that it's not a printer problem, because it can still be used on a Windows machine! This only shows that it is a problem with Linux. We also found that Linux crashes yesterday.

Currently, there are several options:

  • Continue on this platform

    • Many software and their configurations will not be lost
    • Many user data is stored in
  • Experiment with the printer driver on other Linux machines to see if it is a problem with the printer or the driver.
    • Minimize workload
  • Reinstall the system
    • You can better plan the installation of servers, and do not install services and drivers that you do not need, such as sound card drivers and lvms.
    • However, many software configurations are lost (you can back up the original data to avoid some of them)
    • I don't know if it will work well after I reinstall it!

I decided not to continue with the original platform. I had to pay for the old noisy, but it was a waste of time. Yesterday I got more than four in the morning. First I tried the second solution, it is impossible to reinstall the system, or it may take less time to reinstall the system.

Finally a little progress on this solution, follow the steps on this website http://foo2zjs.rkkda.com/, download a driver, reinstall it on the server (delete the original one before that), and restart the CUPS service to print it. What is better than the original one is that it can be printed on Linux servers, but it cannot be printed!

The specific cause is the printer driver problem. In login don't use the foo2zjs package from Ubuntu, Suse, Mandrake, Debian, RedHat, Gentoo, or ideainformatica.com! ", And I downloaded it on the ideainformatica.com website, so it is not surprising that there is a problem.

But now another problem occurs: the Linux machine can be printed, but the Windows client can be connected to the Linux server, but it cannot be printed at this time! Since there is no problem with the printer itself, it must be a problem with permission settings. There are two possibilities: Samba and printing service cups settings.

  • Samba Configuration

In samba, the configuration related to the print service is mainly in the two domains [Global] and [printers]. The specific configuration options are as follows (Note: Only print-related options are provided here, there are many other configuration options ):

[Global]
Hosts allow = 10.20.10., 192.168.1., 192.168.2., 127. <-- set the accessible range.
Cups Options = raw <-- set cups to print raw text
Printcap name =/etc/printcap <-- set the file where the printer configuration is located
Load printers = Yes
Printing = cups <-- set the Print Service to CPUs
Security = user <-- Security Level: Share, user, server, doman
Encrypt passwords = Yes <-- encrypt the password?
SMB passwd file =/etc/samba/smbpasswd <-- location of the password file

[Printers]
Comment = all printers
Path =/var/spool/samba
Read Only = No
Public = Yes <-- allows the Guest user to print
Guest OK = Yes
Printable = Yes
Browseable = No

When configuring permissions, If you configure share, it will be interesting. In Windows, find the printer on the remote Linux server through the network neighbors, you will see the information of all the documents printed by the printer before. At what time did anyone print anything? What should you do if you don't want others to see this? Delete the print record file. I don't know where it was at the beginning. I am tired of getting started, and finally I know that all the print records are named by the name of the printer: printer_name.tdb is placed under/var/Cache/samba/printing/. If you do not want to expose the print information of the printer, delete the corresponding file.

After the permission is set to share, it still does not work. I don't know what's wrong !!!, Depressed !!

  • Cups Configuration

It may be a problem with cups, but I still don't know how to modify the configuration.

........................

At the last moment, I forgot what I modified. It's easy now. Let's get the samba configuration file.

# Global Parameters
[Global]
Workgroup = hpcog
Server String = % H print + NAT Server
Log File =/var/log/samba/% m. Log
Max log size = 50
Socket Options = tcp_nodelay so_rcvbuf = 8192 so_sndbuf = 8192
DNS proxy = No
Idmap uid = 16777216-33554431
Idmap gid = 16777216-33554431
Hosts allow = 10.20.10., 192.168.1., 192.168.2., 127.
Cups Options = raw
 
[Homes]
Comment = Home Directories
Path =/home/% u
Read Only = No
Create mask = 0664
Browseable = No
 
[Printers]
Comment = all printers
Path =/var/spool/samba
Read Only = No
Guest OK = Yes
Printable = Yes
Browseable = No

In addition, use the printfconf-tui or printfconf-GUI tool to share your printer and allow access from some hosts.

After these two days of hard work, I felt that there is still a short way to go for Linux in terms of ease of use, and some hardware vendors are not very good at Linux support, if there is no standard (or widely used) Linux driver, try not to use it in Linux. Otherwise, the light driver problem is enough for you, just like me, because HP larserjet 1020 does not have a standard driver in Linux, it's just a bit confusing. Now, with a good foo2zjs driver, the situation is better. Alas, a long journey!

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.