Hardware Reference
In-Depth Information
Use Your Raspberry Pi as a Remote Print
Server
HACK 31
You're never on the computer with the bulky, unsightly printer when you
want to print something. The Raspberry Pi is small enough that you can
hide your printer just about anywhere and let the Pi do the work of being
a print server.
You might think it would be nice to hide the bulky printer out of sight, but you'll need
to connect to it to actually print something. If you connect the printer to a discreet Pi
running as a print server, you can connect to it from your primary computer remotely.
You might even be able to find ways to mount the Pi on the back of the printer, or just
tuck it away nearby. Either way, physically connect the printer cable to your Raspberry
Pi, and let's get started!
The easiest and most logical way to turn your Raspberry Pi into a print server is to set
up CUPS (the Common UNIX Printing System). It's another one of those things that's
often included in a Linux distribution, but probably not with your Raspberry Pi distri-
bution. That's what packages are for.
Install it on Pidora with the following command:
$ su -c 'yum install cups'
Or install it on Raspbian:
$ su -c 'apt-get install cups'
When you install CUPS, it creates a group called lpadmin whose members CUPS will
authenticate:
$ su -c 'usermod -aG lpadmin user'
Replace user with the username that will be responsible for the printers. (Create one
first if you prefer.)
Then you need to make a few changes to the CUPS configuration file in /etc/cups/
cupsd.conf . It never hurts to make a backup before you go editing such things:
$ cp /etc/cups/cupsd.conf /etc/cups/cupsd.conf.backup
Open the configuration file in a text editor and comment out the line under “Only listen
for connections from the local machine” that says Listen localhost:631 . Then add
the following line under it:
Listen 192.168.0.122:631
Change the first part to your Pi's IP address with :631 appended. (631 is the port that
CUPS listens on.)
Search WWH ::




Custom Search