On Sun, 02 Jan 2000 10:45:20 -0500, "C. Everett Southwick"
>I've read several messages which refer to using FTP within the printer
>interface script to make these printers work. I can ftp directly to the
>printer (setup in /etc/hosts file) and send a file, and the printer
>prints it. I need to know how I go about making the necessary changes to
>my interface script to make this work. I've tried a couple things but
>with no success.
>I'm running OpenServer 5.0.5
>Lexmark Optra S 1625 N (100B/t ethernet)
Contratulations. You've just volunteering to do some testing for me.
1. Use "scoadmin printer" to install an ordinary printer with an output
device of /dev/null. In the following example, the printer name is
"milan22".
2. Add your printer host_name to /etc/hosts
milan22 192.168.0.22
3. Add a file called "/etc/printers" that looks like this:
milan22: milan22: 2000
in for form:
printer_name: host_name: port_number
The ":" are necessary.
Try port 515 for your Lexmark. Check the docs and see if it support any
other port numbers. HP is 9100 -> 9102. Milan is 2000 -> 2002.
4. Overscribble the spooler script in:
/usr/spool/lp/admins/lp/interfaces/milan
with the following script. The \033E is HP PCL for reset and may need to
be changed for Lexmark. If a reset doesn't work, try just a form feed.
============= cut here =============
PATH="/bin:/usr/bin:/usr/lib:/u/bin"
export PATH
printer=`basename $0`
request=$1
name=$2
title=$3
copies=$4
options=$5
shift; shift; shift; shift; shift
# Look for HOST and Port address
PRTSETUP=`grep "^$printer:" /etc/printers`
if [ $? = 0 ]
then
PRTHOST=`echo $PRTSETUP|awk -F: '{ print $2 }'`
PRTPORT=`echo $PRTSETUP|awk -F: '{ print $3 }'`
else
exit 1
fi
(
files="$*"
i=1
copies=1
while [ $i -le $copies ]
do
for file in $files
do
cat $file | /usr/lib/lponlcr
echo "\033E\c" # may need change for Lexmark
done
i=`expr $i + 1`
done
)|netcat -h $PRTHOST -p $PRTPORT
============= cut here =============
5. Download the binary or compile the source to netcat:
http://www.cruzio.com/~jeffl/sco/lp/
and install the executeable somewhere on the $PATH.
6. Try printing normally. The above mess is what I use. My thanks to
Gary Quiring for working out the details and to Kevin Smith for the netcat
program.
7. You can probably replace the netcat in the last line of the script with
ftp and tweak the name and port parameter passing to work with ftp instead
of netcat. I haven't tried it (yet).
--
Jeff Liebermann 150 Felker St #D Santa Cruz CA 95060
(831)421-6491 pgr (831)426-1240 fax (831)336-2558 home
http://www.cruzio.com/~jeffl WB6SSY