Re: LPRng: permissions on /var/spool/printer

2003-12-02 Thread Sam Lown
Hi,

On Tue, 2003-12-02 at 17:04, David Bear wrote:
 I would like to have a queue administrator that is not root.  I
 noticed that lpd runs a su 'daemon' and that /var/spool/lpd/.. is
 owned by daemon and group daemon.  Yet the perms set on /var/spool/lpd
 are 700.  If I set perms to 770 and then put a user in the daemon
 group would that enable that person to be a 'printer admin', ie use
 lpc to hold, flush, release queues?

Basically, no. It would only allow them to delete and read spool files
and logs directly. Logs can usually seen with lpq -v and deleting spool
files, unless something has crashed, is generally a bad idea.

Look at the /etc/lpd.perms file for user access permissions.
Something like:

ACCEPT SERVICE=C SERVER REMOTEUSER=your user

should do the trick. A queue administrator can then use lpc to control
the queues. 

Cheers,

sam



-
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:   | example:
subscribe LIST mailaddr   |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST mailaddr |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-


Re: LPRng: Hello + ifhp.conf

2003-11-29 Thread Sam Lown
Hi All,

Trust an engineer to be using a 24-pin dot Matrix and then complain
about problems... perhaps the 'fix' in this sense is a little more
'global' ;-)

Seriously though, have a look at the logs in the printers spool
directory to identify the problem (usually /var/spool/lpd/printer),
saying it simply doesn't work is not actually very helpful.

However, an important point has been raised here, one which I had also
been thinking about. 

I do agree with James that the ifhp.conf file is getting to an
unmanageable state. Aside from the structure and interpretation
difficulties, personal modifications and staying current with the latest
version is not as trivial as it should be.

A possible solution to this would be to take a leaf out of the book that
the clever Debian folk read, specifically the page on the modules.conf
file and update-modules script.

For the benefit of the non-debian users, the update-modules script
simply reads all the text files in the /etc/modutils directory and its
sub-directories. The text is then all concatenated together, mixed with
a dash of platform specific code and comments, and out comes the
modules.conf file. Simple.

By doing this to the ifhp situation: no modifications need to be made to
the IFHP program code, personal additions are not overwritten, you can
edit the configurations and save without modifying the running config...
etc.

Thoughts anyone?

Cheers,

sam

On Fri, 2003-11-28 at 21:50, James Richard Tyrer wrote:
 I would like to introduce myself.
 
 I am the (somewhat unofficial) maintainer for LPRng support in KDE.
 
 I am a professional engineer.  And, please note that this is not self 
 aggrandizement, it 
 is a WARNING. :-)  Engineers are trained to find things that are wrong with 
 something 
 (find the fault) and come up with ways to fix it.  We are sometimes blunt about this 
 and 
 we like to argue.  In short.  We (engineers) can be somewhat irritating people.  
 But, our 
 intentions are good -- to improve the product.
 
 I could really use a little help getting my old Epson 24-pin dot Matrix printer to 
 work 
 with IFHP.  If not, I will have to use FooMatic.
 
 I have added this to: ihfp.conf:
 
   # PRINTER gs_epson24 - Epson LQ1000
   [ gs_epson24 ]
   tc=ghostscript
   gs_device=epson
   gs_options=-r360x180
 
 and the necessary entry in: printerdb (which works OK).  It appears to configure 
 correctly with: lprngtool, the files appear in the 'var' directory, but it does 
 not print.
 
 So, this is the first fault that I find with IHFS.  The: ihfp.conf file is 
 simply too 
 long.  I would suggest that it have its own directory containing:
 
   general.conf
   pjl.conf
   pcl.conf
   ps.conf
   gs.conf
   text.conf
   driver-name.printer
 
 Where all files with the extension printer would be concatenated to make the 
 printer.conf file.  To avoid the huge configuration file for printers, I would 
 suggest 
 individual printer files for each driver name (e.g. gs_epson24.printer).  If that 
 were 
 the case there is no need for concatenation since the filter could simply read the 
 file it 
 needed.
 
 But, in any case, a 5K+ configuration file is simply unmanageable.
 
 And, I didn't figure it out.
 
 I note that this is always a weakness of any print spooler/filter system.  They 
 always 
 rely on a 'magic file' that contains the information needed to make a specific 
 printer 
 work. Simplifying the configuration file that a user might need to edit is always a 
 good idea.
 
 --
 JRT
 
 
 -
 YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
 The address you post from MUST be your subscription address
 
 If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
 or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
 to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
 with:   | example:
 subscribe LIST mailaddr   |  subscribe lprng-digest [EMAIL PROTECTED]
 unsubscribe LIST mailaddr |  unsubscribe lprng [EMAIL PROTECTED]
 
 If you have major problems,  send email to [EMAIL PROTECTED] with the word
 LPRNGLIST in the SUBJECT line.
 -


