Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Mar 2002 17:32:20 -0600
From:      GORMLEY@SHRSYS.HSLC.ORG
To:        questions@freebsd.org
Cc:        newbies@freebsd.org
Subject:   [GORMLEY@SHRSYS.HSLC.ORG: Printing works, but only after manually starting lpd]
Message-ID:  <20020322233220.GA62133@bsdprophet.org>

next in thread | raw e-mail | index | archive | help

--ikeVEW9yuYc//A+q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Forwarded to questions where it should have been in the first place.


--ikeVEW9yuYc//A+q
Content-Type: message/rfc822
Content-Disposition: inline

Received: from localhost (localhost.bsdprophet.org [127.0.0.1])
	by Amelia.bsdprophet.org (8.11.6/8.11.6) with ESMTP id g2MMg3u62296
	for <scott@localhost>; Fri, 22 Mar 2002 16:42:04 -0600 (CST)
	(envelope-from owner-freebsd-newbies@FreeBSD.ORG)
Received: from jules.zqc.com [63.145.171.22]
	by localhost with IMAP (fetchmail-5.9.6)
	for scott@localhost (single-drop); Fri, 22 Mar 2002 16:42:04 -0600 (CST)
Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119])
	by jules.zqc.com (8.11.6/8.11.6) with ESMTP id g2MMhQB57121
	for <scott@bsdprophet.org>; Fri, 22 Mar 2002 15:43:26 -0700 (MST)
	(envelope-from owner-freebsd-newbies@FreeBSD.ORG)
Received: from hub.freebsd.org (hub.FreeBSD.org [216.136.204.18])
	by mx2.freebsd.org (Postfix) with ESMTP
	id CDBFB5568A; Fri, 22 Mar 2002 14:41:47 -0800 (PST)
	(envelope-from owner-freebsd-newbies@FreeBSD.ORG)
Received: by hub.freebsd.org (Postfix, from userid 538)
	id DFF0837B404; Fri, 22 Mar 2002 14:41:45 -0800 (PST)
Received: from localhost (localhost [127.0.0.1])
	by hub.freebsd.org (Postfix) with SMTP
	id A1EB32E801D; Fri, 22 Mar 2002 14:41:45 -0800 (PST)
Received: by hub.freebsd.org (bulk_mailer v1.12); Fri, 22 Mar 2002 14:41:45 -0800
Delivered-To: freebsd-newbies@freebsd.org
Received: from shrsys.hslc.org (SHRSYS.HSLC.ORG [192.100.94.3])
	by hub.freebsd.org (Postfix) with ESMTP id 3F39537B417
	for <freebsd-newbies@freebsd.org>; Fri, 22 Mar 2002 14:41:31 -0800 (PST)
Received: from SHRSYS.HSLC.ORG by SHRSYS.HSLC.ORG (PMDF V5.2-32 #39799)
 id <01KFO2RX4AWG92036H@SHRSYS.HSLC.ORG> for freebsd-newbies@freebsd.org; Fri,
 22 Mar 2002 17:36:09 EST
Date: Fri, 22 Mar 2002 17:03:09 -0500 (EST)
From: "Dennis J. Gormley" <GORMLEY@SHRSYS.HSLC.ORG>
Subject: Printing works, but only after manually starting lpd
To: freebsd-newbies@FreeBSD.ORG
Cc: GORMLEY@SHRSYS.HSLC.ORG
Reply-To: GORMLEY@SHRSYS.HSLC.ORG
Message-id: <01KFO44JDX0K92036H@SHRSYS.HSLC.ORG>
MIME-version: 1.0
Content-type: TEXT/PLAIN; CHARSET=US-ASCII
Sender: owner-freebsd-newbies@FreeBSD.ORG
List-ID: <freebsd-newbies.FreeBSD.ORG>
List-Archive: <http://docs.freebsd.org/mail/>; (Web Archive)
List-Help: <mailto:majordomo@FreeBSD.ORG?subject=help> (List Instructions)
List-Subscribe: <mailto:majordomo@FreeBSD.ORG?subject=subscribe%20freebsd-newbies>
List-Unsubscribe: <mailto:majordomo@FreeBSD.ORG?subject=unsubscribe%20freebsd-newbies>
X-Loop: FreeBSD.org
Precedence: bulk

Hello;

I apologize for the length of this post, but I wanted to include all the
relevant information.  As a preamble, I've been working on this problem for a
couple of weeks; I've been checking out the handbook, posting to the
newsgroups, and checked groups.google.com in case these questions were already
answered.  They may well have been, but I couldn't find the answers :(

I have a Dell Dimension system running FreeBSD for which Netscape will be the
primary application.  I have attached an HP 940c
printer.  I've installed the current port of ghostscript-afpl, and can print
from Netscape, after a fashion, but it needs to be a lot less hands on before I
can deploy the workstation.

When I click on File|Print in Netscape, the dialog box comes up.  The print
command is notated as lpr -P hpijs, although I've tried it with lp as well.

When I click on OK, I get small window in the center of the screen labeled 
Netscape: subprocess diagnostics (stdout/stderr)

that says

lpr: connect: no such file or directory
jobs queued, but cannot start daemon

When I go to the # prompt and type lpd, the page prints with error messages.

So I abandon Netscape, and go back to the # prompt.  I issued the  command 

#lpr -P lp .profile

and got the error messages:


lpr: connect: no such file or directory
jobs queued, but cannot start daemon

which are the same messages I get when I print out of Netscape.

So I go to check the spool directory and find the files cfA012sci.hslc.org and 
dfA012sci.hslc.org in /var/spool/lpd

So I type lpd at same prompt.  I get the  error messages

Mar 21 11:20:44 sci lpd[280]: lp: filter 'f' terminated (termsig=35)
Mar 21 11:20:44 sci lpd[280]: lp: job could not be printed (cfA012sci.hslc.org)

BUT THE PAGE PRINTED!

In /var/spool/lpd, files cfA012sci.hslc.org and dfA012sci.hslc.org disappear,
but file lock appears, with contents 

280
cfA012sci.hslc.org

Here are the relevant files, etc:

sci# uname -a

FreeBSD sci.hslc.org 4.2-RELEASE FreeBSD 4.2-RELEASE #0: Mon Jul 23 10:17:25 
EDT 2001     root@accesspa.state.pa.us:/usr/src/sys/compile/GENERIC  i386


sci # gs -h
AFPL Ghostscript 7.03 (2001-10-20)
Copyright (C) 2001 artofcode LLC, Benicia, CA.  All rights reserved.
Usage: gs [switches] [file1.ps file2.ps ...]
Most frequently used switches: (you can use # in place of =)
 -dNOPAUSE           no pause after page   | -q       `quiet', fewer messages
 -g<width>x<height>  page size in pixels   | -r<res>  pixels/inch resolution
 -sDEVICE=<devname>  select device         | -dBATCH  exit after last file
 -sOutputFile=<file> select output file: - for stdout, |command for pipe,
                                         embed %d or %ld for page #
Input formats: PostScript PostScriptLevel1 PostScriptLevel2 PDF
Available devices:
   stp uniprint deskjet djet500 cdeskjet cdjcolor cdjmono cdj550 cdj670
   cdj850 cdj880 cdj890 cdj1600 cdj970 pjxl300 pcl3 hpdj ijs jpeg jpeggray
   pdfwrite bbox psmono psgray psrgb pswrite epswrite nullpage
Search path:
   . : /usr/local/share/ghostscript/7.03/lib :
   /usr/local/share/ghostscript/fonts
For more information, see /usr/local/share/ghostscript/7.03/doc/Use.htm.
Report bugs to bug-gs@ghostscript.com, using the form in Bug-form.htm.



sci# more /etc/printcap
lp|hpijs|hp|hp940c|hpdj940c:\
        :sh:\
        :sd=/var/spool/lpd:\
        :lp=/dev/lpt0:\
        :lf=/var/log/lpd-errs:\
        :if=/usr/local/libexec/hpijsif:

exit

sci# more /usr/local/libexec/hpijsif
#!/bin/sh
# hpijsif - Ghostscript simulated Postscript for HP Ink Jet Server (ijs)
# /usr/local/libexec/hpijsif
printf "\033&k2G" || exit 2

read first_line
first_two_chars=`expr "$first_line" : '\(..\)'`

if [ "$first_two_chars" = "%!" ]; then
        #  PostScript job, print it.
        exec 3>&1 1>&2
        /usr/local/bin/gs -dSAFER -dNOPAUSE -q \
            -sDEVICE=ijs \
            -sIjsServer="/usr/local/bin/hpijs" \
            -dIjsUseOutputFD \
            -sDeviceManufacturer="HEWLETT-PACKARD" \
            -sDeviceModel="DESKJET 940c" \
            -sOutputFile=/dev/fd/3 - && exit 0
    else
        #  Plain text, convert it, then print it.
        echo $first_line && cat && printf "\033&l0H" && exit 0
    fi

    exit 2

sci# dmesg

Copyright (c) 1992-2000 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD 4.2-RELEASE #0: Mon Jul 23 10:17:25 EDT 2001
    root@accesspa.state.pa.us:/usr/src/sys/compile/GENERIC
Timecounter "i8254"  frequency 1193182 Hz
CPU: Pentium III/Pentium III Xeon/Celeron (930.32-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x686  Stepping = 6
 
Features=0x383f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PA
T,PSE36,MMX,FXSR,SSE>
real memory  = 268173312 (261888K bytes)
config> di sn0
config> di lnc0
config> di ie0
config> di fe0
config> di ed0
config> di cs0
config> di bt0
config> di aic0
config> di aha0
config> di adv0
config> q
avail memory = 256827392 (250808K bytes)
pnpbios: Bad PnP BIOS data checksum
Preloaded elf kernel "kernel" at 0xc0436000.
Preloaded userconfig_script "/boot/kernel.conf" at 0xc043609c.
Pentium Pro MTRR support enabled
md0: Malloc disk
npx0: <math processor> on motherboard
npx0: INT 16 interface
pcib0: <Host to PCI bridge> on motherboard
pci0: <PCI bus> on pcib0
pcib1: <PCI to PCI bridge (vendor=8086 device=1131)> at device 1.0 on pci0
pci1: <PCI bus> on pcib1
pci1: <ATI model 5046 graphics accelerator> at 0.0 irq 11
pcib2: <PCI to PCI bridge (vendor=8086 device=244e)> at device 30.0 on pci0
pci2: <PCI bus> on pcib2
xl0: <3Com 3c905C-TX Fast Etherlink XL> port 0xdc00-0xdc7f mem
0xff9ffc00-0xff9f
fc7f irq 3 at device 9.0 on pci2
xl0: Ethernet address: 00:01:03:d6:29:c8
miibus0: <MII bus> on xl0
xlphy0: <3c905C 10/100 internal PHY> on miibus0
xlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
pci2: <unknown card> (vendor=0x1102, dev=0x0002) at 12.0 irq 9
pci2: <unknown card> (vendor=0x1102, dev=0x7002) at 12.1
isab0: <PCI to ISA bridge (vendor=8086 device=2440)> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel ICH2 ATA100 controller> port 0xffa0-0xffaf at device 31.1 on
pci
0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
uhci0: <UHCI (generic) USB controller> port 0xef80-0xef9f irq 10 at device 31.2 
on pci0
uhci0: (New UHCI DeviceId=0x24428086)
usb0: <UHCI (generic) USB controller> on uhci0
usb0: USB revision 1.0
uhub0: (0x24428086) UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
pci0: <unknown card> (vendor=0x8086, dev=0x2443) at 31.3 irq 9
fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0
fdc0: FIFO enabled, 8 bytes threshold
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
kbd0 at atkbd0
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: model IntelliMouse, device ID 3
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 16550A
sio1: configured irq 3 not in bitmap of probed irqs 0
ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
ppc0: Generic chipset (EPP/NIBBLE) in COMPATIBLE mode
ppbus0: IEEE1284 device found /NIBBLE/ECP
Probing for PnP devices on ppbus0:
ppbus0: <HEWLETT-PACKARD DESKJET 940C> MLC,PCL,PML
plip0: <PLIP network interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
ad0: 38166MB <WDC WD400BB-00AUA1> [77545/16/63] at ata0-master UDMA100
acd0: DVD-ROM <SAMSUNG DVD-ROM SD-612> at ata1-master using PIO4
Mounting root from ufs:/dev/ad0s1a
pid 142 (chkprintcap), uid 0: exited on signal 11 (core dumped)
pid 143 (lpd), uid 0: exited on signal 11 (core dumped)
xl0: promiscuous mode enabled

sci# more /etc/rc.conf
# This file now contains just the overrides from /etc/defaults/rc.conf
# please make all changes to this file.

lpd_enable="YES"
sendmail_enable="NO"
gateway_enable="YES"
sshd_enable="YES"
inetd_enable="YES"
usbd_enable="YES"
moused_enable="YES"
# -- sysinstall generated deltas -- #
#ifconfig_xl0="inet 192.168.2.7  netmask 255.255.255.0"
ifconfig_xl0="inet 192.100.94.156  netmask 255.255.255.0"
#defaultrouter="192.168.2.1"
#defaultrouter="192.168.2.3"
defaultrouter="192.100.94.5"
#hostname="sci.brodart.com"
hostname="sci.hslc.org"

Relevant part of GENERIC (I think . . . )

# Serial (COM) ports
device          sio0    at isa? port IO_COM1 flags 0x10 irq 4
device          sio1    at isa? port IO_COM2 irq 3
device          sio2    at isa? disable port IO_COM3 irq 5
device          sio3    at isa? disable port IO_COM4 irq 9

# Parallel port
device          ppc0    at isa? irq 7
device          ppbus           # Parallel port bus (required)
device          lpt0 at isa? port? tty irq 7 vector lprinter    # Printer
device          plip            # TCP/IP over parallel
device          ppi             # Parallel port interface device
#device         vpo             # Requires scbus and da

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

--ikeVEW9yuYc//A+q--

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?20020322233220.GA62133>