Fancy Printing from Pine

In pine, press "m" to get to the main menu, then "s" for setup, then "p" for printer. Using the arrow key, go down to "Personally selected print command", press "c" for change. Press "n" to set a name for your printer eg astroprint, press "c" for command, and enter (or cut and paste) the following command.
enscript -M A4 -2Gr -p - $1 | lpr -P astroprint
You may also need to press the arrow keys until you get to astroprint and press "s" to make astroprint and your command the default printing action.

Press "E" to exit settings and "y" to agree to the changes and you're done. See the manual page for enscript for more options (man enscript)

Note 1: In order for this command to work, you need to have the "enscript" package installed, if you don't have this, contact your system manager. Check enscript is installed by typing "enscript" and return. If enscript appears to be waiting for input, hit ctrl-D or ctrl-C to put it out of its misery. If it is not installed, you should get a " Command not found" error.

Note 2: This will only work for text files, because enscript generates postscript, don't give it postscript input.

Note 3: There is a command, /usr/local/bin/print on both Solaris and Linux which contains the following:

/export/home/rahm[pavo]rahm: more /usr/local/bin/print
#!/bin/tcsh
# Use enscript in gaudy mode to format text files for printing.
/usr/bin/enscript  -L55 -G2r -p - $1 | lpr


Rhys Morris
Last modified: Wed Sep 21 09:00:52 BST 2005