Operating System - HP-UX
1822151 Members
4115 Online
109640 Solutions
New Discussion юеВ

Setup LPR Printer HPUX 11i

 
Colin Berg
New Member

Setup LPR Printer HPUX 11i

I am migrating from a HP3000 background thus some help would be appreciated.

I have successfully setup some printers via jetdirect.

I have a forms overlay package on a W2K server which listens on port 515 for data coming in via the LPR/LPD (Port 515). I have created a printcap file file as below :

MISP32
:lp=
:rm=192.1.1.250
:rp=MISP32
:lf=/usr/spool/lpd/MISP32_text.log:
:sd=/usr/spool/lpd/MISP32_text
MISEOD
:lp=
:rm=192.1.1.250
:rp=MISEOD
:lf=/usr/spool/lpd/MISEOD_text.log:
:sd=/usr/spool/lpd/MISEOD_text

(192.1.1.250 is the IP address of the W2K server)

I have created directories under the /usr/spool/lpd for each printer, changed the ownership & group.

when I print via :
lpr printer_name file_name it always goes to the jetdirect printer I have configured as lp instead of the W2K.

What am I doing wrong.

Thanks
Wine is Life
3 REPLIES 3
John Poff
Honored Contributor

Re: Setup LPR Printer HPUX 11i

Hi Colin,

Pardon my slow old brain, but I'd like to make sure I understand your layout. You are running on an HP box running 11.11. You have setup an HP laser printer through JetDirect. You have also setup a remote printer pointing to a Windows 2000 box (which is actually running some software emulating a printer). When you try to print from your HP box, using 'lpr' and specifying the emulated printer on the W2K box, the HP prints to the LaserJet defined in JetDirect.

Is that right? If so, I have a couple of questions. You say you are using 'lpr' to print from HP, but wouldn't you be using 'lp' instead? I looked on one of my boxes running 11.11 and I don't have an /etc/printcap file. Are we sure we are talking about the same thing? I apologize if I have misunderstood your question.

JP
Jeff Schussele
Honored Contributor

Re: Setup LPR Printer HPUX 11i

Hi Colin,

I'm with John. I haven't seen/used printcap since my old SCO days.
With HP there's two ways to define a remote printer:

1) Using the GUI sam:
/usr/sbin/sam -> Printers and Plotters -> LP Spooler -> Printers and Plotters -> Actions -> Add Remote Printer/Plotter
Printer name => The name you'll use locally
Remote System Name => hostname or IP of remote system
Remote Printer Name => the ptr or queue name on remote system
Then click OK & off you go.

2) Command line:

/usr/sbin/lpadmin -plocal_name -v/dev/null -mrmodel -ocmrcmodel -osmrsmodel -ob3 -ormremote_system_name -orpremote_queue_name

enable local_name
accept local_name

You must have somehow designated the jetdirect IP when you set the printer up initially. AND/OR verify that the jetdirect card is not set to 192.1.1.250 as it may "catch" the lp job before the W2K box does.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Bill Hassell
Honored Contributor

Re: Setup LPR Printer HPUX 11i

I think I can clear this up. HP-UX is a SysV Unix system and uses lp for printing. There is no printcap as that belongs to a BSD Unix flavor. So if you did create a printcap file, it doesn't mean anything on HP-UX.

Now, JetDirect printers are actually print servers, just like Win2K. If the printcap file is on the Win2K system then you don't use JetDirect to setup the printer because you want the Win2K system to do the forms overlay and send the result to the printer. JetDirect on HP-UX connects direct to the printer.

To send a print job to the remote Win2K box, you'll need to run SAM and setup a emote printer, not a network printer.


Bill Hassell, sysadmin