Re: 4.4R: if: doesn't get started when getting remote print job (Re: apsfilter doesn't work on server)

2002-01-16 Thread Christian Ullrich

* Andreas Klemm schrieb am Mittwoch, 2002-01-16:

> Another idea ... additionally.
> use set -x in apsfilter shellscript and see in the printers logfile,
> if apsfilter gets called an how, to make sure what happens or not ...

I did that. As I'm currently some 30 km away from the printer, I 
can't see what it produced, but now I know at least that apsfilter
was indeed called. In the directory /var/spool/lpd/ascii, two files
have been created: "lpq" and "lpq.0". The first one contains only:

4=filenames=lpq.0,prstatus=0x3c4485ce,queue_status_file=0x3c455d0d,

(including that comma at the end of the previous line).

The second is about 6 KiB and starts thus:

Printer: ascii@ser1 'PS;r=600x600;q=medium;c=gray;p=a4;m=ascii'
 Queue: no printable jobs in queue
 Status: IF filter 'apsfilter' filter msg - 'J(STDIN)' at 11:59:23.292
 Status: IF filter 'apsfilter' filter msg - 'Pchris' at 11:59:23.292
 Status: IF filter 'apsfilter' filter msg - 'Qascii' at 11:59:23.292
 Status: IF filter 'apsfilter' filter msg - 'N(STDIN)' at 11:59:23.292
 Status: IF filter 'apsfilter' filter msg - 'ldfA671christian.chrullrich.de' at
11:59:23.292
 Status: IF filter 'apsfilter' filter msg - 'UdfA671christian.chrullrich.de' at
11:59:23.292
 Status: IF filter 'apsfilter' filter msg - '' ']'' at 11:59:23.292
 Status: IF filter 'apsfilter' filter msg - '+ '[' '(STDIN)' = stdin -o '(STDIN)
' = '(stdin)' -o '(STDIN)' = '(STDIN)' ']'' at 11:59:23.293
 Status: IF filter 'apsfilter' filter msg - '+ unset JOB' at 11:59:23.293
 Status: IF filter 'apsfilter' filter msg - '+ '[' christian ']'' at 11:59:23.29
4

More data on request. 

As I said before, I don't really know what's lying in the printer's 
output tray right now, but I'm quite sure that it's still staircased
text. 

What I printed, BTW, was "fortune -l | lpr -Pascii". The remote queue
on the client (christian) is also called "ascii".

Thanks for your reply no. 2.

-- 
Christian UllrichRegistrierter Linux-User #125183

"Deliver."

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-stable" in the body of the message



Re: 4.4R: if: doesn't get started when getting remote print job (Re: apsfilter doesn't work on server)

2002-01-16 Thread Andreas Klemm

And please summarize in your mail the exact FreeBSD version.

uname -a could additionally help
FreeBSD titan.klemm.gtn.com 4.5-RC FreeBSD 4.5-RC #0...
^^


Andreas ///

-- 
Andreas Klemm
Apsfilter Homepage   http://www.apsfilter.org
Support over mailing-lists (only!)   http://www.apsfilter.org/support
Mailing-list archive http://www.apsfilter.org/Lists-Archives
Songs from our band >> 64Bits << http://www.64bits.de
Inofficial band pages with add-on stuff  http://www.apsfilter.org/64bits.html



msg40124/pgp0.pgp
Description: PGP signature


Re: 4.4R: if: doesn't get started when getting remote print job (Re: apsfilter doesn't work on server)

2002-01-16 Thread Andreas Klemm

Another idea ... additionally.
use set -x in apsfilter shellscript and see in the printers logfile,
if apsfilter gets called an how, to make sure what happens or not ...



Andreas ///

-- 
Andreas Klemm
Apsfilter Homepage   http://www.apsfilter.org
Support over mailing-lists (only!)   http://www.apsfilter.org/support
Mailing-list archive http://www.apsfilter.org/Lists-Archives
Songs from our band >> 64Bits << http://www.64bits.de
Inofficial band pages with add-on stuff  http://www.apsfilter.org/64bits.html



msg40123/pgp0.pgp
Description: PGP signature


4.4R: if: doesn't get started when getting remote print job (Re: apsfilter doesn't work on server)

2002-01-16 Thread Andreas Klemm

On Tue, Jan 15, 2002 at 10:35:22PM +0100, Christian Ullrich wrote:
> * Christian Ullrich wrote on Tuesday, 2002-01-15:
> 
> > * Michael Loßin wrote on Tuesday, 2002-01-15:
> > 
> > > On 15-Jan-02 Christian Ullrich wrote:
> > 
> > > Which spooler do you use on those?
> > 
> > BSD lpd on the Server, LPRng on the client.
> > 
> > > Please try to use LPRng on server *and* client machines, since
> > > the old BSD-style lpd has some problems with remote printing.
> > 
> > I'll try that ASAP.
> 
> Warning: The following is _very_ detailed. It took me three hours
> to do it all and write it down. If there is _any_ information 
> missing, please do not hesitate to ask.
> 
> Just as a reminder: The server is FreeBSD 4.4-RELEASE, the client
> is SuSE Linux 7.3, using LPRng 3.7.4. The printer in question, 
> connected to the server by parallel cable, is an HP LaserJet 1200,
> which is PostScript Level2 capable, although it also supports PCL.
> The problem in question is that, while printing on the server 
> works just fine, printing from the client seems to bypass apsfilter.
> The symptoms are:
> - Text is printed with "staircase effect".
> - PostScript is printed flawlessly.
> - Anything else is not printed at all.
> 
> The following is an account of my adventures tonight. Steps 1 to
> 18 took place on the server, 19, 20 and 21 on the client.
> 
> 1. I updated selected parts of the installed ports, nothing to do
>with printing or graphics or such things (but I thought I should
>include it here).
> 
> 2. I moved /etc/printcap and /etc/apsfilter out of the way.
> 
> 3. I moved all files in /usr/bin and /usr/sbin with names starting 
>with "lp" out of the way, provided they looked like parts of
>BSD lpd: /usr/bin/{lp,lpq,lpr,lprm} and /usr/sbin/{lpc,lpd}
> 
> 4. I rebuilt LPRng-3.7.6 from the ports collection and installed it
>as it was built, without messing with the build directory.
> 
> 5. I verified the settings in /usr/local/etc/rc.d/lprng.sh and found
>them to be in good order.
> 
> 6. I built apsfilter-7.2.1, with the following options enabled:
>- A4 - A4 papersize
>- GS_NO_X11 - Postscript for non-PS printer, no X11
>- GS_PDF_CRYPT - print encrypted PDF files using gs
>- PSUTILS - for pseudo duplex printing + paper handling
>- A2PS - ASCII files in different styles/orientation
>- DVIPS - TeX DVI files
>- HTML2PS - HTML documents
>- TROFF - Troff documents
>- BZIP2 - print bunzip2 compressed documents
>On the first attempt to "make install" apsfilter, I was told that
>the file /usr/local/etc/apsfilter existed. It was a symbolic link
>to /etc/apsfilter, which I had renamed in step 2. I removed the 
>link and installed again. This time it worked fine.

If you had updated the ports collection you would have used
apsfilter 7.2.1, which includes a fix for that by using
ln -sf ...

> 7. I started the SETUP script and accepted the ownership of
>root.daemon for the spool directory /var/spool/lpd .
> 
> 8. I configured a printer as follows:
>- Printer Driver Selection[PS]
>- Interface Setup [parallel], via /dev/lpt0
>- Paper Format[a4]
>- Printing Quality[medium]
>- Color Mode  [gray]
>- Print Resolution in "dots per inch" [600x600]
>- Default Printing Method [ascii]
> 
> 9. I printed a test page. Preparation took no time at all, printing,
>however, lasted 4:33. It is a complex page, after all, and the 
>HP 1200 seems to be slightly underpowered.
>
> 10. I installed that configuration under the name "ascii" and finished
> the SETUP script for the time being.
>
> This is the generated printcap (comments stripped):
>
> ascii|PS;r=600x600;q=medium;c=gray;p=a4;m=ascii:\
> :lp=/dev/lpt0:\
> :if=/etc/apsfilter/basedir/bin/apsfilter:\
> :sd=/var/spool/lpd/ascii:\
> :lf=/var/spool/lpd/ascii/log:\
> :af=/var/spool/lpd/ascii/acct:\
> :mx#0:\
> :sh:

Why you named it ASCII ?

> 11. I started LPRng and found this line in syslog:
> 
> Jan 15 20:41:02 ser1 checkpc[73259]: ascii: Checkwrite: fcntl F_SETFL 
> of '/dev/lpt0' failed - Operation not supported by device
>   
>   Similar output was generated by calling "checkpc -f". But sending
>   data to the printer was never the problem, so I'm currently not
>   much concerned about it.

Ask FreeBSD port maintainer, LPRng people.

> 12. I tried to print a simple text file ("lpr -Pascii /etc/printcap"),
> but lpq said this:
>   
>   Status: cannot open '/dev/lpt0' - 'Permission denied', attempt 2, 
>   sleeping 20 at 20:48:37.238
> 
> I removed the job ("lprm 337")
>   
> 13. I checked the permissions on /dev/lpt0: root.daemon 660.
> 
> 14. Trying to find out what user LPRng's lpd runs as, I read