-
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:   | example:
subscribe LIST mailaddr   |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST mailaddr |  unsubscribe lprng [EMAIL PROTECTED]

If you 

Re: LPRng: Changing Spoolers on RedHat 9

2003-10-20 Thread Sam Lown

The redhat-switch-printer tool does indeed work, however if you've
forgotten to install it or can't find it, you can do it manually. These
commands are simply taken from the nicely written
/usr/share/redhat-switch-printer/functions.py python script file:

Convert to LPRng (Most useful ;-) :
/bin/rm /etc/printcap
/usr/bin/alternatives --set print /usr/bin/lpr.LPRng
/sbin/service cups stop
/usr/sbin/printconf-backend --force-rebuild
/sbin/service lpd start

Convert to CUPS (for testing purposes, of course ;-) :
/usr/bin/alternatives --set print /usr/bin/lpr.cups
/sbin/service lpd stop
/usr/sbin/printconf-backend
/sbin/service cups start

Maybe this will save somebody somewhere a bit of time. Especially useful
to know what happens if either of the other scripts doesn't work!

Cheers,

sam


On Mon, 2003-10-20 at 22:49, Tim Waugh wrote:
 On Mon, Oct 20, 2003 at 12:47:32PM -0700, Patrick Powell wrote:
 
  Here is a quick script that switches the print spooler on RedHat:
 
 ...or use redhat-switch-printer, which actually comes from the CDs.
 
 :-/
 
 Tim.
 */
-- 
CERN, Geneva 
E-mail: samuel.lown (at) cern.ch


-
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:   | example:
subscribe LIST mailaddr   |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST mailaddr |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-


Re: LPRng: need help: ifhp-3.5.10

2003-08-25 Thread Sam Lown
Hi,

On Mon, 2003-08-25 at 12:29, Longina Przybyszewska wrote:
 1. its over production of ifhp* files (hundreds !!) in /var/spool/lpd -
 whith the same inhold:

Check the list for the patch I posted to the list to fix this problem. I
believe the next version of IFHP will not have the same bug.

 2. filtering text files through a2ps doesn't work:
 it seems that the right filter is being used, but it is not - text file is
 not getting its prettyformat, just raw text:
 

Have you checked that the options are ok?

Try in a console: 

/usr/local/bin/a2ps -q -B -1 -E -M A4 --borders=no -o test.ps textfile

Where textfile is the file you want to print. The filter_status text
doesn't show any problems. May be a problem with your a2ps install
finding the required pretty conversion reference files??

Hope this helps,
Cheers,

sam

 ===
 default_language=text
 forceconversion

Having forceconversion can give you problems, especially when dealing
with the crap that Windows spits out!

Cheers,

sam

 
 ## UNIX File utility path
 file_util_path= /usr/local/bin/file \%s{inputfile}
 ## Patterns and Converters
 # example conversion program
 file_output_match = [
 *postscript* ps \%s{ps_converter}
 *pdf* ps \%s{pdf2ps_converter}
 *pcl* pcl \%s{pcl_converter}
 *pjl* pjl \%s{pjl_converter}
 *printer*job*language* pjl
 *text* ps \%s{text_converter}
 *gzip_compressed* filter \%s{gzip_decompress}
 * msg no_converter
 ]
 ...
 ...
 a2ps_options= -q -B -1 -E -M \%M{papersize} --borders=no -o-
 a2ps_converter= /usr/local/bin/a2ps \%s{a2ps_options} \%s{inputfile}
 
 pdf2ps_converter= /usr/local/bin/gs -dSAFER -dPARANOIDSAFER -dBATCH
 -dNOPAUSE -q '\-sOutputFile=/dev/fd/3' 31 12 -sDEVICE=pswrite
 \%{pdf2ps_options} -c save pop -\f \%s{inputfile}
 
 
 ps_converter=
 pcl_converter=
 pjl_converter=
 text_converter= \%s{a2ps_converter}
 =
 
 Longina
 --
 Longina Przybyszewska, system programmer
 Dept. of Math.  Comp. Sci. - IMADA
 University of Southern Denmark, Odense
 Campusvej 55,DK-5230 Odense M, Denmark
 
 tel: +45 6550 2359 - http://www.imada.sdu.dk email: [EMAIL PROTECTED]
 --
 
 -
 YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
 The address you post from MUST be your subscription address
 
 If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
 or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
 to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
 with:   | example:
 subscribe LIST mailaddr   |  subscribe lprng-digest [EMAIL PROTECTED]
 unsubscribe LIST mailaddr |  unsubscribe lprng [EMAIL PROTECTED]
 
 If you have major problems,  send email to [EMAIL PROTECTED] with the word
 LPRNGLIST in the SUBJECT line.
 -
-- 
CERN, Geneva 
IT - Product Support - Unix Infrastructure
E-mail: samuel.lown (at) cern.ch


-
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:   | example:
subscribe LIST mailaddr   |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST mailaddr |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-


