ArchWiki / Canon CAPT
ArchWiki / Canon CAPT
See CUPS for the main article, and CUPS/Printer-specific problems for information on non-CAPT Canon printers
CAPT (Canon Advanced Printing Technology) is Canon's proprietary driver, supporting the Canon i-Sensys series of laser printers. For more information, see Setting up CAPT printers on Ubuntu.
Installation
Install the capt-src package. It depends on 32-bit library packages and requires enabling multilib.
There is also an open source CAPT driver in early alpha stage not described here, available as captdriver-git.
Configuration
Canon's driver uses a local daemon to communicate with the printer, and wraps that using a CUPS driver.
To configure the printer, follow the CUPS article, adding a CAPT printer and using a Printer URI of ccp://localhost:59787. Find the right model using lpinfo -m, or check the table provided on the Ubuntu help page, which matches each supported printer with its corresponding PPD.
* Installing CAPT printers via the CUPS web interface may not work https://askubuntu.com/a/464334. Instead, use the CLI tools.
* If port 59787 does not work, try port 59687)
Next, register the printer with the CAPT driver itself via ccpdadmin. Replace queue_name with the queue descriptive name and printer_address with either the USB port (e.g. /dev/usb/lp0) in case of a local printer or the IP address, prefixed by net: (e.g. net:192.168.1.100), in case of a network printer:
# ccpdadmin -p queue_name -o printer_addressFor example, for a USB printer (in case of multiple USB-connected printers, read #Collisions with other printers):
# ccpdadmin -p LBP6310 -o /dev/usb/lp0Or for a network printer:
# ccpdadmin -p LBP6310 -o net:192.168.1.100Start/enable the CAPT daemon with ccpd.service.
To remove a printer:
# ccpdadmin -x queue_nameCAPT status monitor
Local CUPS
The driver includes a status monitor which can be launched with
$ captstatusui -P printer_modele.g.
$ captstatusui -P LBP6310If you only want the status monitor to pop up when a problem occurs, simply append the -e switch:
$ captstatusui -P LBP6310 -eRemote CUPS
Unfortunately, a local installation of captstatusui will not detect CAPT printers on a remote CUPS server.
Remote print monitoring can be achieved, however, using SSH and X11 forwarding.
X11 forwarding has important security implications, especially when using the -Y switch (ForwardX11Trusted, required for the CAPT status monitor to work via X11 Forwarding). See X11 forwarding for further information.
There are many ways to set up X11 forwarding. For security reasons, this example is based on public key authentication, a dedicated SSH user account, and SSH running on the CUPS server. Adapt these instructions to your specific configuration.
Client configuration
create a new SSH key
~/.ssh/captand copy the public key to the remote servercreate a file
captstatusui.shwith the following content, make it executable and place it in your autostart folder:
#!/bin/sh
ssh -T -Y -i ~/.ssh/capt remote_server_hostname_or_IP_address < /dev/nullServer configuration
create a new user
captappend the following section to
/etc/ssh/sshd_configand restart the SSH daemon or socket
...
Match User capt
X11Forwarding yes
PermitTTY no
ForceCommand captstatusui -P printer_model -e
AuthenticationMethods publickeye.g.
...
Match User capt
X11Forwarding yes
PermitTTY no
ForceCommand captstatusui -P LBP6310 -e
AuthenticationMethods publickeyThis can be extended to include multiple users (using a single, shared SSH key or each with a unique SSH key) by adding each user to a capt group, then using a Match Group rule:
...
Match Group capt
X11Forwarding yes
PermitTTY no
ForceCommand captstatusui -P LBP6310 -e
AuthenticationMethods publickeyTroubleshooting
Conflict with CUPS
To prevent CUPS from accessing our CAPT-only printer (and confusing the firmware with multiple setup requests over USB), a list of unsupported VID/PID pairs may be added into /usr/share/cups/usb/. A new file (e. g. capt-printers.usb-quirks) may be created to prevent the list from getting overwritten by CUPS updates. See the issue on GitHub: Cups attempts to probe, configure unsupported Canon CAPT USB printers.
Collisions with other printers
Other printers connected to the computer may create their own /dev/usb/lpN entries, possibly even before your Canon printer is enumerated and initialized, causing CAPT to access devices it shouldn't be touching. A symlink to the USB device can be created automatically by Udev based on the USB VID/PID and (optionally) the serial number reported in dmesg.
SUBSYSTEMS=="usb", ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="271c", ATTRS{serial}=="0000A2BARL02", SYMLINK+="usb/lbp7010c"/etc/udev/rules.d/50-canon.rulesThen, add the symlinked path to CCPD:
# ccpdadmin -p LBP7010C -o /dev/usb/lbp7010cSource: Arch Forums: "/dev/usb/lp1" is used instead of "/dev/usb/lp0" for printers