A command line script to print wirelessly in the Oden Institute at UT Austin from Linux, Mac, or Windows (if you're running Windows Subsystem for Linux).
Clone this repository, then place the contents of oden_print.sh in your .bashrc or .profile file and re-source that file or start a new terminal session.
Avoid the need to specify a workstation and printer for every print by:
- replacing 
[email protected]with your Sysnet username and machine (for example[email protected]) - replacing 
default_printerwith your default printer's name (for examplecp3se) 
Avoid the need to enter your remote user password for SSH by setting up an SSH keypair.
Typical usage for users who have done minimal and maximal set-ups are
# minimal
oden_print -m [email protected] -p cp3se file.pdf
# maximal
oden_print file.pdfUse oden_print -h for a full help message.
To specify printing options supported by lpr, make use of the -t flag, followed by a string of options surrounded by quotation marks. Note that a -o is needed before each option.
# Passing lpr options through oden_print
oden_print -t "-o <option1> -o <option2> ..." file.pdf 
Please see the man page of lpr for documentation on available printing options. Alternatively, check out the official CUPS documentation. The options are listed at the bottom of the page. Here we review some of the most common options.
Some older printers in POB do not play well with files using non-US-standard paper sizes (e.g. A4), likely due to mismatching between what the printer paper tray is set to and the size specified by the document. The media option thus comes in handy to ensure the printer used can handle the file smoothly. For a complete list of available media types, see the man page of lpr or the CUPS documentation linked above. For most purposes, use Letter.
# Using Letter sized paper
oden_print -t "-o media=Letter" file.pdf 
To print the document in landscape orientation, add -o landscape to the passthrough string. The default behavior is to print in portrait orientation.
# Printing in landscape
oden_print -t "-o landscape" file.pdf
To print a document on both sides of the paper, add -o sides=<side-options> to the passthrough string. Available options are
two-sided-long-edgefor double-sided printing in portrait orientation,two-sided-short-edgefor double-sided printing in landscape orientation,one-sidedfor single-sided printing.
# Printing on both sides in portrait
oden_print -t "-o sides=two-sided-long-edge" file.pdf
The script sends files and print commands to an Oden workstation over a multiplexed SSH connection. Multiplexing allows you to authenticate once, even if you don't have a key pair.
If you have any trouble with the script or have any improvements let me know.