Re: LPRng: OF banner program problems - URGENT

2003-06-27 Thread Sam Lown

Aha! I got the ba***rd!

After several hours of searching through the LPRng code and working out
how it works, I finally discovered the bug.

The bug is in the printjob.c file, for some reason the function
Run_OF_filter() is called in an if as such:

  if ( Run_OF_filter( blurb ), Status_file_DYN ) {
goto exit;
  }

I didn't know that if likes commas in the conditional statement, but
assuming the Status_file is set, the condition always returns true. The
goto exit is then carried out with error message or any other bit of
useful information!

I must say, this is a critical bug as any configuration with the OF
filter defined WILL fail!! (as has happened to me for the last 6 months
thinking that it was a problem with the printers!)

Attached is a patch for LPRng version 3.8.21 to modify the three
instances of this bug.

Hopefully this can be merged with the official version as soon as
possible.

Cheers,

sam


On Wed, 2003-06-25 at 14:53, Sam Lown wrote:
 Hello,
 
 There seems to be a problem with the banner filter program (of)
 execution in LPRng versions above 3.8.15. 
 
 The OF filter starts ok, but after suspending the IF filter never kicks
 in and just the banner page gets printed.
 
 It works as expected with LPRng version 3.8.15 however versions 3.8.19
 and above don't.
 
 I've been plagued with this problem for quite some time but only just
 come to realise that this occurs.
 
 Does anyone have any suggestions? is this a configuration error or a
 bug? - as I've used identical configurations with both .15 and .19+ I'd
 imagine it is a bug. I'll try and have a look at the code to see if I
 can narrow the problem down, as soon as I have time!
 
 cheers,
 
 sam
-- 
CERN, Geneva 
IT - Product Support - Unix Infrastructure
E-mail: [EMAIL PROTECTED]
diff -r -C 3 LPRng-3.8.21/src/common/printjob.c LPRng-3.8.21-new/src/common/printjob.c
*** LPRng-3.8.21/src/common/printjob.c	Wed Apr 16 01:37:42 2003
--- LPRng-3.8.21-new/src/common/printjob.c	Fri Jun 27 17:09:52 2003
***
*** 123,129 
  	char *id, *s, *banner_name, *transfername, *openname, *format;
  	struct line_list *datafile, files;
  	struct stat statb;
! 
  	of_pid = -1;
  	msgbuffer[0] = 0;
  	filtermsgbuffer[0] = 0;
--- 123,129 
  	char *id, *s, *banner_name, *transfername, *openname, *format;
  	struct line_list *datafile, files;
  	struct stat statb;
! 	
  	of_pid = -1;
  	msgbuffer[0] = 0;
  	filtermsgbuffer[0] = 0;
