From Department of Statistical Science Computing Wiki
Jump to: navigation, search

Duke Statistics Printing Services

The goal of this page is to explain the Unix printing environment at Duke Statistics and some of the general guidelines for usage and maintenance.

Public Printers

The following printers are available for public use in the department. These are all available from the Windows and Linux desktop computers provided in the Department. The current print queues can be seen at this http://printers.stat.duke.edu:631/printers/

Color Printing

Color printing from a terminal command line: use the following wyntax

$ lpr -P color214 paper.ps

To print transparencies, use Tray1 (the manual feed tray):

$ lpr -P color211 -o inputslot=tray1 slides.ps

Duplex Printing

$ lpr -P duplex214 paper.ps

will generate duplex output. Printing to mono214 will generate single-sided output on the same printer.

Default printer

Your default printer is set by the PRINTER environment variable. For a new account, this is unset (commented out) in your .cshrc file, meaning your print job will go to 214. To see the current value, type:

$ echo $PRINTER

Setting Default Printer in tcsh

To change your default printer, edit your .cshrc file (e.g. emacs ~/.cshrc). Look for the following section:

#setenv PRINTER mono112

  1. setenv PRINTER mono211
  2. setenv PRINTER mono214
  3. setenv PRINTER mono222
  4. setenv PRINTER mono223

The # at the beginning of the line denotes a comment. Uncomment the line of the most convenient printer and save the file. The change will only take effect in newly-opened terminal windows. For this change to take effect in other applications, you must logout and login again.

Setting Default Printer in bash

Edit your .bash_profile file and add the following line:

export PRINTER=printername

Save the file, then logout. Once you log back in, the variable will be set.

Using other (non-default) printers

Use the -P argument to lpr to select a specific printer. For example, to print to mono214, regardless of your default printer:

$ lpr -P mono214 file

Checking the status of the printer queue

The lpq command will return status information about the number of jobs in the queue, who owns them, their order in the queue, the job id (needed for lprm), etc.

To see the print queue on your default printer:

$ lpq

To see the print queue on a specific printer:

$ lpq -P mono214

Removing print jobs from the queue

The lprm command removes jobs from the print queue. To remove a particular job, use lpq (see above) to find the job_id for your print request. Then, use the lprm command to remove the job:

$ lprm job_id

To remove jobs from a specific printer queue:

$ lpq -P mono214 $ lprm -P mono214 job_id

To remove all of your jobs from a printer queue:

$ lprm -

How can I save paper?

The easiest and most effective way is to restrict printing to only those documents which must be printed.

When printing large documents, consider using duplex214 to save double-side the output. This will cut your paper use in half.

$ enscript -P duplex214 file.c

You can also "two up" your printouts, printing two pages on each side of the paper. For normal text files (e.g. C code), use enscript:

$ enscript -2rG file.c

Combining both options will cut your paper use by a factor of 4!:

$ enscript -P duplex 214 -2rG file.c

For PostScript files, psnup is best:

$ psnup -2 file.ps | lpr

When using latex or tex, only run dvips for the pages in which you are interested. (This will also remove the need for having the whole PostScript file). For example, say you are only interested in pages 10-20,25-26 the following will give you only what you need:

$ dvips -pp 10-20 -pp 25-26 -o \!lpr file.dvi

When printing PostScript files, gv may be used to mark and print only those pages in which you are interested.

Weird Behavior

Disappearing Jobs

If a job disappears from the queue but does not actually print, try the following:

  • Make sure there is paper in the printer. If not, feel free to add some. If you have just printed a large job, please refill the tray as a courtesy to the other users.
  • Check the status of the queue using lpq. If there are a lot of jobs ahead of yours:
    1. Remove your job(s) from that queue with lprm
    2. Check for open queues with lpc status all
  • If there are a lot of jobs ahead of yours and the top job is not active, send email to help@stat.duke.edu. Include:
    printer name
    machine you are printing from
    output of lpq command
  • Use lpq to verify that you sent it to the correct printer.
  • If you can view a PostScript file on your computer (e.g. with gv), but only a fraction of the job actually prints, try manually setting the paper size to Letter.
    To create a Letter version of the ps file:
    $ psresize -PA4 -pletter file_a4.ps file_letter.ps
    To just print the file:
    $ psresize -PA4 -pletter file_a4.ps | lpr
  • If you can view a PostScript file on your computer (e.g. with gv), but none of the job actually prints, make sure there is a showpage near the end of the file.

Toner Cartridges

New toner cartridges are in room 211 by the photocopier. New cartridges will be in the sealed boxes. If you take the last unopened toner cartridge, please notify one of the staff members so we can ensure that there are always toner cartridges available. There will be a sign out sheet at the table in 214. Please sign the cartridge out and put the room number of the printer where the new cartridge is going. You may leave the old Cartridge in 214 to be sent in for Recycling.

  1. Remove the old cartridge from the printer.
  2. Take new cartridge out of the sealed box and rotate it. Do not shake it.
  3. Pull the tab on the side to remove the seal strip.
  4. Insert the new cartridge.
  5. Place the old cartridge in the box and return it to room 214.

Remote Access to printers

