[[http://acelab.cbrain.mcgill.ca/wiki/doku.php?id=start|Return to MCIN Home Page]]
====== Using CUPS ======
===== Checking Printer Status =====
* [[http://132.216.122.31:631/printers/Hewlett-Packard-hp-color-LaserJet-3500?which_jobs=all|Show All Jobs on ace-printer-1 in NW147]]
* [[https://cups.ncs.mcgill.ca:631/printers|McGill UPRINT Printers]]
===== A bit about CUPS and ipp (Internet printing protocol) =====
**CUPS**, an acronym for **Common Unix Printing System**, is a printing system for Unix-like operating systems such as Linux and Darwin (OS X).
A computer running CUPS is a host that can accept print jobs from client computers, process them, and send them to the appropriate printers queue.
Printing via **CUPS** allows the usage of the **Internet printing protocol**, or **ipp** and has the following advantages:
* Clients systems do not need to have printer drivers installed on them.
* **IPP** uses a single port, port **631** for **TCP** and **UDP** traffic if **IPP printer discovery** is desired.
===== Printing =====
Most of your interaction with CUPS will be when you **print** something. **CUPS** and many users of Unix-like systems refer to the act of pressing the **Print** button as "submitting a print job".
Most of the time **print jobs** are sent to a printers queue and the printer prints them one after the other.
===== Using the Printer Card =====
Printing to a McGill uPrint printer with the ACELab printer card can only be done from the command line.
==== List Printers ====
First check to see if the printers are available on your machine:
me@ace-ws-00:~$ lpstat -p
Output example:
printer HP-color-laserjet is idle. enabled since Thu 26 Jan 2017 02:32:24 PM EST
printer McGill_Color is idle. enabled since Thu 16 Feb 2017 02:43:59 PM EST
printer mcgill_mono is idle. enabled since Thu 16 Feb 2017 02:44:14 PM EST
printer mcgill_mono_beta is idle. enabled since Thu 16 Feb 2017 02:44:00 PM EST
You can see here a local printer and the McGill uPrint printers.
==== Printing ====
To print a file named myfile.txt to mcgill_mono using the amni16 "Evans Lab Students" account:
me@ace-ws-00:~$ lp -U amni16 -d mcgill_mono myfile.txt
request id is mcgill_mono-117 (1 file(s))
Then, find the amni16 uPrint card and release the job at the printer.
===== Configuring a system to use a CUPS network printer =====
==== Requirements ====
* You need to be using your MCIN user name and password to sign on to your system.
* Alternativly, your user must be a member of the local or LDAP enabled lpadmin group.
==== Adding networked printers to an Ubuntu client ====
=== Requirements: ===
* The ''%%system-config-printer%%'' application.
* User must be a member of the local systems ''%%lpadmin%%'' group.
=== Real world setup for the HP color LaserJet 3500 in NW 147 ===
Start the printers interface from the command line with sudo as follows:
sudo system-config-printer
- Open the **Printing** application.
- Choose **Add**.
- Select the option **Network Printer**
- Choose **Find Network Printer**
- On the right side of the Window enter the following at the host:
cups.ncs.mcgill.ca
- Choose the **Find** button.
- Under **Enter device URI** enter something like this:
''%%ipp://132.216.122.31:631/printers/HP-color-LaserJet-3500%%''
or
''%%ipp://ace-printer-1:631/printers/HP-color-LaserJet-3500%%''
Then choose **Forward**
=== Printer Description ===
**Printer Name**
HP-color-laserjet
**Description**
HP color LaserJet 3500 USB
**Location**
NW 147
{{:1.png?400|}} {{:2.png?420|}}
{{:3.png?400|}} {{:4.png?420|}}
===== Held Jobs =====
Occasionally a job will be **held** and when a **held** job reaches the top of the print queue it is held and all of the jobs after it are also held until the held job is **cancelled**, **moved** or **deleted**.
===== Managing print jobs ======
1. Go to the CUPS web interface
( Make sure to include the **:631** after the name of the workstation hosting the printer or you will not get the CUPS web interface )
https://ace-printer-1.cbrain.mcgill.ca:631/jobs/
2. Choose the **Jobs** tab and you will see all of the print requests (Jobs)
3. In this example the first job is **held** which stops the printer queue. This prevents all of the print jobs after it from printing. Choose the most approriate option from the following:
* Choose **Cancel Job** to cancel the print job and remove it from the job (or print) queue.
* Choose **Release Job** in order to print the **held** job or
* Choose **Move** if you want to move this to a different printer queue.
In the example below the document has been held in the queue since June 9th so I would probably choose the **Cancel Job** button.
{{:managing_print_jobs-highlighted.png?|}}
Do not print a test page at this time. Double-click on the printer, select **Policies** and change **Operation Policy** from **Default Behavior** to **Authenticated** and click **Apply**.
==== References ====
* [[https://en.wikipedia.org/wiki/Internet_Printing_Protocol|Wikipedia - Internet//Printing//Protocol - 2016-05-09]].