LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Help configuring lpd and printcap (https://www.linuxquestions.org/questions/linux-software-2/help-configuring-lpd-and-printcap-688434/)

Nabu 12-04-2008 10:03 PM

[Solved] Help configuring lpd and printcap
 
I am running RH 6.2 and I am having a problem getting lpd to print to a HP networked printer.

I think it may be permissions related and as far as I know cups is not being used (ps aux |grep cup returns nothing).

The printcap file looks like this:
##PRINTTOOL3## REMOTE TEXT NAxNA a4 {} TextPrinter Default {}
Q5:\
:lp=:\
:sd=/var/spool/lpd/Q5:\
:rm=10.1.1.12:\
:rp=text:\
:mx#0:\
:sh:

lpd looks to be running as root (ps aux returns root in the first column)
The spooler directory permission (var/spool/lpd/Q5) is 777 root:lp
The files that are created in that queue have: 660 bin:lp or 660 root:lp

lpc status returns:
Q5:
queuing is enabled
printing enabled
12 entires in spool area
waiting for 10.1.1.12 to come up

The printer (which is a HP with a DirectJet built-in) is confirmed to be on-line with paper loaded.
A windows workstation can print to the printer through the network.

If I submit a job with lpr -P Q5 text.txt is just adds to the queue.

/var/log/messages doesn't show up any errors...

Is there anywhere else I can look for clues in resolving this?

Thanks in advance.

N.

Nabu 12-10-2008 12:46 AM

Ok still no success, however I have done some more testing.

I know the printer that I am trying to print to uses port 9100, as I can telnet from the RH server: telnet 10.1.1.12 9100

I can enter various strings of text,etc. and the page will print.

Is there a way to tell lpd to use port 9100 in the printcap configuration file? Perhaps it is using port 515...

N.

Nabu 12-17-2008 01:34 AM

[Solved]

In the end, port 515 (lpr) is not available on the HP printer, which is what lpd uses by default.
You specify an alternate port (9100 in this case) with the lp option and remove the rm option in the printcap file as follows:

##PRINTTOOL3## REMOTE TEXT NAxNA a4 {} TextPrinter Default {}
Q5:\
:lp=9100@10.1.1.12:\
:sd=/var/spool/lpd/Q5:\
:rp=Q5:\
:mx#0:\
:sh:


Thanks for listening..

N.


All times are GMT -5. The time now is 07:30 PM.