***
*** 194,200 
  		if( Run_OF_filter( send_job_rw_timeout, of_pid, of_stdin, of_stderr,
  			output, Outbuf, Outmax, Outlen,
  			job, id, 0,
! 			msgbuffer, sizeof(msgbuffer)-1 ), Status_file_DYN ){
  			goto exit;
  		}
  	} else if( Outlen ){
--- 194,200 
  		if( Run_OF_filter( send_job_rw_timeout, of_pid, of_stdin, of_stderr,
  			output, Outbuf, Outmax, Outlen,
  			job, id, 0,
! 			msgbuffer, sizeof(msgbuffer)-1 ) ){
  			goto exit;
  		}
  	} else if( Outlen ){
***
*** 344,350 
  	if( Run_OF_filter( send_job_rw_timeout, of_pid, of_stdin, of_stderr,
  		output, Outbuf, Outmax, Outlen,
  		job, id, 0,
! 		msgbuffer, sizeof(msgbuffer)-1 ), Status_file_DYN ){
  		goto exit;
  	}
  } else {
--- 344,350 
  	if( Run_OF_filter( send_job_rw_timeout, of_pid, of_stdin, of_stderr,
  		output, Outbuf, Outmax, Outlen,
  		job, id, 0,
! 		msgbuffer, sizeof(msgbuffer)-1 ) ){
  		goto exit;
  	}
  } else {
***
*** 510,516 
  		if( Run_OF_filter( send_job_rw_timeout, of_pid, of_stdin, of_stderr,
  			output, Outbuf, Outmax, Outlen,
  			job, id, 1,
! 			msgbuffer, sizeof(msgbuffer)-1 ), Status_file_DYN ){
  			goto exit;
  		}
  	} else {
--- 510,516 
  		if( Run_OF_filter( send_job_rw_timeout, of_pid, of_stdin, of_stderr,
  			output, Outbuf, Outmax, Outlen,
  			job, id, 1,
! 			msgbuffer, sizeof(msgbuffer)-1 ) ){
  			goto exit;
  		}
  	} else {


Re: LPRng: Problem with 'file'

2003-06-26 Thread Sam Lown
On Wed, 2003-06-25 at 21:58, Matt Forrest wrote:
 The 1st 1200 bytes of the file are all zero (AKA 0x00) immediately after
 that you have the normal ESC code for some PJL stuff
 

I too confirmed this, there is something seriously wrong with one of
your drivers.

How did you generate this file? is it directly from windows i.e. Print
to file, or is it taken from a stopped queue on the server?

I am not surprised that 'file' is having problems! We too use the same
printer here, if you like I can try and find out the version of our
windows drivers (I'm a unix person ;-) as I know for a fact that we
don't get that 'crappy' stuff at the beginning of printouts.

cheers,

sam


 Try stripping off just those bytes or get
 http://www.scs.ryerson.ca/mforrest/printing/Job927-df-mf.prn
 
 
 In the -PCL- you don't have the ESC code to end the job.. shouldn't be a
 problem if the printer is set to auto personality, but I've always seen it
 there.  If you just strip the zeros from the start of the file I'm
 guessing it will work fine.
 
 I haven't tried printing it 'cause I'm lazy right now and don't want to
 have to walk to the printer :)
 
 
 mATT
 
 *
 
A neurotic worries about going crazy, but never will
A psychotic IS crazy, but doesn't worry about it!
 
   ... Don't worry, be happy!!!  :}
 
 *
 
 
 
 
 -
 YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
 The address you post from MUST be your subscription address
 
 If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
 or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
 to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
 with:   | example:
 subscribe LIST mailaddr   |  subscribe lprng-digest [EMAIL PROTECTED]
 unsubscribe LIST mailaddr |  unsubscribe lprng [EMAIL PROTECTED]
 
 If you have major problems,  send email to [EMAIL PROTECTED] with the word
 LPRNGLIST in the SUBJECT line.
 -
-- 
CERN, Geneva 
IT - Product Support - Unix Infrastructure
E-mail: [EMAIL PROTECTED]


-
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:   | example:
subscribe LIST mailaddr   |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST mailaddr |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-


LPRng: OF banner program problems

2003-06-25 Thread Sam Lown
Hello,

There seems to be a problem with the banner filter program (of)
execution in LPRng versions above 3.8.15. 

The OF filter starts ok, but after suspending the IF filter never kicks
in and just the banner page gets printed.

It works as expected with LPRng version 3.8.15 however versions 3.8.19
and above don't.

I've been plagued with this problem for quite some time but only just
come to realise that this occurs.

Does anyone have any suggestions? is this a configuration error or a
bug? - as I've used identical configurations with both .15 and .19+ I'd
imagine it is a bug. I'll try and have a look at the code to see if I
can narrow the problem down, as soon as I have time!

cheers,

sam
-- 
CERN, Geneva 
IT - Product Support - Unix Infrastructure
E-mail: [EMAIL PROTECTED]


-
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:   | example:
subscribe LIST mailaddr   |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST mailaddr |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-


Re: LPRng: HPDJ755CM help

2003-06-23 Thread Sam Lown
Hi,

The black area problem sounds like it could be to do with the drivers.
We had a similar problem here, but we discovered that one of my scripts
that removed nasty escape characters that the windows driver added, was
also removing escape characters from HPGL2 pictures. The code was
altered to only modify the data at the end of the job (were the windows
error occurs) and everything worked ok.

Another problem we had was with large images in Adobe Illustrator, it
would print a job and miss off large blocks at the end of the document.
The final solution was to lower the resolution of the image, not ideal
but at A1 size the difference was not noticeable.

The USTATUS is a pjl command that tells the printer how and when to send
bi-di messages back. In the end we've taken off status for this potter,
so its a bit irrelevant. The details are taken from one of the
specification documents I found on the internet, in an attempt to ensure
that only commands the plotter recognises are sent.

I would suggest you add status@ to the configuration (if not already) so
that weird status messages are ignored - maybe this is related with the
driver problem ..? 

We also use the more modern 1055cm plotters, these are a lot nicer and
less error prone!

cheers,

sam

On Fri, 2003-06-20 at 21:47, David Fetrow wrote:
  It may be worth noting there are TWO versions of the HPDJ755CM
  and they are different enough that HP has two windows (and mac?)
  drivers for them on their website. You have to look at the model
  number on the back (not the front) to tell which one you have.
 
  It matters a lot that you use the right one.
 
  If you are generating these files from Windows (or mac), you
  could be using the wrong driver.
 
  On the 800ps side: Get an HP5X00ps if you can. It is a LOVELY
  machine in most respects. I'd probably hate it if I'd only had
  experience with regular printers but, for a 48 plotter/printer,
  it is a gem.
 
 
 David Fetrow Phone: 206 616-0869
 Distributed Computing Services   Pager: 206 405-5377
 Applied Physics Lab, Univ. of Washington
 
 On Fri, 20 Jun 2003, Ryan Novosielski wrote:
 
  Sam,
 
  I bet I am using it, and yes, it does work very well for me... EXCEPT:
  I am getting large black fields, usually toward the end of the posters. It
  seems to be random, and could even be hardware I /suppose/, but it seems
  like an awfully big coincidence that the lab staff started complaining to
  me right around when I started to use the hpgl2 code for the printer.
 
  I am reading the PS header out of the dfAXXX... file in /var/spool/lpd.
  Does this mean the Mac is sending it? I don't know why it would be, as I'm
  using the driver for that printer and that printer does not speak PS3.
 
  Can I ask you what the second part of your ifhp entry does? (the
  pjl_ustatus section). This part I do not have, and I'm wondering if the
  reason the printer is bombing out toward the end is it gets some bad data
  in the form of status polling and starts printing black -- it's wasting a
  lot of time, ink, and paper at the moment.
 
  On a good note, the plotter is being replaced with an 800ps in the near
  future. Anyone got one of these?
 
   _  _ _  _ ___  _  _  _
  |Y#| |  | |\/| |  \ |\ |  |  | Ryan Novosielski - Jr. UNIX Systems Admin
  |$| |__| |  | |__/ | \| _|  | [EMAIL PROTECTED] - 973/972.0922 (2-0922)
  \__/ Univ. of Med. and Dent. | IST/ACS - NJMS Medical Science Bldg - C630
 
  On Thu, 12 Jun 2003, Sam Lown wrote:
 
   Hi Ryan,
  
   I sent a patch to the list for sending raw HPGL/2 files to IFHP
   connected plotters, I'd assume your using this patch? - If so, I'm very
   glad to hear its working for you :-)
  
   As for PS, which file are you reading the first line from? IFHP doesn't
   change any of the PostScript headers, it sends the file as-is with a bit
   of PJL header code, at least for the 755cm plotters! You can check this
   with the following command:
  
   cat postscriptfile.ps | ifhp -Tmodel=hpdj755cm,trace  output.prn
  
   and then check out the headers at the top of output.prn.
  
   BTW, my ifhp.conf file with HPGL/2 patch for this plotter is:
  
   --- CUT
  
   [ hpdj230 hpdj250c hpdj330 hpdj350c hpdj430 hpdj450c hpdj455ca hpdj700
   hpdj750c hpdj750cplus hpdj755cm hpdj2000cp ]
  
   ## These printers should support HPGL2
   hpgl2
  
   pjl_only=[
   COMMENT ECHO ENTER EOJ
   INFO RESET SET
   USTATUS USTATUSOFF
 ]
  
   pjl_ustatus=
   @PJL USTATUSOFF
   @PJL USTATUS DEVICE = ON
   @PJL USTATUS TIMED = 10
  
   --- END CUT
  
   Hope this helps,
   cheers,
  
   sam
  
   On Wed, 2003-06-11 at 17:09, Ryan Novosielski wrote:
I forget exactly who it is, but someone wrote a patch for ifhp.conf that
included a printer def for the 755cm. I am currently using it for HPGL and
am very pleased

Re: LPRng: HPDJ755CM help

2003-06-12 Thread Sam Lown
Hi Ryan,

I sent a patch to the list for sending raw HPGL/2 files to IFHP
connected plotters, I'd assume your using this patch? - If so, I'm very
glad to hear its working for you :-)

As for PS, which file are you reading the first line from? IFHP doesn't
change any of the PostScript headers, it sends the file as-is with a bit
of PJL header code, at least for the 755cm plotters! You can check this
with the following command:

cat postscriptfile.ps | ifhp -Tmodel=hpdj755cm,trace  output.prn

and then check out the headers at the top of output.prn.

BTW, my ifhp.conf file with HPGL/2 patch for this plotter is:

--- CUT

[ hpdj230 hpdj250c hpdj330 hpdj350c hpdj430 hpdj450c hpdj455ca hpdj700
hpdj750c hpdj750cplus hpdj755cm hpdj2000cp ]

## These printers should support HPGL2
hpgl2

pjl_only=[
COMMENT ECHO ENTER EOJ
INFO RESET SET
USTATUS USTATUSOFF
  ]

pjl_ustatus=
@PJL USTATUSOFF
@PJL USTATUS DEVICE = ON
@PJL USTATUS TIMED = 10

--- END CUT

Hope this helps,
cheers,

sam

