dan@hrc.UUCP (Dan Troxel) (03/30/89)
I am trying to use the 'p' option to print my mail, but even though elm tells me that the message has been sent to printer, it does not get printed. I can use the pipe command to get it there, but not using the 'p' command. I have including a portion of my elmrc file and some examples of things I have tried. # # .elm/elmrc - options file for the Elm mail system # # Saved automatically by Elm 2.1 PL1 for Dan Troxel # # how to print a message ('%s' is the filename) print = cat | lp -dprinter (or) print = lp -dprinter %s (or) print = | lp -dprinter -- Dan Troxel @ Handwriting Research Corporation WK 1-602-957-8870 Camelback Corporate Center 2821 E. Camelback Road Suite 600 Phoenix, AZ 85016 ncar!noao!asuvax!hrc!dan hrc!dan@asuvax.asu.edu
syd@dsinc.UUCP (Syd Weinstein) (03/31/89)
In article <198696@hrc.UUCP> dan@hrc.UUCP (Dan Troxel) writes: > >I am trying to use the 'p' option to print my mail, but even though elm >tells me that the message has been sent to printer, it does not get >printed. ># how to print a message ('%s' is the filename) >print = cat | lp -dprinter Your almost there with this one. It's print = cat %s | lp -dprinter The reason the lp -dprinter %s doesn't work is probably that elm deletes the temporary file and lp cannot find it after its gone. I believe lp has an option to make a copy, but the cat method also solves the problem where lp has no permission to read the directory where the file resides. -- ===================================================================== Sydney S. Weinstein, CDP, CCP Elm Coordinator Datacomp Systems, Inc. Voice: (215) 947-9900 {allegra,bpa,vu-vlsi}!dsinc!syd FAX: (215) 938-0235
rob@PacBell.COM (Rob Bernardo) (04/04/89)
In article <100@dsinc.UUCP> syd@dsinc.UUCP (Syd Weinstein) writes: +In article <198696@hrc.UUCP> dan@hrc.UUCP (Dan Troxel) writes: +> +>I am trying to use the 'p' option to print my mail, but even though elm +>tells me that the message has been sent to printer, it does not get +>printed. +># how to print a message ('%s' is the filename) +>print = cat | lp -dprinter + +Your almost there with this one. It's + +print = cat %s | lp -dprinter + +The reason the lp -dprinter %s doesn't work is probably that elm deletes +the temporary file and lp cannot find it after its gone. Actually another reason why it doesn't work is that a filename as an argument to System V lp(1) must be readable by "other", and for security reasons ELM creates temp files with permissions 0600. -- Rob Bernardo, Pacific Bell UNIX/C Reusable Code Library Email: ...![backbone]!pacbell!pbhyf!rob OR rob@pbhyf.PacBell.COM Office: (415) 823-2417 Room 4E850O San Ramon Valley Administrative Center Residence: (415) 827-4301 R Bar JB, Concord, California
jos@idca.tds.PHILIPS.nl (Jos Vos) (04/12/89)
In article <4929@pbhyf.PacBell.COM> rob@PacBell.COM (Rob Bernardo) writes: +In article <100@dsinc.UUCP> syd@dsinc.UUCP (Syd Weinstein) writes: ++Your almost there with this one. It's ++ ++print = cat %s | lp -dprinter ++ ++The reason the lp -dprinter %s doesn't work is probably that elm deletes ++the temporary file and lp cannot find it after its gone. + +Actually another reason why it doesn't work is that a filename as an +argument to System V lp(1) must be readable by "other", and for security +reasons ELM creates temp files with permissions 0600. Just use "lp -dprinter -c %s". (-c option means copy immediately). It *should* work (although I didn't try it). Now the file is copied during the lp command. This circumvents the problem of deletion of the file temporary to Elm and it also creates a lp-readable file in the spool directory of lp. -- -- ###### Jos Vos ###### Internet jos@idca.tds.philips.nl ###### -- ###### ###### UUCP ...!mcvax!philapd!jos ######