"Francis A. Holop" wrote:
> hi,
Hi, there,
Sorry for the late reply.
> anybody has a hp 690c deskjet working?
Me :)
> cold somebody send me a dmesg output of a correctly found
> lpt port, /etc/printcap section along with
> ghostscript's device parameter (is it cdj550?)?
> plus any filter if needed (of course needed ;-)
The attach files are my /etc/printcap & /usr/local/libexec/hpif.
You have to do the following steps:
1. mkdir /var/spool/lpd/hp690
2. chown daemon.daemon /var/spool/lpd/hp690
3. chmod 770 /var/spool/lpd/hp690
4. chmod 555 /usr/local/libexec/hpif
To find out if the kernel supports a parallel interface, type:
kevlo@OpenBSD 32% dmesg|grep lpt0
lpt0 at isa0 port 0x378/4 irq 7
kevlo@OpenBSD 33%
Finally, make sure you set "lpd=YES" in /etc/rc.conf
> thanks in forward.
>
> -f
>
> --
> // you can say life is nice until you are crying
> // you can say life is long until you are dying
> -- limb bizkit or whoever.
- Kevin
# $OpenBSD: printcap,v 1.3 1999/09/23 01:31:20 deraadt Exp $
#lp|local line printer:\
# :lp=/dev/lp:sd=/var/spool/lpd:lf=/var/log/lpd-errs:
#rp|remote line printer:\
# :lp=:rm=printhost:rp=lp:sd=/var/spool/lpd:lf=/var/log/lpd-errs:
hp690|lp|HP 690C:\
:sh:sd=/var/log/lpd/hp690c:\
:lp=/dev/lpt0:\
:if=/usr/local/libexec/hpif:
#!/bin/sh
#
# ifhp - Print Ghostscript-simulated PostScript on a DeskJet 690C
# Installed in /usr/local/libexec/hpif
#
# Treat LF as CR+LF:
#
printf "\033&k2G" || exit 2
#
# Read first two characters of the file
#
read first_line
first_two_chars=`expr "$first_line" : '\(..\)'`
if [ "$first_two_chars" = "%!" ]; then
#
# It is PostScript; use Ghostscript to scan-convert and print it.
#
# Note that PostScript files are actually interpreted programs,
# and those programs are allowed to write to stdout, which will
# mess up the printed output. So, we redirect stdout to stderr
# and then make descriptor 3 go to stdout, and have Ghostscript
# write its output there. Exercise for the clever reader:
# capture the stderr output from Ghostscript and mail it back to
# the user originating the print job.
#
exec 3>&1 1>&2
/usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=cdj550 \
-sOutputFile=/dev/fd/3 - && exit 0
#
/usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=cdj550 -sOutputFile=- - \
&& exit 0
else
#
# Plain text or HP/PCL, so just print it directly; print a form
# at the end to eject the last page.
#
echo $first_line && cat && printf "\033&l0H" && exit 0
fi
exit 2
|