6

I have a cups server with one shared printer configured on it. It prints test pages without problems.

printername (Idle, Accepting Jobs, Shared)
Description:    desc
Location:   
Driver: Zebra ZPL Label Printer (grayscale, 2-sided printing)
Connection: socket://172.20.50.26
Defaults:   job-sheets=none, none media=oe_w288h432_4x6in sides=one-sided

This is the output from lpstat -t. it shows that the printer is idle and accepting requests

admin@SERVER:~$ lpstat -t
scheduler is running
no system default destination
device for printername: socket://172.20.50.26
printername accepting requests since Thu 26 Jan 2012 01:29:35 PM CET
printer printername is idle.  enabled since Thu 26 Jan 2012 01:29:35 PM CET

Now when I want to send a printjob to it via an LPR command it won't recognize the printer

/usr/bin/lpr -P printername test.pdf

Result

lpr: ttn_seg_zebra1: unknown printer

What am I missing here ?

2
  • Can you provide the OS details and version (e.g. Red Hat 5.7)?
    – ewwhite
    Commented Feb 27, 2012 at 13:32
  • Linux version 2.6.9-78.0.8.ELsmp (Red Hat 3.4.6-10))
    – Datapimp23
    Commented Apr 23, 2012 at 11:46

2 Answers 2

3

Your printer's name, according to lptstat output is literally "printername".

Running lp -d printername test.pdf or lpr -P printername test.pdf will work.

For example, here's the output from a running system:

[root@Smack ~]# lpstat -t
scheduler is running
no system default destination
device for label: socket://label:9100
device for upstairs: socket://upstairs:9100
label accepting requests since Mon Feb 27 05:18:45 2012
upstairs accepting requests since Mon Feb 27 06:31:23 2012

In this, I have two printers defined; label and upstairs. In order to print to them, I'd have to use those names on the lp/lpr command line.

4
  • I edited my original post. The printername is printername in the LPR command.
    – Datapimp23
    Commented Feb 27, 2012 at 13:39
  • lp -d printername test.pdf works indeed. Guess I need to do some reading on the difference between lp,lpr, ....
    – Datapimp23
    Commented Feb 27, 2012 at 13:42
  • So that fixed it? Which OS/distribution are you on?
    – ewwhite
    Commented Feb 27, 2012 at 14:08
  • Ubuntu Server 11.10
    – Datapimp23
    Commented Feb 27, 2012 at 14:28
13

Per comment below:

Install cups-bsd instead of lpr. Cups-bsd contains its own lpr binaries.

This package provides the BSD commands for interacting with CUPS:

 /usr/bin/lpqa 
 /usr/bin/lpr 
 /usr/bin/lprm 
 /usr/sbin/lpc
2
  • 1
    cups-bsd -This package provides the BSD commands for interacting with CUPS: /usr/bin/lpqa /usr/bin/lpr /usr/bin/lprm /usr/sbin/lpc Commented Nov 30, 2012 at 21:17
  • install: sudo apt-get install cups-bsd
    – user379048
    Commented Oct 4, 2016 at 14:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .