This document sets out to describe how to install and configure CUPS on GNU/Linux I'll assume that you already know why you need CUPS. Configuring for a different printer shouldn't be that difficult, CUPS is super easy to use.
emerge cups
That's it for installation, now you must configure CUPS, it comes with most drivers you'll need.
For printing from Windows through Samba update the MIME configurations. Firstly mime.types and mime.convs need to be edited as follows, the lines are commented out near the bottom of each file.
#/etc/cups/mime.convsapplication/octet-stream application/vnd.cups-raw 0 - #/etc/cups/mime.typesapplication/octet-stream
Now startup lynx to your cups web interface.
lynx http://localhost:631/
Select Add Printer, you'll have to give root password to gain access. The Name field should be the same as the share name in the smb.conf file. Location and Description can be whatever. Select Continue to choose the Device
My printer was connected via the USB port, on the Device page it was listed in the dropdown dialog. Use this to select the proper device then select Continue to choose the Model/Driver.
My printer was an HP I chose the HP Make then this Model: `HP New DeskJet Series CUPS v1.1 (en)`.
To print from Windows to the CUPS machine we choose to go around the Samba interface and use IPP directly. When creating a new printer simply point the system to:
http://server:631/printers/hp5550
Now browse to the Samba host and the printer will be visible, since the server doesn't have the drivers loaded they will need to be manually installed. The documents listed below should help with that feature.
This information was difficult to find on the web so here it is. If printing to the Samba printer is slow from Windows XP with Service Pack 2 the issue is caused by some extra junky registry entries. It's unclear why this causes the problem, who's fault is it anyways? The fix is to remove HKEY_CURRENT_USER\PrintersConnections\*.
# Values HKEY_CURRENT_USER\PrintersConnections\DeviceOld = REG_SZ # Subkeys HKEY_CURRENT_USER\PrintersConnections\Connections HKEY_CURRENT_USER\PrintersConnections\DevModePerUser HKEY_CURRENT_USER\PrintersConnections\DevModes2 HKEY_CURRENT_USER\PrintersConnections\Settings