home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / protocol / appletal / 3210 < prev    next >
Encoding:
Internet Message Format  |  1992-08-27  |  2.9 KB

  1. Path: sparky!uunet!mcsun!uknet!stl!bnr.co.uk!th
  2. From: th@bnr.co.uk (Tony Heskett)
  3. Newsgroups: comp.protocols.appletalk
  4. Subject: setdefaulttimeouts probs
  5. Message-ID: <1992Aug27.181821.10480@bnr.co.uk>
  6. Date: 27 Aug 92 18:18:21 GMT
  7. Sender: daemon@bnr.co.uk
  8. Reply-To: th@bnr.co.uk (Tony Heskett)
  9. Followup-To: comp.protocols.appletalk
  10. Organization: BNR Europe Limited, London Road, Harlow, Essex, GB
  11. Lines: 66
  12.  
  13.  
  14. Julian Turnbull writes (re "setdefaulttimeouts") :
  15.  
  16. > Here, we get round it by patching lwsrv to toss away the
  17. > offending chunk of PostScript (not just that line).  However, I
  18. > haven't offered that patch to djh because
  19.  
  20. Which were the other bits you threw, please, and why ?
  21.  
  22. > (a) it's a dirty hack;
  23. > (b) when I did it, no-one else was complaining of the problem,
  24. >     so I thought it must be something peculiar about our local setup.
  25. > Now I'm seeing a couple of messages that suggest the problem is
  26. > more widespread, and I'm starting to wonder why _everybody_
  27. > isn't seeing it.
  28.  
  29. That's funny, that's just what we thought ...
  30.  
  31. > Can someone out there offer an explanation (or a more elegant
  32. > solution)?
  33.  
  34. I can offer a dirtier solution ('cos I didn't want to change the C
  35. source).   Use the -C switch on lwsrv to define a different print
  36. command from lpr/lp, then put this in a script with the name you
  37. chose:
  38.  
  39.   #!/bin/sh
  40.    
  41.   # Filename is the last argument that lwsrv passes to lpr.
  42.   FILENAME=`echo $* | awk '{print $NF}'`
  43.    
  44.   # Hack the setdefaulttimeout line out of the PostScript file.
  45.   /usr/stl/bin/perl -p -i -e 's/^.*setdefaulttimeout.*$//;' ${FILENAME}
  46.    
  47.   # Re-run the original print job with the fixed-up file.
  48.   /usr/ucb/lpr $@
  49.  
  50. No shame, eh ?  :-)    
  51.  
  52. BTW, sed silently lost half the file, presumably because some of
  53. the lines were too long.   Thanks, Larry.
  54.  
  55. A bit later, tilley@ccu.umanitoba.ca (Richard Tilley) writes:
  56.  
  57. > The prep file I looked at only executed  "setdefaulttimeouts" if
  58. > the current "waittimeout" was less than 300 seconds. The default
  59. > on most printers will be 30 seconds.  Changing this default to
  60. > 300 bypassed the problem.
  61.  
  62. I looked for this setdefaulttimeout command in the Transcript
  63. s/w, got Mac to print to local disk (PS file) and checked there,
  64. grepped through all the CAP procsets ...    I could only find it
  65. in the file in the Unix spool directory.
  66.  
  67. So what gives ?   Do I have to save a new procset, then change the
  68. 30 sec to 300 sec in there ?    If so, could you p'raps point me in
  69. the correct direction for instructions on how to do this ?
  70.  
  71. Incidentally, I should be following the postings here but if you've
  72. got any really great suggestions (or flames 8^)  I'd be chuffed
  73. if you'd email me them too.  If not, no prob.
  74.  
  75. Cheers - Tony
  76. ____________________________________________________________________________
  77. Tony Heskett          th@bnr.co.uk   Tel: (+44) 279 402637, (+44) 831 546576
  78. BNR, London Road, Harlow, CM17 9NA   Fax: (+44) 279 451434
  79.