printing to a HP Deskjet 812C printer

Antonio Olivares olivares14031 at gmail.com
Thu Jul 28 00:29:48 UTC 2011


>> If you do decide to take this route, it's not that hard to recompile a kernel.
>>
>> # csup -h cvsup.FreeBSD.org -L2 /usr/share/examples/cvsup/standard-supfile
>>
>> 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         GENERIC
>>
>> ident           COFFIN
>>
>> # Remove legacy support
>> nocpu           I486_CPU
>> nocpu           I586_CPU
>>
>> # HPLIP can't work whithout this
>> nodevice        ulpt
>> --- cut ---
>>
>> # cd /usr/src
>> # make buildkernel KERNCONF=COFFIN
>> # make installkernel KERNCONF=COFFIN
>> # 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 at quadcore ~/Documents]$ lpr -P ijs/DESKJET_812 freebsd-printing1.txt
[olivares at quadcore ~/Documents]$ mail
Mail version 8.1 6/6/93.  Type ? for help.
"/var/mail/olivares": 1 message 1 new
>N  1 daemon at quadcore.home  Wed Jul 27 19:20  25/884   "apsfilter: can't find"
&
Message 1:
>From daemon at 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 <daemon at quadcore.home>
To: root at quadcore.home
Cc: olivares at 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
===========================================

	*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"
---
	
	*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

---

==========================================

I have not done this:
---
#!/bin/sh

[ -x /usr/sbin/lpd] && /usr/sbin/lpd && echo -n " lpd"
---

does having lpd_enable="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 <RETURN> to continue ]











        ==================================================================
          A P S F I L T E R   S E T U P                   -- MAIN MENUE --
        ==================================================================

	(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)	==> Install printer with values shown above - repeat this
		    step for installing multiple printers
	(Q)	==> 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


More information about the freebsd-questions mailing list