TWiki
>
Main Web
>
Computing
>
Printing
(revision 5) (raw view)
Edit
Attach
---+!! Nevis Printing <div style="float:right; background-color:#EBEEF0; margin:0 0 20px 20px; padding: 0 10px 0 10px;"> %TOC{depth="3" title="On this page:"}% </div> This page describes some basic commands related to printing on the Nevis [[Linux cluster]]. ---++ How to configure printers on your computer (laptops) If you connect your laptop to via an Ethernet connection, and your laptop is running CUPS, you will be able to browse the list of available print queues and select one. However, if you connect via a wireless network or at the Annex, you will not be able to browse the list of queues. You can still print, but will have to add the printer queue to your laptop manually: ---+++ Linux On Linux laptops, both the KDE and GNOME window managers have printer setup utilities. The general information you need is: * The printer protocol is IPP. * The printer (or "print server") is =print.nevis.columbia.edu= * If you want to print to a queue listed below, the queue name is =printers/<queue-name>=. * If you have to type in a URI for the above information, it is =ipp://print.nevis.columbia.edu/printers/<queue-name>=. * For example, if you want to print to queue =bw-research=, the URI is =ipp://print.nevis.columbia.edu/printers/bw-research=. ---+++ Macintosh * Go to System Preferences. * Click on "Print & Fax". * Click on the "plus" sign (+) to add a printer. * The protocol is "IPP", the Address is =print.nevis.columbia.edu=, and the Queue is =printers/<queue-name>= ---+++ CUPS direct (Mac and Linux) On both Macs and Linux laptops, if the printer setup utilities seem a bit confusing, you might try to access CUPS directly: * Open a web browser (you're running one now, aren't you?) and use this URL: <[[http://localhost:631][http://localhost:631]]>. * Click on "Printers" on the top bar; you may have to type in a root or administrator password to proceed further. * The Name of the queue can be anything; just "Nevis" will do. * The Device is "Internet Printing Protocol (ipp)" * The URI is =ipp://print.nevis.columbia.edu/printers/<queue-name>= ---+++Windows * Start->Settings->Printers * Open "Add Printer" * Select "Local Printer", then click "Next" * Select "Create a new port", and select "IPP" from the pop-up menu. Click "Next". (If an "IPP" option is not available, then you don't have CUPS installed. You can try using the IP name =<queue-name>.nevis.columbia.edu=, use "TCP/IP" as the port type, and leave the queue blank.) * As noted above, the print server is =print.nevis.columbia.edu=, and the print queue is =printers/<queue-name>=. ---++ Print queues As of 28-Oct-2008, the following print queues are available. To see a list of all available print queues, use the [[http://www.nevis.columbia.edu/cgi-bin/man.sh?man=lpstat][lpstat]] command: <pre> lpstat -a </pre> ---+++ Main print queues ---++++ bw-research (or "hp4300" or "qms1") =bw-research= is the main "workhorse" printer. Note: The main printer at Nevis used to be called =qms1=, and then =hp4300=. In order that some old print commands will still work, the old queue names are still available. =bw-research= is a fast black-and-white HP P4014 printer. This printer has a duplexing feature, which allows you to print on both sides of a sheet of paper. To use the feature, the command is: <pre> lpr -Pbw-research -o Duplex=DuplexNoTumble <filename> </pre> The =bw-research= printer has two paper input trays: manual, and lower. If any sheets are put into the manual bin (transparencies, for example) the printer uses it by default. Otherwise the paper comes from the lower bin. The correspondence is: | *Option* | *lpr option* | | Manual | =lpr -o !InputSlot=Tray1= | | Upper | =lpr -o !InputSlot=Tray2= | | Duplex | =lpr -o Duplex=DuplexNoTumble= | When you put three-hole-punch paper in the lower bin, it's commonly combined with the duplex option to print long documents that can be placed in looseleaf binders. For example: <pre> lpr -Pbw-research -o Duplex=DuplexNoTumble -o InputSlot=Tray2 thesis.ps </pre> ---++++ color-research (or colour-research) As the name implies, =color-research= is an HP2605 color printer. It is slower than =bw-research= (10 pages per minute). The color printer has three input trays, similar to =bw-research=: manual, upper, and lower. The manual "tray" is actually a single-sheet feeder in the front of the upper tray. The lower and upper trays are stocked with plain paper. It is capable of duplex printing. | *Option* | *lpr option* | | Manual | =lpr -o !InputSlot=Tray1= | | Upper | =lpr -o !InputSlot=Tray2= | | Lower | =lpr -o !InputSlot=Tray3= | | Duplex | =lpr -o Duplex=DuplexNoTumble= | Realistically, there's no need to specify an =InputSlot= option unless you've walked over to the printer and put some special paper (transparencies, labels, A4 paper) into one of the bins. We used to put transparencies into the upper bin, but these are now used so rarely that we don't bother. ---++++ bw-admin =bw-admin= is a smaller, slightly slower (25 ppm) black-and-white HP4100 printer located at the end of the west corridor of the upper floor of the Nevis research building. It does not have duplex printing. It is meant for the use of the people who have offices along that corridor, but it can also be used as an "overflow" printer if bw-research is busy. ---++++ bw-annex This is a B&W printer located in the Nevis [[Annex]] at Pupin. It supports duplex printing. ---++++ color-annex (or colour-annex) This is a color printer located in the Nevis [[Annex]] at Pupin. It differs from the color printer at Nevis in that it has only one input tray. ---+++ Other queues ---++++ bw-design (or hp2300) This is an HP2420 printer located in the electronics design area of the lower floor of the Nevis Electronics Building, and is intended for the use of the people who work on that floor. ---++++ bw-testing (or hp1200) This is an HP1200 printer located on the upper floor of the Nevis Electronics Building, in the DOE testing area, and is intended for the use of the people who work on that floor. ---++++ bw-elec This is a B&W printer located in the in Nevis electronics assembly/testing area on the upper floor. It's similar to the =bw-research= printer. It's intended for the use of those who work in that building. ---++++ color-elec (or colour-elec) This is a color printer located in the in Nevis electronics assembly/testing area, similar to the =color-research= printer. It's intended for the use of those who work in that building. ---++++ Others There are other print queues in existence, but they are restricted the use of specific working groups at Nevis or Pupin, and are not for general use. You may also see other printers at Pupin when browsing with CUPS; use them at your own risk. ---++ Linux printing ---+++ Concepts ---++++ CUPS The [[Linux cluster]] uses [[http://www.cups.org/][CUPS]] to manage its print services. On most machines that have CUPS installed, visiting the URL [[http://localhost:631/help/][http://localhost:631/help/]] will take show you basic documentation; you can also view the [[http://www.cups.org/sum.html][manual]] in the [[http://www.cups.org/documentation.php][documentation section]] of the [[http://www.cups.org][CUPS web site]]. This web page just covers brief highlights of that manual. The reason why CUPS is used at Nevis is that it only requires complex configuration of the print server; the client machines don't have to be configured at all. This means that if you connect a laptop to the Nevis [[networks]], and that laptop is running CUPS, you'll be able to print to the Nevis printers and make use of the various printer features without installing any additional drivers. (This only applies to laptops with a direct Ethernet connection at Nevis; CUPS is not visible on the wireless networks or in the Annex.) ---++++ Print server In [[http://localhost:631/sam.html][CUPS]], the print server controls which print queues are available on the cluster, and is the only system that requires any printer drivers. The print server on the Nevis [[Linux cluster]] is =print.nevis.columbia.edu=. This print server is configured to deny access to systems outside the Nevis [[networks]] for security reasons. If you're using a system outside those [[networks]], and you wish to print on a Nevis cluster printer, see the FAQ below.; a typical setup for your system might be (using =bw-research= as an example): <pre> Type of queue: <b>lpr</b> Remote server: <b>print.nevis.columbia.edu</b> Remote queue: <b>bw-research</b> </pre> If you're looking for Postscript Printer Description files (PPD files), you can find many of them on the Nevis Linux cluster, in directory =/usr/nevis/printing/ppds/=. ---+++ Printing from the command line [[http://www.nevis.columbia.edu/cgi-bin/man.sh?man=lpr][lpr]] is the basic command for printing a file in UNIX. For example: <pre> lpr filename </pre> will print the file "filename" on the default print queue; you can find out the default queue with the command <pre><a href="http://www.nevis.columbia.edu/cgi-bin/man.sh?man=lpstat">lpstat</a> -d</pre> If you want to print a file on a printer that's not your default (a color printer, perhaps), use the =-P= option to select the print queue: <pre> lpr -Pqueue-name filename </pre> To set printer options, use the =-o= option of the =lpr= command. Some examples: <pre> lpr -Pbw-research -o Duplex=DuplexNoTumble filename </pre> will print on the main black-and-white printer using both sides of the paper. (See the description of the =bw-research= printer below.) For color duplex printing, use: <pre> lpr -Pcolor-research -o InputSlot=Plain -o Duplex=DuplexNoTumble filename </pre> For a list of options available on a print queue, use the [[http://www.nevis.columbia.edu/cgi-bin/man.sh?man=lpoptions][lpoptions]] command: <pre> lpoptions -p color-research -l </pre> To see what jobs are printing, and the status of the print queues, use the [[http://www.nevis.columbia.edu/cgi-bin/man.sh?man=lpstat][lpstat]] command : <pre> lpstat -u </pre> ---+++ Status and control commands To check the status of a print queue, use the [[http://www.nevis.columbia.edu/cgi-bin/man.sh?man=lpstat][lpstat]] command. For example: <pre> lpstat -p bw-research -u </pre> If you want to remove one of your jobs from the print queue, use the [[http://www.nevis.columbia.edu/cgi-bin/man.sh?man=lprm][lprm]] command. For example: <pre> # lpstat -u printer bw-research now printing bw-research-0. enabled since Jan 01 00:00 bw-research-81 seligman 11264 Mon 15 Dec 2003 05:08:38 PM EST # lprm 81 </pre> Note that usually only the number of the job is necessary to cancel it. ---++ Frequently Asked Questions ---++++ How do I set my default options so that I always print two-sided? Use the [[http://www.nevis.columbia.edu/cgi-bin/man.sh?man=lpoptions][lpoptions]] command. For example, to set double-sided printing as the default option on the bw-research print queue: <pre> lpoptions -p bw-research -o Duplex=DuplexNoTumble </pre> ---++++ How do I change my default printer? _Note: it's possible for a system's default printer to change; for example, if that printer goes down for a while._ Again, use the [[http://www.nevis.columbia.edu/cgi-bin/man.sh?man=lpoptions][lpoptions]] command. For example, to set the default printer to be the main black-and-white printer in the Nevis Annex: <pre> lpoptions -d bw-annex </pre> ---++++ How do I use one of these printers if I'm not at Nevis? The printers at Nevis itself are behind the firewall, and cannot be accessed directly. However, you can still access them using IPP. Setting the "printer" to be =print.nevis.columbia.edu= and the "port" or "queue" to be =printers/= followed by the name of the Nevis print queue (e.g., =printers/bw-research=). There are detailed instructions above. The printers at the Nevis Annex are generally accessible from anyone in Pupin. ---++++ How do I print multiple pages on a single sheet of paper? There are several ways. You'll have to experiment to see what's best for you. I prefer to use the [[http://www.nevis.columbia.edu/cgi-bin/man.sh?man=enscript][enscript]] command; some people prefer to use [[http://www.nevis.columbia.edu/cgi-bin/man.sh?man=a2ps][a2ps]]; there are also [[http://www.cups.org/sum.html#4_3_4][CUPS options]], though the results are not as fancy what the above programs can produce: <pre> lpr -o number-up=2 filename </pre> ---++++ The margins look funny when I print a plain text file. How do I fix this? See the section on [[http://www.cups.org/sum.html#4_4][text options]] in the [[http://www.cups.org/documentation.php][CUPS documentation]]. In general, you probably want something like this: <pre> lpr filename.txt -o page-left=36 -o page-right=36 -o page-top=36 -o page-bottom=36 </pre> Note that the above options are already the default for all the print queues on the Linux cluster (they correspond to a 1/2-inch margin on all page edges). If these margins are not sufficient, you'll have to increase them. ---++++ An image looks like it's scaled incorrectly or displaced on the page. How do I fix this? See the section on [[http://www.cups.org/sum.html#4_5][image options]] in the [[http://www.cups.org/documentation.php][CUPS documentation]]. If the problem that the image is too large, try the option =-o caling=100=. This should scale the image so that it fits on one sheet of paper. (By the way, this is a neat way of printing documents sized for A4 paper onto American letter-size paper, and vice versa.) Otherwise, I don't have a general solution to this kind of problem. You'll have to experiment on your own. ---++++ How do I use one set of options for printing text files, and another for printing postscript files? There are two ways: 1) Use command aliases. For example, if you put the following in your =~/.myprofile= file: <pre> alias lptext="lpr -P bw-research -o sides=two-sided-long-edge -o number-up=2 -o page-border=single" </pre> ... then (after =source ~/.myprofile= or re-logging) the following command will print a file with duplex, two pages on each side, and a border around each page: <pre> lptext filename.txt </pre> 2) Use [[http://www.cups.org/sum.html#5_7][printer instances]]. For example, if you define the instance: <pre> lpoptions -p bw-research/text -o sides=two-sided-long-edge -o number-up=2 -o page-border=single </pre> then you can print a text file with: <pre> lpr -P bw-research/text filename.txt </pre> ---++++ Printing large text files If you want to print a long text file, consider using the [[http://www.nevis.columbia.edu/cgi-bin/man.sh?man=enscript][enscript]] command, which formats a text file into Postscript format. The following commands will print the text file two text pages per side, double-sided (good for long program listings). Both commands do the same thing, but the options are shown in both the short and long forms. <pre> enscript -q2rGj -Pbw-research -DDuplex:true <filename> enscript --quiet --columns=2 --landscape --fancy-header --borders \ --printer=bw-research --setpagedevice=Duplex:true <filename> </pre> ---++++ Using three-hole-punch paper To print on three-hole-punch paper, check that the tray (3 in this example) holds the correct type of paper and use the following command: <pre> enscript -Gj --margins=36:36:: -o - <filename> | \ lpr -Pbw-research -o Duplex=DuplexNoTumble -o InputSlot=Tray3 filename </pre> </ol>
Edit
|
Attach
|
Watch
|
P
rint version
|
H
istory
:
r15
|
r7
<
r6
<
r5
<
r4
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r5 - 2011-09-09
-
WilliamSeligman
Main
Log In
or
Register
Main Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
Webs
ATLAS
DOE
Main
TWiki
Veritas
Copyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback