DeskTux

Linux on Desktops

User Tools

Site Tools


apps:printserver

This is an old revision of the document!


Printserver

The Raspberry Pi is extremely suitable to serve all kinds of handy things on your home network that usually would require a server. This is mainly due to its very low power consumption, but also because it is very small and can be hidden in a lot of places. For example, if you own an old USB printer that still works perfectly and want to make a network printer out of it using your Raspberry Pi. The Pi will even spool your printed jobs and print them as soon as you turn on the printer. Though I have to warn you: the computing power of the Raspberry Pi makes spooling a quite slow job, but still workable.

Server installation and configuration

  1. On your Raspberry, install CUPS:
    sudo apt-get install cups
  2. After the installation go to the dicectory /etc/cups and edit the cupsd.conf. Edit the following lines:
    Listen localhost:631

    must be

    Listen *:631
  3. Look for all sections beginning with <Location> and add the following line as a last line in that section to allow printing and administration from the local network:
    Allow @LOCAL
  4. Add the user pi to the group lpadmin so you can use this username for the web interface:
    sudo adduser pi lpadmin
  5. Afterwards, restart the CUPS daemon:
    service cups restart
  6. Finally, go to the CUPS webinterface “Administration” tab on your Pi through https://RaspberryPi-IP-or-Name:631/admin and check the following:
    • Share printers connected to this system
    • Allow remote administration
    • Allow users to cancel any job (not just their own)
      This shouldn't matter much in your home network, if you are concerned you can of course leave this off.
  7. Click “Change Settings” and the server is ready to go. Just add your printer(s) as needed.

Client configuration

On the client side installation and configuration is a lot easier.

  1. Install the CUPS Client:
    apt-get install cups-client
  2. Create the file ~/.cups/client.conf with the following content:
    ServerName RaspberryPi-IP-or-Name

    It is possible that the directory ~/.cups doesn't exist, just create it. If you prefer that to be a global setting, create that same file in /etc/cups.

  3. That's it, now you're good to go!
apps/printserver.1573287913.txt.gz · Last modified: 2019-11-09 09:25 by jens