On Wed, 2003-06-11 at 17:09, Ryan Novosielski wrote:
 I forget exactly who it is, but someone wrote a patch for ifhp.conf that
 included a printer def for the 755cm. I am currently using it for HPGL and
 am very pleased with the results. HOWEVER, for PS, I am getting files
 (when printing from a Mac, for example) that contain PS3, according to the
 first line of the file. The printer receives them, smiles and nods, and
 silently dumps the file. As the Mac PPD for the printer clearly says PS
 level 2, I believe that ifhp may be handing it level 3 for some reason. Is
 this far-fetched? How can I make sure the printer always gets level 2,
 even if this problem isn't caused by ifhp?
 
  _  _ _  _ ___  _  _  _
 |Y#| |  | |\/| |  \ |\ |  |  | Ryan Novosielski - Jr. UNIX Systems Admin
 |$| |__| |  | |__/ | \| _|  | [EMAIL PROTECTED] - 973/972.0922 (2-0922)
 \__/ Univ. of Med. and Dent. | IST/ACS - NJMS Medical Science Bldg - C630
 
 -
 YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
 The address you post from MUST be your subscription address
 
 If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
 or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
 to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
 with:   | example:
 subscribe LIST mailaddr   |  subscribe lprng-digest [EMAIL PROTECTED]
 unsubscribe LIST mailaddr |  unsubscribe lprng [EMAIL PROTECTED]
 
 If you have major problems,  send email to [EMAIL PROTECTED] with the word
 LPRNGLIST in the SUBJECT line.
 -
-- 
CERN, Geneva 
IT - Product Support - Unix Infrastructure
E-mail: [EMAIL PROTECTED]


-
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:   | example:
subscribe LIST mailaddr   |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST mailaddr |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-


Re: LPRng: foomatic + ifhp

2003-06-10 Thread Sam Lown
Hi All,

Going back to the foomatic+ifhp subject that was posted to the list back
in March.

Looking at the e-mail sent by Patrick Powell to the list, it would seem
that something was started in the ifhp back in 2001, but sadly nothing
materialised. 

The ability to use PPD files with IFHP would be, as stated in the
e-mails below, a very very useful feature and may alleviate some of the
problems in maintaining the ifhp.conf file. We also wouldn't loose the
most useful features of IFHP, i.e. bi-di.

So, if anyone (probably Patrick Powell) has a copy of the code that was
made, I'd love to have a copy to see if can finish it off. With the
growing number of printers and types here, it might be worth the time
and effort.

If no starting point is available, then I'll probably have a go at
producing a complete patch myself.

cheers,

sam

