Print from UNIX Desktop (Math)

Mac, Linux and other operating systems use theCups printing system. Graphical print apps (like GtkLP) change between releases or differ between OSes, but they can be easy to figure out. The "lpr" set of commands have been fairly stable for the past 20 years. Below are some commands to control print jobs.

Replace 5555 with the integer ID of the print job you would like to cancel.

Multiple Pages per Printed Sheet

To print four pages on a single sheet, use the number-up option for lpr.

lpr -o number-up=4 foobar.ps

Single Side Printing with Duplex Printers

Some printers have duplex attachements so they can print on both sides of paper sheets. By default the duplex option will be used. The lpr can pass an option to make the printer use only one side (aka simplex printing).

lpr -o sides=one-sided -Pmath-vinp270d sample.txt

If the printer has duplex hardware, but is printing single sided, you can set the duplex option.

lpr -o sides=two-sided-long-edge -Pmath-vinp270d sample.txt

Setting the Default Printer

Command Line for Ubuntu Linux or Mac

Open a terminal and run lpoptions -d printername

-or-

add export PRINTER=printername to your ~/.bash_profile (if you use bash for your shell) and restart any shells (or run the export printer command in them).