Operating System - HP-UX
1833059 Members
2688 Online
110049 Solutions
New Discussion

Local Printer Problems - HP-Ux

 
Bill Brutzman
Frequent Advisor

Local Printer Problems - HP-Ux

While I can otherwise print ok from my [UniVerse-Pick] database, the local printer is not in the main print queue and the command "lp -d pr0 print.test" causes merely a form feed. The file "print.test" is a vanilla file containing merely one page of ASCII text. Sending print.test to a laser printer with jet direct works fine. The printer is a legacy Printronix P300.

It is not clear to me why printer pr0 is not in our main print queue. It bothers me that the lp -d command does not work. Because I do not want to whack anything, I do not want to add it to the queue if a local printer does not belong there.

This box is an HP-9000 E45 running HP-Ux v10.01.

Suggestions would be appreciated.
10 REPLIES 10
jerry1
Super Advisor

Re: Local Printer Problems - HP-Ux

Was it setup with JetDirect or lpadmin or sam?

Look at the script in /etc/lp/interfaces/pr0

What does "lpstat pr0" give you.

What is listed with

find /etc/lp -name pr0

Can the printer pr0 be listed within hppi?

If it was setup with Jetdirect(hppi) then
make sure you are using the correct driver.
The software does not always have all of them. You have to download the others.


RAC_1
Honored Contributor

Re: Local Printer Problems - HP-Ux

lp -oraw -d pr0
Does it work??
How the print file looks like?? Just ascii data?? What if you print some other file??
There is no substitute to HARDWORK
Bill Brutzman
Frequent Advisor

Re: Local Printer Problems - HP-Ux

It is not JetDirect. It is a "standard" centronics printer cable from the HP box to the Printronix printer.

I do not know how it was setup originally. That was before my time here.
Bill Brutzman
Frequent Advisor

Re: Local Printer Problems - HP-Ux


1. The script in /etc/lp/interfaces/pr0 is
a file, 0 bytes in size.

2. "lpstat pr0" yields... "no entries"

3. cd /etc/lp
find . -name pr0 yields...

/member/pr0
this thing has...
/dev/c1t0d0_lp

4. I presume that I would need another
ARGUMENT with

lp -oraw -d pr0 PRINT.TEST

5. The attachment is just several rows of
abc...z 0123456789
Steve Steel
Honored Contributor

Re: Local Printer Problems - HP-Ux

Hi


The print script is 0 bytes

This is what does the work thus only a
carriage return from the spooler

vi /etc/lp/interface/pr0

:r /var/spool/lp/model/dumb
:wq

Try again


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Bill Brutzman
Frequent Advisor

Re: Local Printer Problems - HP-Ux


Upon trying "dumb" the P300 prints out...

xxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxx

pwget :option requires an argument --n
usage : pwget [-n name | -u uid]

Request id: Printer: dumb
Thu Mar 3 10:39:16 EST 2005

Upon trying "dumbplot" the P300 prints out...

/var/spool/lp/model/dumbplot[25] : test: Specify a parameter with this command.

I tried scaling back the "driver" file per the attachment.

Thanks to those who have responded. Further suggestions would be very much appreciated.

--Bill
Bill Brutzman
Frequent Advisor

Re: Local Printer Problems - HP-Ux

The "dumb" file is...
Bill Hassell
Honored Contributor

Re: Local Printer Problems - HP-Ux

Well, the interface file = 0 is definitely wrong. The lp -d (ain fact, ALL options to lp) must *not* have a space. It is the only subsystem in the SysV colletion that has this oddity. lp -dpr0 /etc/hosts should work OK. The **** pattern is the banner page from the dumb model script. And since the ***** pattern prints, then the Centronics interface and the printer are indeed working. The script errors are a bit strange since these dumb scripts have been around for years. The errors look like shell interpreter problems.

I would start with a check of the lp subsystem sofware using swverify. Someone may have tried to 'improve' HP-UX permissions and ownerships.

As far as a local parallel printer in with all the other printers, that's fine. Use lpstat -v to show all the printers and lpstat -t to report on more details. Try printing direct to the parallel device file using ux2dos as in:

dos2ux /etc/hosts > /dev/

If all that works, then delete and re-add the Printronix printer.


Bill Hassell, sysadmin
Bill Brutzman
Frequent Advisor

Re: Local Printer Problems - HP-Ux

The "driver" file that the UniVerse database uses is...

/var/spool/uv/PR0.drvr

In this file is...

slp -c132 -i0 -n <&1
cat -

man slp specifies that there are some incompatibilities between the spooler and slp.

slp is a way to specify parameters for a "non-serial" printer.

Thus, I hope to send print jobs to this "slp" printer from the newer hp-ux box here. It is not clear to me that it is possible or that this is the best way.
Bill Hassell
Honored Contributor

Re: Local Printer Problems - HP-Ux

Wow, I haven't seen any code use slp since the 1980's!!! slp was used long before model scripts were created and no, slp isn't the best way to print. The good news is that the /var/spool/uv/PR0.drvr can be replaced with something like this:

#/usr/bin/sh
cat - | lp -dpr0 -onb

Be sure that this new file is 755 permissions. Universe is simply calling slp to perform no formatting (-i0 = no indent, -n = no auto-formfeed) so lp -dpr0 works fine. The -onb turns off the banner (separator) page if it is the default. The lp subsystem will handle your ASCII file formatting. Use the dumb model script when adding the printer. Make sure that lp can print ASCII files correctly first. ASCII files have just a signle LF at the end of each line so it is up to the printer script to add the CR to make the printer carriage return to the beginning of the next line. Or you can modify the above script to:

#/usr/bin/sh
ux2dos - | lp -dpr0 -onb


Bill Hassell, sysadmin