On Thu, 2003-03-27 at 02:55, Till Kamppeter wrote:
 I think this is really a good idea, because now you have to decide (at 
 least before CUPS 1.2 comes out), either support for bi-di features with 
 ifhp or support for all printer models and driver options with Foomatic. 
 I am wondering why nothing happened around the Foomatic/ifhp combo as 
 Patrick Powell was the one bringing in this idea. Is there anyone more 
 experienced with ifhp than me who want to do it? If something is there 
 please send it to me (or post it on the foomatic-devel forum on 
 linuxprinting.org) so that I can include it in the official Foomatic 
 package (and the setup instructions as LPRng Docs on the web site. 
 Please use Foomatic 3.0.x (http://www.linuxprinting.org/foomatic2.9/), 
 as I will release 3.0.0 in two or three weeks and so Foomatic 2.0.x can 
 be considered as obsolte. Another advantage of Foomatic 3.0.x is that it 
 gives full support for manufacturer-supplied PostScript PPD files to all 
 spoolers including LPRng 
 (http://www.linuxprinting.org/foomatic2.9/ppd-doc.html).
 
 Till
 
 
 Craig Small wrote:
  On Tue, Mar 18, 2003 at 12:25:50PM -0800, Luca Filipozzi wrote:
  
 Whatever happened to the idea of using foomatic + ifhp together as
 suggested in your email to this list?
 
 http://marc.theaimsgroup.com/?l=lprngm=100739756403529w=2
  
  
  If that happened that would be so amazingly fantastic.  LPRng is a good
  program, lprngtool is *almost* there but having access to all the
  foomatic preinter definitions would be icing on the cake.
  
  Of course you can muck around with the printerdb in lprngtool but it 
  misses the point.
  
- Craig
  
 
 
 
 -
 YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
 The address you post from MUST be your subscription address
 
 If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
 or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
 to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
 with:   | example:
 subscribe LIST mailaddr   |  subscribe lprng-digest [EMAIL PROTECTED]
 unsubscribe LIST mailaddr |  unsubscribe lprng [EMAIL PROTECTED]
 
 If you have major problems,  send email to [EMAIL PROTECTED] with the word
 LPRNGLIST in the SUBJECT line.
 -
-- 
CERN, Geneva 
IT - Product Support - Unix Infrastructure
E-mail: [EMAIL PROTECTED]


-
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:   | example:
subscribe LIST mailaddr   |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST mailaddr |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-


LPRng: left over ifhpXXXXX files solution!?

2003-03-19 Thread Sam Lown
Hi All,

After some effort searching though the ifhp code I finally decided what
(I think) is wrong and seemingly fixed it.

It appears that after the last modifications to ifhp the Make_tempfile
code was changed to accommodate the passing of filenames and therefore
in the case of a filename pointer being passed, the temp file is NOT
unlinked after being created and no other unlink is ever performed -
hence the most annoying ifhpXXX files remain - at least, thats how I
understand it!

So, my solution after searching around and finding the (IMHO dirty)
Global InputFile pointer I implemented a simple bit of code that checks
to make sure that InputFile is not the same as the passed -e value nor
equal to /dev/fd/0 and then unlinks the file.

I tested and installed the new ifhp on our servers and so far it seems
to be working fine, i.e. no complaints yet!. The biggest difference
however is with the /var/spool/lpd directory, in our most loaded server
it used to be around 1.5 to 2gb full at any one time, now it floats
around 300 to 500 mb, which is much better!

A diff between the last ifhp.c (3.5.10) and mine should be attached...
perhaps something similar should be integrated into the original ifhp
and to that end, if anyone thinks it should be done differently, please
say!

Cheers,

Sam Lown


-- 
CERN, Geneva 
IT - Product Support - Unix Infrastructure
E-mail: [EMAIL PROTECTED]
423a424
   
1346a1348,1364
   /* Added by Sam Lown, CERN 
* Based on info provided by Bernhard Koelbl, InterFace AG 
*  - This is a bit messy but with passing variables through globals
*one can never be sure what the state is! 
*/
 
   /* Check again for the -e option */
   if( (s = Loweropts['e'-'a']) ){
   /* we have a file specified on the command line */
   if ( safestrcmp(s,InputFile) || safestrcmp(Devfd0, InputFile) ) {
   DEBUG1(End_of_job: Unlinking Temporary file '%s', InputFile);
   unlink(InputFile);
   }   
   }   
 
   /* End of addition */
   


Re: LPRng: ifhpXXXXXX files

2003-03-04 Thread Sam Lown
On Tue, 2003-03-04 at 01:16, Anthony Thyssen wrote:
 | 
 The ifhpX files are being created by the ifhp conversion filter
 table...  file_output_match = [ ... ]

 Whenever a filter is applied the output is placed into the temporary
 file before either the next filter is applied or the file is forwarded
 to the printer.
 

I see, I hadn't realised this before.
Is it possible therefore to turn off the conversion filters? - we do all
the processing and conversion before sending the data to ifhp so there
is no real need for it anyway! I've had a look through ifhp.conf and
couldn't see anything obvious for de-activating these filters other than
emptying the file_output_match array (?), I'd prefer to do from the
command line if possible .

 As ifhp is finished by the time any accounting is performed you can
 place the remove into an ifhp accounting filter (accounting= in either
 the ifhp.conf or on the ifhp= printcap options).  Even if that is
 the only this that your accounting program does.  It make no difference
 if you remove the files during filestart, fileend or even as a af=
 filter.
 
 By cleaning up during accounting the tempory files only exist for the
 specific job under process, and means your spool directories remain
 clear of them.
 

A possibility I had considered, but I think I would prefer for them not
to be created in the first place - I may end up implementing it though
if nothing else works.

Cheers,
sam


 That only leaves the problem of handling 3, 1Gbtye temporary file
 copies of a huge file the user decided to print!  :-)
 
   Anthony Thyssen ( System Programmer )http://www.sct.gu.edu.au/~anthony/
  -
  Wecome to the Internet Scratch-It   ###  ###  ###  ###  ###  ###
  Any three matches to win!      ###  ###  ###  ###  ###  ###
  -
  Anthony's Home is his Castle http://www.sct.gu.edu.au/~anthony/
 
-- 
CERN, Geneva 
IT - Product Support - Unix Infrastructure
E-mail: [EMAIL PROTECTED]


-
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:   | example:
subscribe LIST mailaddr   |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST mailaddr |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-


Re: LPRng: OffendingCommand: ^[

2003-03-04 Thread Sam Lown
On Fri, 2003-02-28 at 22:25, David Fetrow wrote:
  I'd be very interested in your solutions if any.

In the end I implemented a small perl script that removes the incomplete
PJL command from the job. For completeness, I've included the basic
script added to the filter pipeline:

#!/usr/bin/perl -w
#
# pjlflt - remove nasty bits of PJL code  
#
while (STDIN) {
if (m/\c[/) {
if (s/\c[[^(%\-12345X)]//g || s/\c[$//g) {
print STDERR NASTY PJL CODE REMOVED!!\n;
}
}
print;
}
1;

I'll eventually get round to re-writing this script in C to speed things
up a bit, but as it stands the performance is not too bad. The server
machines are fairly powerful so it usually takes about 2-3s to scan a
50mb file, which is acceptable in our situation. 

BTW. if anyone has any suggested C code or better perl code, I would be
very interested to hear from you.

Cheers,

sam

 
  I have been known to simply skip the ifhp altogether
  and just use lprng raw. This typically works as long
  as I don't need the ifhp features.
 
  What makes that practical here is the problem seems
  to be restricted to only a few printers (possibly
  some drivers are worth than others?)
 
  It's a reasonable approach to take if your accounting
  needn't be too precise and you don't use the nifty
  features in ifhp and just want paper to come out with
  marks on it.
 
 
 David Fetrow Phone: 206 616-0869
 Distributed Computing Services   Pager: 206 405-5377
 Applied Physics Lab, Univ. of Washington
 
 On 27 Feb 2003, Sam Lown wrote:
 
  Hello,
 
  Does anyone have any experience with this particular error message?
 
  getting end using 'pjl job/eoj' at time
  error = 'undefined' at time
  Error: 'undefined'; OffendingCommand: ^[ at time
 
  I've managed to find the source and reason for the error message,
  however I can't decide on the best way to solve it (or at least, the
  most practical way!) I'm upgrading the print service from the old
  CTI-IFHP to the new ifhp, the old CTI version just ignored these error
  messages, however the new ifhp takes more notice and tends to mess up
  the accounting!
 
  The error occurs when a job printed from a windows machine and includes
  'drips and drabs' of PJL code - all jobs are (should be) PostScript and
  the error is seemingly random. For some reason the windows driver
  (sometimes) decides to add a ^[ (ESC) character to the end of the job
  and miss out the important PJL '%-12345X' section of the command - were
  as other times it includes the complete command, or nothing at all
 
  My best solution is to add a small C/perl program to the filter pipeline
  to throwout any incomplete commands with the escape character.
 
  Does anyone know of a better way to correct the crappy windows PS code?
  Is there anything 'built-in' in ifhp to handle this? or if anyone knows
  what could be done with the windows drivers, that would help!
 
  Thanks in advance,
 
  sam
 
  --
  CERN, Geneva
  IT - Product Support - Unix Infrastructure
  E-mail: [EMAIL PROTECTED]
 
 
  -
  YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
  The address you post from MUST be your subscription address
 
  If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
  or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
  to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
  with:   | example:
  subscribe LIST mailaddr   |  subscribe lprng-digest [EMAIL PROTECTED]
  unsubscribe LIST mailaddr |  unsubscribe lprng [EMAIL PROTECTED]
 
  If you have major problems,  send email to [EMAIL PROTECTED] with the word
  LPRNGLIST in the SUBJECT line.
  -
 
-- 
CERN, Geneva 
IT - Product Support - Unix Infrastructure
E-mail: [EMAIL PROTECTED]


-
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:   | example:
subscribe LIST mailaddr   |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST mailaddr |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-


LPRng: ifhpXXXXXX files

2003-03-03 Thread Sam Lown
Hi All,

Back to the issue of the (damn) ifhpX files that IFHP randomly
decides to leave in the spool directories.

Is anyone actually working on this issue? Its been on the list now for
several months and nothing seems to have been resolved. I am saying this
now as one of servers was down today for 10 minutes or so due to the
spool directories overflowing.

I've added the find -name ifhp\* -ctime -exec rm {} \; command to
CRON as suggested by John Perkins on Jan 10th, but if we get one days
worth of traffic and a few 1Gb jobs to the A0 plotters where in shit
creak again! 
(and Nuclear physicists get cranky when things don't work ;-)

If needed (/forced to) we'll try to resolve the issue here and post the
result/patch (maybe someone has something already?).

Cheers,

sam 

-- 
CERN, Geneva 
IT - Product Support - Unix Infrastructure
E-mail: [EMAIL PROTECTED]


-
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:   | example:
subscribe LIST mailaddr   |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST mailaddr |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-


LPRng: OffendingCommand: ^[

2003-02-27 Thread Sam Lown
Hello,

Does anyone have any experience with this particular error message?

getting end using 'pjl job/eoj' at time
error = 'undefined' at time
Error: 'undefined'; OffendingCommand: ^[ at time

I've managed to find the source and reason for the error message,
however I can't decide on the best way to solve it (or at least, the
most practical way!) I'm upgrading the print service from the old
CTI-IFHP to the new ifhp, the old CTI version just ignored these error
messages, however the new ifhp takes more notice and tends to mess up
the accounting!

The error occurs when a job printed from a windows machine and includes
'drips and drabs' of PJL code - all jobs are (should be) PostScript and
the error is seemingly random. For some reason the windows driver
(sometimes) decides to add a ^[ (ESC) character to the end of the job
and miss out the important PJL '%-12345X' section of the command - were
as other times it includes the complete command, or nothing at all

My best solution is to add a small C/perl program to the filter pipeline
to throwout any incomplete commands with the escape character.

Does anyone know of a better way to correct the crappy windows PS code?
Is there anything 'built-in' in ifhp to handle this? or if anyone knows
what could be done with the windows drivers, that would help! 

Thanks in advance,

sam

-- 
CERN, Geneva 
IT - Product Support - Unix Infrastructure
E-mail: [EMAIL PROTECTED]


-
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:   | example:
subscribe LIST mailaddr   |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST mailaddr |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-