Cups
From wikinotes
Cups is the standard linux method of interacting with printers and scanners.
Documentation
github https://github.com/apple/cups homepage http://www.cups.org/
Tutorials
setup tutorials https://www.thegeekstuff.com/2015/01/lpadmin-examples/ FreeBSD cups https://docs.freebsd.org/en/articles/cups/
Locations
/etc/cups/cupsd.conf
config /etc/cups/cups-files.conf
config /var/log/cups/*
logs http://localhost:631
web interface
Install
Cups
pacman -S \ libcups \ cups \ cups-filters \ usbutils pacaur -S ink # (optional) ink levels usermod -aG lp ${user} # add user to lp group usermod -aG wheel ${user} # add user to wheel group (permission to print) systemctl enable cups.service systemctl start cups.service # print-queue web interface systemctl enable cups-browsed.service systemctl start cups-browsed.service http://localhost:631Drivers
epson
# canon, epson, lexmark, sony, olympus, pcl pacman -S gutenprintbrother hl2390dw
aur sync brother-hll2390dwWhen adding printer and it prompts for PPD, choose
/usr/share/brother/Printers/HLL2390DW/cupswrapper/brother-HLL2390DW-cups-en.ppd
Add Printer
You can do this from the commandline, or from the web ui.
Web-UI
- open http://localhost:631/admin/ : - Add Printer: # auth as your user # continue
CLI
Print queues are associated with your printer.
Consider naming them after the printer, (ex:epsonip110
)# find your printer lsusb # confirm printer detected lpinfo -v # find preinter URL (ex: usb://HP/DESKJET%20...) # add your printer # (cupsfilters in: /usr/share/ppd/cupsfilters/) lpadmin -p ${queue} -E \ -v "usb://HP/DESKJET%20..." `# printer url` \ -m drv:///hp-deskjet-940c.ppd.gz `# cupsfilter`
Afterwards, you'll need to set the default printer and you may need to enable it.
(if you used the UI, queue may be set during setup, tab complete it)# set default printer lpoptions -d ${queue} # can tab-complete queue # may be unecessary cupsenable ${queue} # activate printer cupsaccept ${queue} # set printer accept jobs from queue
Usage
Printing
lp file.txt # print fileStatus/Debugging
lpstat -s # status of default queue lpstat -p ${queue} # status of specific queue (tab complete queue names) cupsenable ${queue} # activate printer cupsaccept ${queue} # set printer accept jobs from queue lpstat -s # printer status lpr /usr/share/cups/data/testprint # print testpage lpr ${filepath} # filepath ink # print ink usage
Troubleshooting
Jobs queued, but will not print
Try deleting and re-adding the printer.