UNIX/Linux
If you have a UNIX/Linux system external to the department that you wish to print from you will want to set up IPP printing. While we cannot provide support for non-departmental systems, to set up printing with CUPS you could try the following:
Via your web browser:
- Open a web browser and go to http://localhost:631
- Under Administration click on Add Printer.
- Enter ipp://cups.cs.ualberta.ca/printers/<printer> for the address.
Eg. for printer csc228-cpy, enter ipp://cups.cs.ualberta.ca/printers/csc228-cpy - If prompted for a driver, select the "raw" driver.
Via the command line:
lpadmin -p csc228-cpy -E -v ipp://cups.cs.ualberta.ca:631/printers/csc228-cpy
See the discussion for IPP printing under the other operating systems for more clues.
Printing with PostScript
We only support PostScript (the .ps file extension) printing.
In general printing on all UNIX based Research machines goes through CUPS. Most software detects and displays the available printers when you select the printing option (Firefox, other browser, acroread, xpdf, etc.). It should be sufficient to simply select a printer and send the job. The application should convert the job to postscript before sending it.
The command line interface command is lpr. See the Printing section below for more discussion.
Converting to PostScript
Text files must be converted to postcript before being sent to a printer. Two possible programs that may be used are:
- paf ⇒ converts an ascii file to postScript. This will default to 2 columns, for specifying the number of columns enter the option -col <numberOfColumnds>, for specifying the orientation enter the option -fmt <P/L> depending on whether you want portrait(P) or landscape(L). If you use paf you cannot have the option of selecting what paper size that you would like.
- E.g. paf <input_file_name.txt> >| <output_file_name.ps> should print 2 columns
- E.g. paf -fmt P -col 1 <input_file_name.txt> >| <output_file_name.ps> should print 1 column with portrait orientation.
- enscript ⇒ for converting a text file to a postScript file.
- E.g. enscript -p <output_file_name.ps> -X ps <input_file_name.txt>
If you may have a PDF file that you wish to convert to postscript you can generally use the following command:
- pdf2ps ⇒ for PDF files.
- Note: the outputFile name is optional. If it is not there the file will be named the same as the inputFile but with a .ps extension
- E.g. pdf2ps <input_file_name.pdf> <output_file_name.ps>
Occasionally you may encounter a postscript file that doesn't seem to print. You can try running it through the following command:
- ps2ps ⇒ this will convert a postScript file to a simpler, normalized and usually faster postScript file.
- E.g. ps2ps <input_file_name.ps> <output_file_name.ps>
You may use gv (GhostView) to view your postscript files. xpdf can be used for pdf files. To learn more about these converters go to their manual pages (man _____ ) from the command line.
Printing
There is a small set of machines in the department that do not support CUPS. If the following commands do not work for you then it is likely you are using one of these machines. As these systems are being phased out, please contact the Helpdesk for assistance.
- To check what printers are available
- lpstat -a
This allows you to see the status information about the current classes, jobs, and printers. The -a option shows the accepting state of printer queues. If no printers are specified then all printers are listed. For more options type: man lpstat in the command line.
- lpstat -a
- To find print drivers and printer names visit TST's printers page
- To print
- lpr -P<printer_name> <file_name>
Note: If your PostScript (.ps) file is corrupt, this can cause it to be stuck in the queue or not to make it to the queue at all. Please use pdf2ps to convert your pdf files.
- lpr -P<printer_name> <file_name>
- To check the status of your job on the print queue or find its job id
- lpq -P<printer_name>
Note: If your job gets stuck in the queue (ie. it appears there but won't print), please remove it so that others can print.
- lpq -P<printer_name>
- To remove a job from the queue
- lprm -P<printer_name> <job_id>
- To check the available options for a specific (research) printer. (The '*' indicates which option is set)
- lpoptions -l -p <printer_name>
- Some of the public printers are set to simplex (one-sided) printing by default and some are set to duplex (double-sided)
- To print portrait two-sided pages
lpr -P<printer_name> -o sides=two-sided-long-edge <file_name> - To print landscape two-sided pages
lpr -P<printer_name> -o sides=two-sided-short-edge <file_name> - To print single-sided pages
lpr -P<printer_name> -o sides=one-sided <file_name> - Note: If you get an error about -o being an invalid option, your job may or may not show up on the queue, but should still be printed. Welcome to the joys of Linux.
- To print portrait two-sided pages
- If you are trying to print double sided, and it is not working, your postScript file settings may be set to print single sided and this overrides the print commands. The simplest way to correct this would be to use ps2ps as this converts your postScript file to a simpler, normalized and usually faster postScript file.
- For more information, man on lpr, lpq, lprm paf, psnup, etc. to see how they work
- For more information on individual printers, see the TST printers page