[lug] printcap settings and Windows printer

Gary Masters gmasters at dotsplat.org
Tue Sep 26 07:17:15 MDT 2000


On Mon Sep 25, 2000 at 06:45:02 -0600, Hugh Brown wrote:
> hosts.lpd only applies to computers trying to access local printers.
> 
> Is the printer shared from the windows side as deskjet?  (smbclient -L
> windows -U% should show you what windows considers shared to your
> network)
> 
> Hugh
> 

Unless the Windows box is running a package that provides lpd
type services, you'll have to use smbclient in order to send the
print job.  Below is an excerpt from my /etc/printcap:

pslo|LoRes PostScript via GhostScript and Epson Sylus 640 on Trillian:\
        :sh:mx#0:\
        :lp=/dev/null:sd=/var/spool/output/lpd/pslo:lf=/var/log/lpd-errs:\
        :if=/usr/local/libexec/ps2stylus.360x360dpi:

This printcap entry runs the print job through a filter that
converts Postscript into the language understood by the Epson
Sylus 640 and then uses smbclient to pass the print job to the
Windows box.  Below is the filter script:

#!/bin/sh
#
# Get username and hostname from filter parameters
#
while [ $# != 0 ]
do  case "$1" in
  -n)   user=$2 ; shift ;;
  -h)   host=$2 ; shift ;;
  -*)   ;;
  *)    acctfile=$1 ;;
  esac
  shift
done 
gs @stc600pl.upp -q -sOutputFile=- - | \
smbclient //trillian/epson -U $user -E -c 'print -'


-- 
  Gary Masters
  KCØHQW
  gmasters at dotsplat.org




More information about the LUG mailing list