From owner-freebsd-questions@FreeBSD.ORG Thu Jul 28 00:29:48 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 196511065673 for ; Thu, 28 Jul 2011 00:29:48 +0000 (UTC) (envelope-from olivares14031@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id D2D018FC0C for ; Thu, 28 Jul 2011 00:29:47 +0000 (UTC) Received: by iyb11 with SMTP id 11so3091706iyb.13 for ; Wed, 27 Jul 2011 17:29:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=gwpMIIb/CEt3JJRJ2BwH/qV16+sUWGA3Xvw+gs4/Bcw=; b=WjASd0nCUci6wUyKWCQHB1d533Ve4OjrBUFAqL6di2M4KyY7U8zKu542Gsl7HyL8Wm pP3nntZ2kyJeVHUCTvwDv5AEjOoBWAWvsxqcZsxKagi49v0Vt/2LglsROQjMHbVpY9dU IgxtSqkTOUlKxutqqwVR4rOG/R/wPUJkzNQRk= MIME-Version: 1.0 Received: by 10.43.50.10 with SMTP id vc10mr333294icb.293.1311812987196; Wed, 27 Jul 2011 17:29:47 -0700 (PDT) Received: by 10.42.169.73 with HTTP; Wed, 27 Jul 2011 17:29:47 -0700 (PDT) In-Reply-To: References: Date: Wed, 27 Jul 2011 19:29:47 -0500 Message-ID: From: Antonio Olivares To: Ross Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-questions@freebsd.org Subject: Re: printing to a HP Deskjet 812C printer X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2011 00:29:48 -0000 >> If you do decide to take this route, it's not that hard to recompile a k= ernel. >> >> # csup -h cvsup.FreeBSD.org -L2 /usr/share/examples/cvsup/standard-supfi= le >> >> Copy your kernconf, say COFFIN, to /usr/src/sys/i386/conf/ if you are >> on 32bit or to /usr/src/sys/amd64/conf/ if on amd64. >> The file could be just the following (just the GENERIC kernel, >> slightly modified): >> --- cut --- >> include =A0 =A0 =A0 =A0 GENERIC >> >> ident =A0 =A0 =A0 =A0 =A0 COFFIN >> >> # Remove legacy support >> nocpu =A0 =A0 =A0 =A0 =A0 I486_CPU >> nocpu =A0 =A0 =A0 =A0 =A0 I586_CPU >> >> # HPLIP can't work whithout this >> nodevice =A0 =A0 =A0 =A0ulpt >> --- cut --- >> >> # cd /usr/src >> # make buildkernel KERNCONF=3DCOFFIN >> # make installkernel KERNCONF=3DCOFFIN >> # reboot >> >> That's it. >> > > Although I should add that you probably will need to also rebuild the > world if you update your sources with csup. Well, don't run csup, use > the sources you already have in /usr/src. > I guess I got overly excited and when I try to print from firefox, nothing happens :( I tried to print from command line and I get: [olivares@quadcore ~/Documents]$ lpr -P ijs/DESKJET_812 freebsd-printing1.t= xt [olivares@quadcore ~/Documents]$ mail Mail version 8.1 6/6/93. Type ? for help. "/var/mail/olivares": 1 message 1 new >N 1 daemon@quadcore.home Wed Jul 27 19:20 25/884 "apsfilter: can't fi= nd" & Message 1: >From daemon@quadcore.home Wed Jul 27 19:20:47 2011 Date: Wed, 27 Jul 2011 19:20:46 -0500 (CDT) From: Owner of many system processes To: root@quadcore.home Cc: olivares@quadcore.home Subject: apsfilter: can't find configuration apsfilter fatal error: can't find configuration The configuration file /usr/local/etc/apsfilter/DESKJET_812/apsfilterrc is missing. Please run SETUP. -- apsfilter, your lpd input filter & At EOF & q Saved 1 message in mbox I did not name the printer, went back to run ./SETUP and named it, I also checked =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D *Ok, now that THAT is over, lets check the perms on the lpd dir: --- ptah# ls -ald /var/spool/lpd drwxr-xr-x 2 root daemon 512 Jan 28 05:10 /var/spool/lpd ptah# chmod 777 /var/spool/lpd ptah# ls -ald /var/spool/lpd drwxrwxrwx 2 root daemon 512 Jan 28 05:10 /var/spool/lpd --- *...now everyone can write to it. *So I went into /usr/local/etc/rc.d and created a printer.sh file with the following contents: --- #!/bin/sh [ -x /usr/sbin/lpd] && /usr/sbin/lpd && echo -n " lpd" --- =09 *I started it with just a: --- /usr/sbin/lpd && echo -n " lpd" --- *...real quick and then checked to see if it was running, and it was! *lpc status all - shows if the printer is recognized and up: --- freak: queuing is enabled printing is enabled no entries in spool area printer idle --- *So yay! He's up and going. Now to print to him I can just do: --- lpr -P freak whatever.txt --- *And it should print just fine. *I added the following lines in /usr/local/etc/smb.conf --- =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D I have not done this: --- #!/bin/sh [ -x /usr/sbin/lpd] && /usr/sbin/lpd && echo -n " lpd" --- does having lpd_enable=3D"YES" in /etc/rc.conf do the same? I modified permissions, but printer is not printing via firefox or command line :( Here's some output of what I got when I ran ./SETUP Please enter a printer queue name for printer 'ijs/DESKJET_812'. The default name is 'aps1'. Your choice: ijs/DESKJET_812 ** creating printcap entry for printer ijs/DESKJET_812... creating spooldir ... remember SETUP settings in printers apsfilterrc file... ** done. [ press to continue ] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D A P S F I L T E R S E T U P -- MAIN MENUE -- =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (D) Available Device Drivers in your gs binary (R) Read Ghostscript driver documentation (devices.txt) (1) Printer Driver Selection [ijs/DESKJET_812] (2) Interface Setup [parallel] (3) Paper Format [letter] (4) Printing Quality [draft] (5) Color Mode [full] (6) Print Resolution in "dots per inch" [300x300] (7) Default Printing Method [auto] (T) Print Test Page (V) View performance log (times of print attempts) (A) Abort installation (don't do anything) (I) =3D=3D> Install printer with values shown above - repeat this step for installing multiple printers (Q) =3D=3D> Finish installation Your choice? q Finished creating/updating /etc/printcap and /usr/local/etc/apsfilter/ ... To let the printer scheduler know of the new printers, it has to be restarted. Be sure that no print jobs are in the queue. For LPRng use: lpc reread For *BSD use: lpc restart all For Linux BSD-lpr use the vendor supplied script, i.e.: /etc/rc.d/init.d/lpd restart or similar. Here's document I followed in case it was not referenced or got lost in the reposts: http://www.freebsdfoo.com/bsd-print-foo.txt Regards & thanks, Antonio