[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Still can't Print
- To: misc_(_at_)_openbsd_(_dot_)_org
- Subject: Re: Still can't Print
- From: Chuck Yerkes <chuck+obsd_(_at_)_2003_(_dot_)_snew_(_dot_)_com>
- Date: Mon, 15 Dec 2003 15:48:28 -0500
*is* it on lpt0 in the first place?
Can the printer take PLAIN TEXT and print it?
(eg: printf "foo\nbar\n^L\n" >/dev/lpt0 should print out some lines and emit
(that ^L is CONTROL L aka formfeed)).
If the basics don't work, then all the fluff you put in front of it
won't help.
Quoting dla (dla_(_at_)_comhem_(_dot_)_se):
> >Is anyone out there printing with OpenBSD? Please tell me how you're
> >doing it.
>
> hello, atleast this works on my hp deskjet 5655 using /usr/ports/*/ghostscript.
>
> /etc/printcap
>
> lp|local line printer:\
> :sh:lp=/dev/lpt0:sd=/var/spool/output:lf=/var/log/lpd-errs:\
> :if=/usr/libexec/printer.sh:
>
> And my /usr/libexec/printer.sh taken from freebsd handbook
>
> #!/bin/sh
>
> printf "\033&k2G" || exit 2
>
> read line
>
> post_script=$(expr "$line" : '\(..\)')
>
> if [ "$post_script" = "%!" ]; then
>
> exec 3>&1 1>&2
>
> /usr/local/bin/gs -dSAFER -DNOPAUSE -q -sDEVICE=cdjcolor -sPAPERSIZE=a4 -sOutputFile=/dev/fd/3 - && exit 0
>
> /usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=cdjcolor -sPAPERSIZE=a4 -sOutputFile=- - && exit 0
>
> else
>
> echo $line && cat && printf "\f" && exit 0
> fi
>
> exit 34
Visit your host, monkey.org