Skip to content

Instantly share code, notes, and snippets.

@akikoskinen
Last active October 1, 2016 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akikoskinen/98b18251ca05b152d2df3548d057ef49 to your computer and use it in GitHub Desktop.
Save akikoskinen/98b18251ca05b152d2df3548d057ef49 to your computer and use it in GitHub Desktop.
Starting Canon printer service automatically on a system using systemd
Starts the Canon printer service (ccpd) on demand when a printer (any printer) is attached.
Prerequisite: install the Canon printer driver packages from Canon's website as instructed.
Put the ccpd2.service file into `/etc/systemd/system` and run `systemctl daemon-reload && systemctl enable ccpd2` as root.
The file is called `cppd2.service` because systemd maps the `/etc/init.d/ccpd` script that comes with the printer driver package to the name `cppd`. Any name other than `cppd.service` would do just as fine.
[Unit]
Description=Printer daemon for Canon printers
Requires=cups.service
After=cups.service
[Service]
ExecStart=/usr/sbin/ccpd
Type=forking
[Install]
# To run the daemon always when the system is up
#WantedBy=multi-user.target
# To run the daemon when a printer is attached
WantedBy=printer.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment