Skip to content

Instantly share code, notes, and snippets.

@r15ch13
Last active February 18, 2020 12:41
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 r15ch13/296eaaaf344841242d14bbcb748f050a to your computer and use it in GitHub Desktop.
Save r15ch13/296eaaaf344841242d14bbcb748f050a to your computer and use it in GitHub Desktop.
Raspberry Pi Printer Server with CUPS

How to set up a print server on a Raspberry Pi with CUPS

Install CUPS and make it available

sudo apt-get install cups
sudo cupsctl --remote-any
sudo /etc/init.d/cups restart

Install foomatic database to get more printers

sudo apt install foomatic-db foomatic-db-engine

Add pi user to lpadmin group

sudo usermod -a -G lpadmin pi

Goto https://<raspberrypi>:631/ and add a printer. Use the linux user login credentials (e.g. pi:raspberry)

Workarounds

If the list with available printers is too big then the command /usr/lib/cups/driver/foomatic list might fail (on an older Pi) and you can't a printer. So delete or move some unused xml files from /usr/share/foomatic/db/source/printer/

e.g.

sudo rm /usr/share/foomatic/db/source/printer/Canon-*.xml
sudo rm /usr/share/foomatic/db/source/printer/Epson-*.xml
sudo rm /usr/share/foomatic/db/source/printer/Gestetner-*.xml
sudo rm /usr/share/foomatic/db/source/printer/HP-*.xml
sudo rm /usr/share/foomatic/db/source/printer/Infotec-*.xml
sudo rm /usr/share/foomatic/db/source/printer/Kyocera-*.xml
sudo rm /usr/share/foomatic/db/source/printer/Lanier-*.xml
sudo rm /usr/share/foomatic/db/source/printer/Lexmark-*.xml
sudo rm /usr/share/foomatic/db/source/printer/NEC-*.xml
sudo rm /usr/share/foomatic/db/source/printer/NRG-*.xml
sudo rm /usr/share/foomatic/db/source/printer/Oki-*.xml
sudo rm /usr/share/foomatic/db/source/printer/Panasonic-*.xml
sudo rm /usr/share/foomatic/db/source/printer/Ricoh-*.xml
sudo rm /usr/share/foomatic/db/source/printer/Samsung-*.xml
sudo rm /usr/share/foomatic/db/source/printer/Savin-*.xml
sudo rm /usr/share/foomatic/db/source/printer/Sharp-*.xml
sudo rm /usr/share/foomatic/db/source/printer/Toshiba-*.xml
sudo rm /usr/share/foomatic/db/source/printer/Xerox-*.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment