Frustrating issue today with a fairly common printer I purchased for school use. An HP Laserjet P1006. CUPS seemed like the logical solution for network printing. Set the printer up in the guided setup (System > Administration > Printing) in Ubuntu 8.04. It detected it immediately and then found a driver for it. All seemed well but when I hit the “Print test page” option nothing happened. The print job stated that it was completed around a minute later. No errors were found in CUPS logs. After some searching I found a tutorial to manually install the correct driver (http://foo2xqx.rkkda.com/). The problem with this is that you have to remove the printer entry you created previously before continuing with this step-by-step tutorial. I tried just deleting the printer I had added, but it didn’t work. I started fresh and removed CUPS, then re-installed:
sudo apt-get remove cupsys cupsys-client sudo apt-get install cupsys cupsys-client
I also removed the printer configuration:
sudo rm /etc/cups/printers.conf sudo rm /etc/cups/printer.conf.O
This may have been overkill and I had no previous printers configured, so you may not need to (or want to) remove those files.
After those removal steps I continued with the tutorial once again foo2xqx.rkkda.com and all worked correctly. I chose the option NOT suggested by Ubuntu when drivers were being chosen. Test print was successful. Quite frustrating that such a common printer is having issues with CUPS. Hopefully this can save someone else the trouble I went through figuring this out.
Thought I would add the step-by-step directions when completing this through terminal (with gnome not installed).
Since the localhost has no GUI, the easiest way to add the printer is through the web GUI remotely from another machine. To successfully do this you need to allow permissions to the remote machine (by default CUPS will only listen for connection from the localhost.)
sudo nano /etc/cups/cupsd.conf
Find the line starting with “Listen” and change it to “Listen 0.0.0.0:631″ .
You also need to allow access to the web configuration. Because this was for a temporary setup I just added “Allow @LOCAL” within all of the restriction fields. Note that this is just a quick fix, and priveleges were removed soon after. Setting to allow local for everything permanently would be a *very* bad idea.
After changing permissions accordingly, restart cupsd
sudo /etc/init.d/cups restart
The following are the instructions per foo2xqx.rkkda.com for the P1006:
wget -O foo2zjs.tar.gz http://foo2zjs.rkkda.com/foo2zjs.tar.gz tar zxf foo2zjs.tar.gz cd foo2zjs ./getweb P1006 sudo make install sudo make install-hotplug
Now Unplug and re-plug the USB printer.
sudo make cups
If all went well you can now login to the cups GUI using the url (substituting cupshostip with the IP of your CUPS host):
If you get permission denied errors you have not edited the permissions properly in the cupsd.conf file. If you are not able to connect at all double that the “Listen” line was edited properly.
Once you are in the CUPS web GUI adding the printer is fairly straight forward. Just click “Administration” tab at the top, then click on “Find New Printers”. This should detect your P1006. The correct driver should be selected by default here: “HP LaserJet P1006 Foomatic/foo2xqx (recommended)”. Now you can add the printer and all should work correctly. Don’t forget to remove the permissions added in cupsd.conf to a more secure permanent setup.