Printer queue not clearing

Hi

I have installed an HP X451dw printer on our network and want to print from Sco Openserver v6

The printer produces correct output but then repeats until the queue is manually stopped. :confused:

It is using a netcat/dumb interface

Any advice on how to persuade it to only print once would be greatly appreciated.

Which command do you use to produce the printer output? And can you show the print-queue definition?

bakunin

Hello,
have a look at this:

Printing with Netcat

Regards

What is the content of the file /usr/spool/lp/admins/lp/interfaces/hpx451
assuming the destination name is hpx451, and assuming that you created the printer as a local printer.

I did just that and it says:

and i suppose it did just that: i do not know for certain what happened (not enough data for that), but my supposition is that the netcat -script you use bypasses the printing system so effectively that the job is not removed from the printqueue at all.

Usually a print queue works like this: there is a place where files to be printed (=sent to the printer) are dropped. There is a daemon (usually lpd ) which picks up the file and - upon successful procession (=printing worked) removes it, otherwise issues an error message and does not remove it.

What fails, IMHO, is that the netcat -script needs to tell the lpd (or whatever you use in its place) about the successful (or unsuccessful) printing of the job so that the print file can be removed based on this.

I hope this helps.

bakunin

Do the following:

cd /usr/spool/lp/model
cp dumb netcat

modify netcat with vi or whatever so that it looks like:

:                                                      
#Set up some global variables.                         
: ${SPOOLDIR:=/usr/spool/lp}                           
: ${LOCALPATH:=${SPOOLDIR}/bin}                        
                                                       
copies=$4                                              
shift; shift; shift; shift; shift                      
files="$*"                                             
i=1                                                    
while [ $i -le $copies ]                               
do                                                     
        for file in $files                             
        do                                             
        /path_to_netcat/netcat -p 9100 hp451x <{$file} 
        done                                           
        i=`expr $i + 1`                                
done                                                   
                                                       
exit 0                                                 

Run scoadmin to add a local printer, selecting netcat as the model, and /dev/null as the device.
Note that the hp451x in the script should match an entry in /etc/hosts, and that the printer port number might not be 9100.