Sample Header Ad - 728x90

How to reconcile lpstat -s output with lpr invocations

0 votes
1 answer
178 views
I have a question about lpstat on FreeBSD-12.2. Specifically, I cannot see the relationship between he output of lpstat and the printer name actually required by lpr. For example. I run lpstat -t and see this: lpstat -t scheduler is running system default destination: NP4172.HAMILTON.HARTE-LYNE.CA device for CUPS_PCL3_to_File_jbb: /var/spool/cups-pdf/pcl3/cups_to_pcl3.prn device for laserIII_PCL: /var/spool/cups-pdf/byrnejb_hll/laseriii.pcl device for NP4172.HAMILTON.HARTE-LYNE.CA: socket://192.168.216.52 device for NP4173.HAMILTON.HARTE-LYNE.CA: socket://192.168.216.53 device for NP4174.HAMILTON.HARTE-LYNE.CA: socket://192.168.216.54 device for Virtual_PDF_Printer: cups-pdf:/ CUPS_PCL3_to_File_jbb accepting requests since Wed May 5 11:21:40 2021 laserIII_PCL accepting requests since Fri May 21 16:13:32 2021 NP4172.HAMILTON.HARTE-LYNE.CA accepting requests since Mon Jun 14 14:15:06 2021 NP4173.HAMILTON.HARTE-LYNE.CA accepting requests since Mon Jun 14 16:12:44 2021 NP4174.HAMILTON.HARTE-LYNE.CA accepting requests since Fri Jun 11 16:16:28 2021 Virtual_PDF_Printer accepting requests since Mon Apr 12 12:42:45 2021 printer CUPS_PCL3_to_File_jbb is idle. enabled since Wed May 5 11:21:40 2021 printer laserIII_PCL is idle. enabled since Fri May 21 16:13:32 2021 printer NP4172.HAMILTON.HARTE-LYNE.CA is idle. enabled since Mon Jun 14 14:15:06 2021 printer NP4173.HAMILTON.HARTE-LYNE.CA is idle. enabled since Mon Jun 14 16:12:44 2021 printer NP4174.HAMILTON.HARTE-LYNE.CA is idle. enabled since Fri Jun 11 16:16:28 2021 printer Virtual_PDF_Printer is idle. enabled since Mon Apr 12 12:42:45 2021 NP4172.HAMILTON.HARTE-LYNE.CA-528 root 0 Tue Jun 15 09:09:28 2021 But the printer **NP4172.HAMILTON.HARTE-LYNE.CA** is not actually recognized by lpr: lpr -P NP4172.HAMILTON.HARTE-LYNE.CA info.txt lpr: NP4172.HAMILTON.HARTE-LYNE.CA: unknown printer If I do this: lpr -P np4172 info.txt then the the file is spooled and printed. However if I do this I get the unknown printer error: lpr -P NP4172 info.txt lpr: NP4172: unknown printer This host system uses CUPS. I have the /etc/printcap file configured for lpd and the CUPS version of lpd is running (as is shown in the output of lpstat -t). The printer name np4172 is in /etc/printcap and this no doubt is where lpr is checking. But this essential information is apparently not readily found using the expected tools. This has me confused. If I want to find the actual printer names available on a host then what is the command to reveal the real printer names that lpr will accept?
Asked by James B. Byrne (125 rep)
Jun 15, 2021, 01:31 PM
Last activity: Jun 15, 2021, 07:23 PM