-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Feb 27 Denny White spake forth boldly:

On Feb 17 Mike Jeays spake forth boldly:
On Fri, 2006-02-17 at 11:09 +0000, Denny White wrote:

I read the article at Onlamp about printing for the impatient.
Installed apsfilter and samba on my old hp netserver so I'd
be able to print to an hp 722c deskjet printer connected to
an xp box. Gimp-print was also installed. Ghostscript was
already installed. I ran /usr/local/share/apsfilter/./SETUP
& thought I had it whipped. That's where the fun started.
Apparently I've missed something along the way, since the
print job never gets sent to the xp box. I also found out
at linuxprinting.org that the recommended hp 722c driver
is pnm2ppa. There was only one section in the install script
that mentioned that driver, 10) PPA printer, so I chose that.
It plugs it into the setup, but when I try to print a test
page, I get ERROR: additional filter 'pnm2ppa' not found.
I found the driver at linuxprinting.org & downloaded it.
How do I go about using it? Is there a way to compile it
into ghostscript? I have ghostscript-gnu-nox11-7.07_14 &
the apsfilter setup script found it & didn't complain.
Do I need to install another more complete version? I know
if I install ghostscript-afpl, I'll also have to recompile
& reinstall apsfilter with the proper make options. When
I choose the more generic just plain deskjet printer driver,
the script accepts it, and when I try to print a test page,
there's no complaining about the driver like when I try the
ppa driver. Test page is created, supposedly sent to the
xp printer with even a speed, average around 950 kb/s, but
I see where it only goes to stdin. I'm definitely not a
programmer, but another filter, ghostscript, something, has
to relay it to stdout, is that correct?
So, I could use some pointers on this. If anyone interested
in answering needs more info, I'll be glad to plug it in to
a reply. Like smb.conf, apsfilterrc, & so forth. Thanks.
Denny White


This combination worked fine for me.

-------------------------------------------------------------
# Printcap file: Added 2005-04-25 based on pnm2ppa suggestions.

lp|ascii|unix:\
               :lp=/dev/lpt0:\
               :sd=/var/spool/lpd:\
               :if=/home/mike/bin/pnm2ppa-filter:\
               :mx#0:\
               :sh:
-------------------------------------------------------------
#!/bin/sh
# printcap-filter
TMP=/tmp/pnm2ppa.tmp
cat >$TMP
ch1=`head -1 $TMP | cut -c 1`
if [ "$ch1" = '%' ]
then
cat $TMP | /usr/local/bin/gs -sDEVICE=ppmraw -q -dNOPAUSE -r600 \
-sOutputFile=- - | \
/usr/local/bin/pnm2ppa -i - -o -
else
 cat $TMP | /usr/local/bin/enscript -B -q -p - | \
 /usr/local/bin/gs -sDEVICE=ppmraw -q -dNOPAUSE -r600 \
 -sOutputFile=- - | \
 /usr/local/bin/pnm2ppa -i - -o -
fi
rm $TMP


I've fought this for some time now. I've got samba installed,
along with creating lpr on the xp box where I want to print
to the deskjet 722c. Since I added the remote printer section
below in /etc/printcap, users can no longer print locally,
only root. I checked the ownerships on /var/spool/output/lpd
files and nothing's changed from before the printcap addition.
Also, the file shows up on the xp box in the printspool, but
never prints.

#
lp|local line printer:\
        :sh:\
        :lp=/dev/lpt0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs:
#
remote|sample remote printer:\
        :rp=HPDeskJet2:\
        :rm=dancer:\
        :sd=/var/spool/samba/remote:\
        :if=/root/hold/printcap-filter:\
        :lf=/var/spool/samba/remote/log:\
       :af=/var/spool/samba/remote/acct:\
       :mx#0:\
        :sh
#

Also have apsfilter installed but am not using it in printcap or
in the script that filters lpr's output. The system reports the
filtering script above successfully filters the file I want to
print too.
Another thing, only way I can browse shares from the xp box to
the fbsd box is to usr security = share in smb.conf. I've tried
user with & without encrypt passwords in smb.conf & tried the
xp box with & without enableplaintextpassword & can't get it to
let me browse. I mention these things too, because I thought it
might shed some light on what I'm doing wrong. Below are the
pertinent settings from smb.conf without all the extra comments
and commented outstuff.

[global]
  workgroup = WHEEL
  server string = Samba %v, running on %h
  security = user
  encrypt passwords = no
  smb passwd file = /usr/local/private/smbpasswd
  obey pam restrictions = no
  hosts allow = dancer, badboybox, mobile1

  load printers = yes

  printing = bsd        # tried without uncommenting out
                        # and with bsd & cups

  passdb backend = smbpasswd

  socket options = TCP_NODELAY

  add user script = /usr/sbin/useradd %u
  add group script = /usr/sbin/groupadd %g
add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u
  delete user script = /usr/sbin/userdel %u
  delete user from group script = /usr/sbin/deluser %u %g
  delete group script = /usr/sbin/groupdel %g


#============================ Share Definitions ==============================
[homes]
  comment = Home Directories
  browseable = yes
  writable = yes

[printers]
  comment = All Printers
  path = /var/spool/samba
  browseable = no
  guest ok = no
  writable = no
  printable = yes

[dennyboyshare]
   comment = dennyboy's home directory
   path = /home/dennyboy
   valid users = dennyboy
   public = no
   writable = yes
   printable = yes

Thanks for any & all forthcoming help. This thing's really
gotten confusing. If there's any other info someone would
need me to provide, please let me know.
Denny White


Below is the current /etc/printcap file. I can now print legible
files to the hp deskjet 722c on the xp box. Can print okay, too,
to the star 2410 dot-matrix on the fbsd box, but only as root.
That's the keyword "partial in the subject line of this message.
I'd like normal users to be able to print to it again. Set it up
as a shared network printer from the xp box, but naturally, still
can't print to it until the root/user printing issue is resolved.
Thanks for any help I can get on this. Did not sit on my duff in
the interim between this message & the others. Experimented a lot
with different combinations of programs including apsfilter, gs,
samba, cups & so forth, finally coming up with at least a partial
solution.
Denny White

#
lp|local line printer:\
        :sh:\
        :lp=/dev/lpt0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs:
#
remote|sample remote printer:\
        :rp=HPDeskJet2:\
        :rm=dancer:\
        :af=/usr/local/bin/ppn2ppa.ppd:\
        :if=/usr/local/bin/foomatic-rip:\
        :sd=/var/spool/samba/remote:\
        :mx#0:\
        :sh
#

GnuPG key  : 0x1644E79A  |  http://wwwkeys.nl.pgp.net
Fingerprint: D0A9 AD44 1F10 E09E 0E67  EC25 CB44 F2E5 1644 E79A

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (OpenBSD)

iD4DBQFEBvkHy0Ty5RZE55oRAmgmAKCgD9nYuR5DYkmEmN2sJ1FPcN1YxgCXUJlw
BiOuPsVLULcH9eN6zwkyLA==
=Q8dy
-----END PGP SIGNATURE-----
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to