Skip to content

Instantly share code, notes, and snippets.

@leingang
Last active February 6, 2024 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leingang/b782762d50e362baf2c8902e1692112f to your computer and use it in GitHub Desktop.
Save leingang/b782762d50e362baf2c8902e1692112f to your computer and use it in GitHub Desktop.
Print to CIMS printers with stapling (bypassing Pharos)
ssh leingang@access.cims.nyu.edu lpr -P mf-07 -\\# 25 -o ColorMode=Gray -o StapleLocation=UpperLeft < file.pdf
@leingang
Copy link
Author

leingang commented Aug 16, 2023

To use this shell one-liner:

  • replace leingang with your own CIMS username
  • replace mf-07 with the printer you are printing to
  • replace 25 with the number of copies you want
  • replace file.pdf with the file name you are printing
  • leave out -o ColorMode=Gray if you want color printouts
  • leave out -o StapleLocation=UpperLeft if you have only a single sheet, or you don't want them stapled.
  • add -o page-ranges=m-n to print only the pages in the range m to n
  • add -o sides=one-sided to only get single-sided pages

Notes:

  1. The double backslash escapes the pound sign twice
  2. You will still need to authenticate on the CIMS systems with password and MFA

See also How to Use SSH Pipes on Linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment