Difference between revisions of "Printing.old"

From CsWiki
Jump to: navigation, search
m (Protected "Printing" [edit=sysop:move=sysop])
m (Printing moved to Printing.old)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Quota =
+
==Quota allocation==
* Each student have a printing quota of 200 pages per semester.
+
At the start of the academic year, the quota of all ordinary users is set to 200 pages.
* The quota applies only for printers in the CS network.
+
At the start of the second semester, the quota of undergraduates, first-year graduates and non-research graduates, is reset to 200 pages (plus any pages remaining out of a 'bonus').  
* If a course requires extensive printing, the TA or lecturer should request additional quota for the course's students.
+
Other users can ask their academic contact to request extra quota on their behalf.
* If a student requires additional quota as part of his project or thesis, he should request from his supervisor.
+
If a course requires extensive printing, the Metargel may request additional quota for all his students.
  
= Printers =
+
==How to print==
* Undergraduate students can print in the printers located at the open space:
+
Jobs are sent to the printer using command ''lpr''.
** Ross -2: '''st1''' and '''st2'''
+
Most printers can print only PostScript and Text files.
** Rothberg lab (Aquarium): '''xl1''' and '''xl2''' (down stairs)
+
(Printers ''nrg'' and ''ps4'' can print also PDF files.)
** Levi: '''dk'''
+
Document viewers e.g. ''firefox'' and ''acroread'', convert a document to PostScript before piping to ''lpr''.
* The printer '''st''' (the default printer) will print to the closest printer (in the open space).  
+
Various command line utilities are also available for converting to PostScript
* The open space printers should to be handled by students at all. If any problem occur, please notify the [mailto:system@cs.huji.ac.il System Group].
+
e.g. ''enscript'' and ''a2ps'' for Text, and ''pdf2ps'' for PDF.
 +
Other utilities manipulate a PostScript file e.g ''mpage'' can put multiple pages
 +
on one physical page.
 +
Document viewers for PostScript include ''gs'' and ''gv''.
  
= Printing =
+
Examples:
== Printing from the shell ==
+
  mpage -2A file.ps | gs -
There are several commands for printing from the shell:
+
  pdf2ps file.ps | mpage -2A | lpr
; lpr : The basic printing command, will print postscript (e.g. file.ps) or any text files (e.g. file.txt, file.java, etc.)<pre>lpr file.java</pre>
+
; mpage : Prints multiple pages per sheet, i.e. can save paper/quota if you don't mind printing a bit smaller<pre>mpage -2P file.java</pre>Will print file.java, with 2 pages per sheet to the default printer. see also ''man mpage''.
+
; a2ps : Prints all kind of file formats (postscript, text, code, images, etc.), and can print several pages per sheet:<pre>a2ps -2 file.java</pre>Will print the java file in a nice format (keywords and comments are recognized) with 2 pages per sheet. See also ''man a2ps''.
+
<br>
+
All programs receive the '''-P<printer>''' flag, to determine on which printer to print. e.g.:<pre>a2ps -2 -Pst1 file.java</pre>Will print the java code in the st1 printer.
+
  
== Printing from X window environment ==
+
==Printers==
Most of the graphical programs that support printing, simply use one of the above commands to print (e.g. gv, acroread, and more).<br>
+
Undergraduates can print only on the printers in the public labs:
In the print dialog of those programs, you can set the printing command as mentioned above and print with a different layout or to a different printers (or all the other options that those commands support).
+
* '''xl1''' - Rothberg, upper floor
 +
* '''xl2''' - Rothberg, lower floor
 +
* '''sp'''  - Levy
 +
In the public labs, '''st''' is an alias for the nearest printer.
  
<!-- == Printing from windows == -->
+
In case of a problem with any of the public printers, mail ''system'' or, if urgent, call 84195, 85691, 85692, 85298, 86156 or 86942
  
= Utilities =
+
==Utilites==
== lpq ==
+
Besides '''lpr''', the print suite includes the following utilities
To see the printing queue type:
+
* '''lpq'''  - list all print jobs
lpq
+
* '''lprm''' - remove print jobs e.g.
To see the printing queue of the st1 printer, type:
+
  lprm -
  lpq -Pst1
+
  lprm 123
 +
All utilities take argument ''-P<printer>'' where ''<printer>'' is the name of a printer.
 +
If it is not supplied, the '''PRINTER''' environment variable is used.
 +
The .cshrc file given to new users (or installed by ''reinstall'') sets '''PRINTER''' to ''st''.
 +
See the relevant man pages.
  
== lprm ==
 
To remove all your jobs from the queue, execute:
 
lprm
 
The lprm utility can receives the '''-P<printer>''' flag (otherwise the default is chosen), and can receive a specific job id (job id can be determined with the ''lpq'' utility):
 
lprm -Pst1 234
 
Will remove job 234 from the st1 queue.
 
  
== stquota ==
 
To see how much printing quota you have left, execute:
 
stquota
 
or
 
psquota
 
  
== printjobs ==
+
==Quota accounting==
To see a log of your printings (time, pages, printers), execute:
+
One page of quota is deducted for each side of paper printed.
printjobs
+
The following commands are available:
 
+
* Show current quota:
 
+
   psquota
<!--
+
* List all quota allocations since quota was last reset
---
+
   psquota --verbose
Files can be printed directly from X software (e.g., eclipse, firefox or PDF readers). Text files and PostScript files can be printed from the editor or using shell commmands.
+
* List all quota deductions since quota was last reset
 
+
   printjobs
==Shell commands for printing and quota management==
+
Command ''printjobs'' takes a variety of arguments. To see, do
To print the file ''labaneh.ps'' from the command line, type
+
  printjobs --help
lpr labaneh.ps
+
To print a Java file, type
+
lpr labaneh.java
+
And the file will be printed in the nearest printer.
+
 
+
Note that ''lpr'' can be used only for text (e.g., source) files and PostScript files. Other types of documents should be printed
+
from the applications you use to view them.
+
 
+
To see a list of all your printed (and queued) jobs, type
+
printjobs
+
 
+
The output is formatted in this style:
+
 
+
        time        | printer | pages |        jobname
+
---------------------+---------+-------+--------------------------
+
  2006-10-22 10:21:08 | xl1    |    1 | STDIN(Mozilla)
+
   2006-10-22 10:22:42 | xl1    |    1 | STDIN(Mozilla)
+
  ....
+
   ....
+
  2006-11-30 12:08:27 | xl1    |    4 | STDIN(xpdf/pdftops 3.01)
+
   2006-11-30 12:10:55 | xl1    |    10 | STDIN(xpdf/pdftops 3.01)
+
 
+
 
+
To see the left quota use ''psquota''
+
 
+
psquota
+
 
+
The output is the number of pages left:
+
115
+
 
+
==Links==
+
[http://www.cs.huji.ac.il/support/intro.html CS documentation about printing and quotas]
+
 
+
[http://nersp.cns.ufl.edu/~dicke3/nerspcs/lpr.html lpr man page]
+
-->
+

Latest revision as of 07:14, 30 June 2008

Quota allocation

At the start of the academic year, the quota of all ordinary users is set to 200 pages. At the start of the second semester, the quota of undergraduates, first-year graduates and non-research graduates, is reset to 200 pages (plus any pages remaining out of a 'bonus'). Other users can ask their academic contact to request extra quota on their behalf. If a course requires extensive printing, the Metargel may request additional quota for all his students.

How to print

Jobs are sent to the printer using command lpr. Most printers can print only PostScript and Text files. (Printers nrg and ps4 can print also PDF files.) Document viewers e.g. firefox and acroread, convert a document to PostScript before piping to lpr. Various command line utilities are also available for converting to PostScript e.g. enscript and a2ps for Text, and pdf2ps for PDF. Other utilities manipulate a PostScript file e.g mpage can put multiple pages on one physical page. Document viewers for PostScript include gs and gv.

Examples:

 mpage -2A file.ps | gs -
 pdf2ps file.ps | mpage -2A | lpr

Printers

Undergraduates can print only on the printers in the public labs:

  • xl1 - Rothberg, upper floor
  • xl2 - Rothberg, lower floor
  • sp - Levy

In the public labs, st is an alias for the nearest printer.

In case of a problem with any of the public printers, mail system or, if urgent, call 84195, 85691, 85692, 85298, 86156 or 86942

Utilites

Besides lpr, the print suite includes the following utilities

  • lpq - list all print jobs
  • lprm - remove print jobs e.g.
 lprm -
 lprm 123

All utilities take argument -P<printer> where <printer> is the name of a printer. If it is not supplied, the PRINTER environment variable is used. The .cshrc file given to new users (or installed by reinstall) sets PRINTER to st. See the relevant man pages.


Quota accounting

One page of quota is deducted for each side of paper printed. The following commands are available:

  • Show current quota:
 psquota
  • List all quota allocations since quota was last reset
 psquota --verbose
  • List all quota deductions since quota was last reset
 printjobs

Command printjobs takes a variety of arguments. To see, do

 printjobs --help