Unix Printing

 

Graphics Printing

GCG can print to the two most common types of printers: Postscript printers and HPGL printers.   The command to set your GCG output up for either kind of printer on Ranger: postscript, or hpgl. This is because this command is part of GCG, and is not part of either Unix or VMS.

So How do I Figure out if the file is Postscript?? 

Use the file command:
    file *|more
will tell you about all of the files in your current directory. GCG's .figure files are not postscript and can only be printed from within the WPI. If you want to create a graphics file to print from the Unix command line, you must create the file from the command line also, rather than from within the WPI. 

Graphics Printing from GCG programs

GCG programs, when run from a text-mode prompt, require you to first run either the 'postscript' or the 'hpgl' commands. These commands are part of GCG, not part of Unix. Normally, what one does is use the commands to designate a file name rather than an actual printer. An actual printer will only work if your system is specially configured with printers as devices rather than as queues. This is very unusual. Here's an example of designating a file name for your postscript output.  Note that the file name ends in ".ps"  This is for your use in identifying the contents of the file. Neither the Unix system, nor the printer itself actually use the file name as an indicator of file contents.

gsaf.unmc.edu> postscript
 
 Use Postscript graphics with what device:
 
  LaserWriter
  Lzr1200
  LN03-ScriptPrinter
  LPS20
  ColorScript-100
  EPSF (single page encapsulated postscript format)
  CEPSF (color EPSF)
 
 Please choose one ( * LASERWRITER * ) 
 
 To what port is your LASERWRITER connected (* /dev/tty15 *) somefilename.ps
 
 Plotting Configuration set to: 
 
       Language: psd 
         Device: LASERWRITER
  Port or Queue: somefilename.ps
 
 

After you have issued the postscript command and have run a GCG program which creates graphics output (for example, dotplot), your will then see a file called somefilename.ps in your directory. You may then print that directly to any print queue which is capable of handling postscript files. On the UNMC sequence analysis system, one of these is called molbio-lex, and so the command to print would be:

 
lp -d molbio-lex somefilename.ps
 

 


Text Printing

Ranger is a Compaq (formerly DEC) alpha DS20. This means that the system printing can be wither  System V R4 style or BSD style. The basic print commands are: 

lp filename

and

lpr filename

This will cause the file called "filename" to print at the system default printer. If you want to use any other printer, you must include the destination: 

lp -d "queue name" file-to-print

The BSD lpr command also works: 

lpr -P"queue name" file-to-print

To find out what printers are available, use the 

lpstat -v

command. This lists all system printers. 

lpstat -t

will tell you what the system thinks the status of these printers is. This is not guaranteed accurate as it depends on the printer to talk back to Ranger and provide the information. It may also take a very long time to finish if there are printers which are not turned on or which are no longer available.

NYU-Med Center Unix-Available Printers

Print Queue Names ....

basil
biochem
cbnt
fish
gcrc
gen1
herba
holzman
join
laf
magenta
marg
mis$print
msb221
pagano
path
peds_print_01
pharm
purple
purple2
rcr_a
rcr_apple_ps
ross
sam
samuels
schless
skol
th415