I would like to use my Pi as a print server. My printer is supported by the computer I want to use as a print server. Is it fast enough and has enough for this? How do I setup a print server with the recommended debian image?
-
Note: if you find the cups slow with gs or pdftops using up 100% cpu. Then go into the Device Settings in cups web interface and set the dpi to 300. Most of the Lexmark printers default to 600 dpi. If you don't like the grainy look of 300dpi then edit the PPD file and find where the 300 dpi settings are, duplicate 300 and set it to 350. I found 350dpi looks almost identical to 600dpi. * Files are found under /usr/share/ppd/ and /etc/cups/ppd/ * You will have to stop and start cups to see the changes.– user23156Commented Dec 10, 2014 at 5:33
1 Answer
Preamble
As pointed out by several other helpful members (Okay. @AlexChamberlain to be honest.) you need to make sure that your printer drivers work first! If you can't print regularly from your computer there is no use converting it to a printing server.
The procedure for installing the printer is beyond the scope of this answer, but at the very least, must include installing CUPS, which includes the daemon.You can do that by running the following.
$ sudo apt-get install cups
On Debian or the following on Arch Linux.
$ sudo pacman -S cups
Server
You just need to reconfigure the server to allow other machines to access your printer. You're going to be editing the /etc/cups/cupsd.conf
file and there are two things you need to specify.
- The connection to listen to.
- Which machines can use the printer.
Here is one that should suit our needs, feel free to change the values.
# /etc/cups/cupsd.conf
Listen *:49631
<Location /printers>
Order allow,deny
Allow 192.168.0.*
Allow 192.168.1.*
</Location>
Finally we just need to restart the CUPS daemon. Remember that anytime you change something in the config file you need to restart the daemon. On Debian, run
$ sudo /etc/init.d/cups restart
Tada! We have set up the server! =D Now we just need to set up the client...
Client
Windows
To allow Window machines to print via our CUPS server we need to provide them with an http://
address. In order to do this we are going to install samba
$ sudo aptitude install samba
Make sure you restart the CUPS daemon.
$ sudo /etc/init.d/cups restart
And now we can tell Windows to use the following URL! (Make sure that you edit it to reflect your specific setup.)
http://<ip>:<port>/printers/<printer_name>
Arch Linux
Since installing printers differs window manager to window manager we are going to do this the old-fashion, true-Arch way! First you need to install libcups
.
$ sudo pacman -S libcups
And then you just add the CUPS server IP or hostname to /etc/cups/client.conf
. Your file should look like this.
# /etc/cups/client.conf
ServerName hostname-or-ip-address[:port]
Every application should then be able to find the printer.