The Department print server is available for printing to public printers from many Duke-owned IP addresses. This includes, VPN, ethernet in Old Chem. Bldg. and the DUKEBLUE wireless network. The following directions will define any needed printers in your Windows and/or Mac based machines.

Windows 10 Instructions

Moved to its own page

Generic Win10 instructions NB: Any other version of windows is not explicitly supported and instructions are outdated, USE At Your Own Risk.

Add printer on Windows XP

You will need administrator rights on your computer to add a printer.

  1. Select Start -> Printers and Faxes
  2. Click Add a printer
  3. Click Next
  4. Select A network printer, or a printer attached to another computer
  5. Click Next
  6. Select Connect to a printer on the Internet or on a home or office network
  7. Enter the URL http://printers.stat.duke.edu:631/printers/NAME in the URL: field, where NAME is the name of the printer you wish to add.
  8. Click Next
  9. Click on Have Disk
  10. Click on Browse...
  11. Browse into C:\Xerox\DIRECTORY where DIRECTORY is the name of the appropriate driver directory as given by the table above.
    1. If there is a .inf file in that directory, select it and click on Open.
    2. If there is another directory there, click into that directory, select the .inf file, and click on Open.
  12. Click OK
  13. Select Xerox Phaser in the Manufacturer column, if needed, and the appropriate printer model name, as listed in the table above.
  14. Click OK
  15. Click Continue Anyway if a Hardware Installation dialogue popup about unsigned drivers comes up.
  16. Select No for the Default Printer question
  17. Click Next
  18. Click Finish
Add printer on Windows Vista/7
  1. Download and run the printer driver installer program from the table above. If you have done this before, you don't need to do it again.
  2. Click the Start button.
  3. Click on Devices and Printers
  4. Click on Add a printer
  5. Click on Add a network, wireless or Bluetooth printer
  6. Click The printer I want isn't listed
  7. Select the Select a shared printer by name radio button
  8. Enter the URL http://printers.stat.duke.edu:631/printers/NAME in the text field, where NAME is the name of the printer you wish to add, as listed in the table above.
  9. Click Next
  10. Click the Have Disk... button in the Add Printer Wizard dialogue window
  11. Click on Browse...
  12. Browse into C:\Xerox\DIRECTORY where DIRECTORY is the name of the appropriate driver directory as given by the table above.
    1. If there is a .inf file in that directory, select it and click on Open.
    2. If there is another directory there, click into that directory, select the .inf file, and click on Open.
  13. Click OK
  14. Select Xerox Phaser in the Manufacturer column, if needed, and the appropriate printer model name, as listed in the table above.
  15. Click OK
  16. Click Next
  17. Click Finish

Add printer on Mac OS X

Mac OS X computers should not need a driver specifically installed for each printer. Follow these directions:

  1. Go to the Printer & Scanners preference pane
  2. At the bottom of the Printers pane, click the plus sign (</code>+</code>) to add a printer.
  3. At the top of the new screen, select the IP tab.
  4. In the Address field, enter printers.stat.duke.edu.
  5. Select Internet Printing Protocol - IPP in the Protocol drop down
  6. In the Queue field, enter printers/NAME where NAME is the name of the printer you wish to add from the table above.
  7. In the Name field, enter the printer NAME again, as in the step above.
  8. On the Use field, select Generic Postscript Printer.
  9. Click on Add.
  10. If a second window asking whether to use a Duplex Printing Unit comes up, check the box and click OK.
  11. In the Printers & Scanners window: You should not choose Share this printer on the network unless you know you need it.

If you have access to a color printer and your print jobs are still in grayscale you will need to follow the next steps.

  1. From a terminal run cupsctl WebInterface=yes
  2. In a browser window enter the following url localhost:631 (authenticate as your administrator account, that may be you).
  3. Select the Printers tab and then select the Queue Name you setup above for the printer Name.
  4. In the Administration drop-down select Modify Printer, scroll to bottom and Continue.
  5. You can adjust Description/Location/Sharing if you want, but mostly just Continue.
  6. In the Model: dialog, skip "Current Driver" and re-select Generic Postscript Printer then Modify Printer.
  7. At this point you should have color enabled, but may have lost your Duplex setting, if so - keep going.
  8. In the Administration drop-down select Set Default Options.
  9. Change 2-Sided Printing: to the selection of Long-Edge.
  10. Then Click Options Installed and change Duplexer: to "Installed".
  11. Click Set Default Options and you are done.

Add printer on Ubuntu Linux (outdated)

  1. Select from the menu: System -> Administration -> Printing
  2. In the Printer Configuration - localhost window, Click on New.
  3. Enter http://printers.stat.duke.edu:631/printers/NAME in the Enter Device URI field, where NAME is the name of the printer you wish to add, as listed in the table above.
  4. Click Forward button
  5. In the New Printer window, choose the Select printer from database radio button, and Xerox in the Makes list.
  6. Click Forward button
  7. Select the appropriate model in the Models list, do not change the default selection in the Drivers list.
  8. Click Forward button
  9. Enter an appropriate information in the Printer Name, Description, and Location fields.
  10. Click Apply