Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 04 Mar 1998 22:11:18 +0000
From:      "Sean J. Schluntz" <schluntz@clicknet.com>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Problem with lpr/printing.
Message-ID:  <34FDD186.A612D05E@clicknet.com>
References:  <34FC6586.4E5F4073@clicknet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Ahem, you get than error when you have not loaded the lpd daemon.  Sorry
folks :(

-Sean

Sean J. Schluntz wrote:
> 
> I've followed the suggestions for setting up a printer in the FreeBSD
> Handbook on the web site but when I try to print I get the following
> error:
> 
> lpr: connect: No such file for directory
> Jobs queued, but cannot start daemon
> 
> This happens with Text and graphic printouts.  Below is my printcap and
> the shell script.  There is nothing in the errors log.
> 
> #Printcap
> hplazer|hp5p|PS|lp|HP LazerJet 5p:\
>         :sh:sd=/var/spool/lpd/hp5p:\
>         :lf=/var/log/lpd-errs:\
>         :lp=/dev/lpt0:\
>         :if=/usr/local/libexec/hp5p:
> 
> #!/bin/sh
> #
> #  hp5p - Print Ghostscript-simulated PostScript on a HP 5p
> #  Installed in /usr/local/libexec/hp5p
> 
> #
> #  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
>     #
>     /usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=lj5grey
> -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 "\f" && exit 0
> fi
> 
> exit 2

-- 
----------------------------------------------------------------------
Sean J. Schluntz                                 schluntz@clicknet.com
Systems Engineer                                  (408) 997-6900 x7222
PinPoint Software Corporation                  http://www.clicknet.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?34FDD186.A612D05E>