Subject: Re: correct/accepted way for lpd to transparently pass data to printer
To: None <>
From: Henry Nelson <>
List: netbsd-users
Date: 03/16/2001 10:24:24
> > That works, but you can also just eliminate the :if: entry in your printcap
> > to not have an input filter at all.
> Yes, that works fine. I use it to pass data coming from Windows
> clients (using samba) directly to the printer. The Windows clients

Thank you both for your input.  It was VERY helpful.

I also plan to use this particular printer (entry in /etc/printcap) to
print from Windows machines on the private lan.  I am not using "samba"
(not sure what it would do for me), and the printing itself works
perfectly, both by the "cat" method or, better*, simply removing :if:.
(*The input filter solution does have one advantage of acting as a switch
to various filters and converter-pipes depending on the type of file the
:if:-defined script detects, i.e., "all-in-one" idea.)

The problem I am having is that all the print files, some of them quite
large, are left in the spool directory on the NetBSD print server (see
appendix for what they look like).  No files are left if I print using
"lpr" on the print server itself.  I tried to erase them using an "rm"
command in the input filter script, but that didn't work; I suppose
because of permission problems.

Is this phenomenon a result of using a Windows-based, proprietary "lpr?"
I have determined that the host name ("wn98" in the example below) is
being passed to the NetBSD print server by Windows.  If I used "samba"
(man I hate to have to learn another whole scheme just to get printing
to work) would I then no longer have problems of files being left around?
"Lpr" has switches "-r" and "-s" to remove files, but I didn't see anything
in the man page for "lpd" to cleanup after the job is finished.

Is everyone using "samba?"  Are there other solutions?

henry nelson

Append, `ls -l` output of spool directory:
-rw-r----x  1 root  daemon        4 Mar 16 08:53 .seq
-rw-rw----  1 root  daemon   128967 Mar 16 09:02 dfA383wn98
-rw-rw----  1 root  daemon  1720575 Mar 16 09:23 dfA432wn98
-rw-rw----  1 root  daemon   298827 Mar 16 09:31 dfA571wn98
-rw-r--r--  1 root  daemon       16 Mar 16 09:31 lock
-rw-rw-r--  1 root  daemon       25 Mar 16 09:31 status

Those "dfAnnnwn98" files are the Windows-processed, raw printer files.
They never go away, and continue to accumulate until manually erased.