Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 ?

share|improve this question
    
Can you provide the OS details and version (e.g. Red Hat 5.7)? –  ewwhite Feb 27 '12 at 13:32
    
Linux version 2.6.9-78.0.8.ELsmp (Red Hat 3.4.6-10)) –  Datapimp23 Apr 23 '12 at 11:46

2 Answers 2

up vote 1 down vote accepted

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.

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

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
share|improve this answer
    
cups-bsd -This package provides the BSD commands for interacting with CUPS: /usr/bin/lpqa /usr/bin/lpr /usr/bin/lprm /usr/sbin/lpc –  Martin Dufka Nov 30 '12 at 21:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.