Go to the U of M home page
School of Physics & Astronomy
School of Physics and Astronomy Wiki

User Tools


computing:department:unix:printing

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
computing:department:unix:printing [2011/01/13 16:37] – [Controlling printer features] allancomputing:department:unix:printing [2021/05/04 16:44] (current) cse-sull0153
Line 1: Line 1:
-<box 20% right right-clear red|More Information> 
-{{indexmenu>:computing:department:unix}} 
-</box> 
- 
 ====== Printing from Unix ====== ====== Printing from Unix ======
  
-For complete information on printing commands and options, please refer to the CUPS (common unix printing system) User Manual at [[http://www.physics.umn.edu:631/]] (within Tate Lab) or [[http://www.cups.org/]].+Printing on Linux is handled through CUPS utilizing the cups.cse.umn.edu print server
  
 The command to print from a Unix system to any of our network printers is: The command to print from a Unix system to any of our network printers is:
Line 11: Line 7:
   lpr -P printer filename   lpr -P printer filename
  
-...where //printer// is the name of the print queue (usually the room number). The queues accept many file types directly, such as image files and PDF as well as text or Postscript.+...where //printer// is the name of the print queue (usually the room number). The queues accept many (but not all!) file types directly, such as image files and PDF as well as text or Postscript. Application-specific files such as HTML web pages, Mathematica workbooks, etc, have to be printed from within the application.
  
 You can use the lpstat(1) command to see a list of available printers: You can use the lpstat(1) command to see a list of available printers:
  
-  lpstat -p -d+  lpstat -
  
-The -p option specifies that you want to see a list of printers, and the -d option reports the current default printer or class. 
  
 ===== Changing printer settings in KDE ===== ===== Changing printer settings in KDE =====
Line 43: Line 39:
       lpr -o landscape filename       lpr -o landscape filename
  
-==== Finding other available options ====+===== Finding other available options  and setting defaults =====
  
 Some of these options are quite wordy; however you can use the ''lpoptions'' command to set up default settings to suit your preference (see the CUPS user manual for details). To view the available options, and their current settings for a particular printer, use the ''lpoptions -l'' command - for example, Some of these options are quite wordy; however you can use the ''lpoptions'' command to set up default settings to suit your preference (see the CUPS user manual for details). To view the available options, and their current settings for a particular printer, use the ''lpoptions -l'' command - for example,
  
   lpoptions -p 216 -l   lpoptions -p 216 -l
 +  
 +**The above "generic" options such as ''sides=two-sided-long-edge'' may not work for setting defaults**. Instead, find the specific option for your printer from '' lpoptions -p //printer// -l'', and use that. For example the option to set duplex printing on the 431 HP printer may be something like ''lpoptions -p 431 -o Duplex=DuplexNoTumble''.
  
 ===== Setting a default printer ===== ===== Setting a default printer =====
Line 54: Line 52:
   lpoptions -d 216   lpoptions -d 216
  
-**NOTE** if you are setting the environment variable ''PRINTER'' in a long-standing login script, you might want to remove it, as it may have unexpected interactions with the lpoptions default.+**NOTE** in the past, one would set the default printer by setting an environment variable ''PRINTER'' in your login script. You should remove any such setting in order to avoid unexpected interactions.
  
 ===== Viewing print jobs ===== ===== Viewing print jobs =====
Line 61: Line 59:
   lpstat 216   lpstat 216
  
-You can check queue and job status online by checking the print server [[https://www.physics.umn.edu:631/jobs|jobs listing]] (this link will only work within Tate Lab).+You can check queue and job status online by checking the print server [[https://cups.physics.umn.edu/jobs|jobs listing]] (this link will only work within Tate Lab).
  
 ===== Printing to Toshiba copiers ===== ===== Printing to Toshiba copiers =====
-To print to the Tosiba copiers (358c and 431c), you need to specify your Department printing code. This is tedious to specify on the CUPS command line, but it can be done using the DCDigit1... DCDigit5 options.+ 
 +To print to the Toshiba color copiers in PAN, MIFA and FTPI, you need to specify your Department printing code. This is tedious to specify on the CUPS command line, but it can be done using the DCDigit1... DCDigit5 options.
  
 Say your Department Code is 10203. Your command to print would be: Say your Department Code is 10203. Your command to print would be:
Line 72: Line 71:
 You can avoid having to specify the code every time, by storing it using ''lpoptions''. For example, to first store your code and then print a file: You can avoid having to specify the code every time, by storing it using ''lpoptions''. For example, to first store your code and then print a file:
  
-  lpoptions -o DeptCode=True -o DCDigit1=1 -o DCDigit2=0 -o DCDigit3=2 -o DCDigit4=0 -o DCDigit5=3 -p 358c +  lpoptions -o DeptCode=True -o DCDigit1=1 -o DCDigit2=0 -o DCDigit3=2 -o DCDigit4=0 -o DCDigit5=3 -p toshiba-pan-311 
-  lpr -P 358c filename +  lpr -P toshiba-pan-311 filename
- +
-Note there are several possible places for your output to be delivered; you can control this using the OutputTray option. The default is the Inner tray (beneath the control panel).  +
- +
  
 +Note there are several possible places for your output to be delivered; you can control this using the OutputTray option. The default is the Inner tray (beneath the control panel).
  
 +<note warning>
 +  - The Toshiba driver for linux only supports 5-digit codes - if you have a longer code, your jobs will be held (you can release it from the embedded web page of the copier itself). Contact us if you would like your code changed to 5-digits.
 +  - Adobe's acroread printing doesn't work correctly with DeptCodes. You either have to release the job from the copier web interface, or use an alternative PDF viewer (try evince or qpdfview). You can also send PDF files directly to a printer using lpr.
 +</note>
  
 ===== Hint: Remote Printing ===== ===== Hint: Remote Printing =====
Line 86: Line 86:
  
 <code> <code>
-bash> cat myfile.ps |ssh physics.umn.edu "cat - |lpr -P342"+bash> cat myfile.ps |ssh ssh.physics.umn.edu "cat - |lpr -P342"
 </code> </code>
  
Line 92: Line 92:
  
 <code> <code>
-tcsh> alias lp342 'cat \!\!:1 | ssh physics.umn.edu "lpr -P342"'+tcsh> alias lp342 'cat \!\!:1 | ssh ssh.physics.umn.edu "lpr -P342"'
 tcsh> lp342 myfile.ps tcsh> lp342 myfile.ps
 </code> </code>
Line 98: Line 98:
 Or bash: Or bash:
 <code> <code>
-$ lp342() { cat $1 |ssh physics.umn.edu "lpr -P342" }+$ lp342() { cat $1 |ssh ssh.physics.umn.edu "lpr -P342" }
 $ lp342 myfile.ps $ lp342 myfile.ps
 </code> </code>
computing/department/unix/printing.1294958260.txt.gz · Last modified: 2011/01/13 16:37 by allan