cvs commit: hints printing_minority_report.txt

timothy at linuxfromscratch.org timothy at linuxfromscratch.org
Fri May 16 08:21:57 PDT 2003


timothy     03/05/16 11:21:57

  Modified:    .        printing_minority_report.txt
  Log:
  Added lpr script by Uli Fahrenberg to replace all print programs.
  
  Revision  Changes    Path
  1.3       +29 -13    hints/printing_minority_report.txt
  
  Index: printing_minority_report.txt
  ===================================================================
  RCS file: /home/cvsroot/hints/printing_minority_report.txt,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- printing_minority_report.txt	15 May 2003 23:20:30 -0000	1.2
  +++ printing_minority_report.txt	16 May 2003 15:21:57 -0000	1.3
  @@ -13,10 +13,15 @@
   printing programs in linux and only need basic functionality, one
   dissented loser with all this printing crap took the following way out. 
   Printing is accomplished by ghostscript, and a simple but effective script
  -kindly contributed by Ulrich Fahrenberg <uli at math.auc.dk>. All the other 
  +kindly contributed by Uli Fahrenberg <uli at math.auc.dk>. All the other 
   preprocessor programs, and post processors that make printing such a drag
   in linux can be junked. They are ALL redundant bloat!
   
  +CHANGES: 16TH May 2003: Added 'lpr' script by Uli Fahrenberg to replace
  +	ALL print programs. Caught some of my own spelling & grammar 
  +	mistakes. Reworked opening boasts accordingly.
  +
  +
   Get a Word Processor - Abiword is mine. A hint is there, and it
   worked for me. If it doesn't work for you, argue with him, not me. 
   
  @@ -74,7 +79,9 @@
   and kick yourself for being too security conscious.
   
   3 I have  following alias  in /etc/profile or some config file like
  -that which bash reads.
  +that which bash reads. I suggest you get them working from a command 
  +line anyhow. With Uli's script (Section 10) these are basically 
  +redundant.
   
   alias lps='gs -q -dBATCH -dNOPAUSE -dSAFER -sDEVICE=bjcmono -r360   \
   - sOutputFile=/var/spool/canon'
  @@ -93,9 +100,9 @@
   
   -dBATCH - tells gs to quit after processing - always a good idea.
   
  --dNOPAUSE - tells gs to skip it's usual dance (requiring a keypress).
  +-dNOPAUSE - gs will not wait for a keypress.
   
  --dSAFER -  tells gs from deleting or zapping anything.
  +-dSAFER -   stops gs from  deleting or zapping anything.
   
   -sDEVICE= your printer driver. Be exact and case sensitive. GS is
   stupid.Use the spelling on the info at 'gs -h'.
  @@ -146,7 +153,7 @@
   
   either of which will send  your filename to the printer after your blank 
   header file. This can be reduced to a single command by someone with the 
  -least bit of scripting acumen, but I haven't got that. Fortunately,  Ulrich 
  +least bit of scripting acumen, but I haven't got that. Fortunately,  Uli 
   Fahrenberg <uli at math.auc.dk> has, and I have appended the script that he 
   provided for this as section 10. It works!
   
  @@ -154,7 +161,7 @@
   missing headers and often a few lines between pages. Load them in
   abiword, or any wp that will print to a .ps file, and that will sort
   them neatly into pages. Go around & set defaults to your paper size.
  -Ulrich's script (section 10) ideally needs a text section to send a 
  +Uli's script (section 10) ideally needs a text section to send a 
   header at the top of each page of ascii. If you can dream it up,  
   script it and send it to me for inclusion. You, of course, will get 
   credited.
  @@ -215,30 +222,39 @@
   
   This script below (name it lpr locally) takes a .ps or .pdf file and 
   spits it at the printer, something printer programs seem to find difficulty
  -with ;-). Ulrich Fahrenberg <uli at math.auc.dk> contributed this, and we bow 
  +with ;-). Uli Fahrenberg <uli at math.auc.dk> contributed this, and we bow 
   and scrape in his general direction :-).
   
   Before you say it doesn't work, revisit point 7 and make sure you cleared all 
   the other lpr programs out of the path. Install it somewhewre in the path and 
   chmod it to 755. 
   
  -Usage is simple: it IS lpr, and does everything a 500K binary would: Print from the 'print' function in anything, or call it from  a command line or script.
  +Next, open lpr in your favourite editor. You may need to hack as follows.
  +
  +	1. Line 6 - DEVICE=<your printer driver>. Set now as ljet4
  +	2. Line 7 - LP=<your printer port> without the '/dev/' bit
  +	3. Lines 33, 43. If your paper isn't a4, edit it's size here
  +
  +Usage is simple: it IS lpr, and does everything a 500K binary should: Print from
  +the 'print' function in any program, or call it from  a command line or script.
   
   At a stroke we have obsoleted megabytes of bloated crap associated with 
  -printing. More Power to you, Ulrich!
  +printing. More Power to you, Uli!
   
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   #!/bin/bash
  -# By Ulrich Fahrenberg <uli at math.auc.dk>
  +# By Uli Fahrenberg <uli at math.auc.dk>
   # Check the arguments to gs suit your printer
  -### Adjust next two lines to your needs.
  +
   
   DEVICE=ljet4  	## Your printer driver from 'gs -h' here
   LP=lp0		## Your printer port 
   
   
  -# Prints file to HP LaserJet 1100 connected at /dev/lp0
  -# Usage: `lpr <ps or pdf file>' or `cat bla.ps | lpr'
  +# Prints file to $DEVICE (above) connected at /dev/$LP(any port as above)
  +# Usage:	`lpr <ps or pdf file>' or `cat bla.ps | lpr'
  +		Or Print from any application to lpr.
  +		
   
   if [ -e /tmp/.lp-lock ] ; then
           	echo "Error: printer is locked  (/tmp/.lp-lock exists)"
  
  
  
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe hints' in the subject header of the message



More information about the hints mailing list