By wrw3 at 2004-06-10 23:27
This Linux Answer outlines the steps to connect and print using CUPS to an HP OfficeJet 5510 attached to a Microsoft XP Pro. Please do not rely on these instructions alone without familiarizing yourself with the docs for CUPS (www.cups.org/documentation.php), information about HP printers and the HPIJS driver (www.linuxprinting.org/show_printer.cgi?recnum=HP-OfficeJet_5500), and Samba (www.samba.org).
I crafted these instructions on a Red Hat (RH) system, kernel 2.4.18-14. No reason to believe anything here is distribution specific, however.
1. Since I had vestiges of LPD and CUPS on my system, and was not being successful in getting the new printer to work, I decided to clean house, removing all the printing software (LPD, cups) using RH's package manager.
2. Download the latest CUPS from www.cups.org, and the latest HPIJS from www.linuxprinting.org for the HP OfficeJet 5500.
3. Install CUPS (Standard routine: ./configure, then make, then make install -- you must perform make install as root)
4. Install HPIJS (same routine as above).
5. Test HPIJS ( # hpijs -h should show hpijs 1.6 Also, you should have the requisite ppd file (HP-OfficeJet_5500-hpijs.ppd) in /etc/cups/ppd, installed by the HPIJS make install. )
6. Activate the CUPS server (# /etc/init.d/cups start -- if CUPS is running (/etc/init.d/cups status) then use restart, vs start as the argument)
7. Check for the CUPS backend's knowledge of SMB services by running lpinfo -v. The first run of this on one of my workstations did NOT show network smb so I had to enter a link:
#ln -s `which smbspool` /usr/local/libexec/cups/backend/smb
and then restart CUPS: # /etc/init.d/cups restart
8. Now CUPS should be ready to create a printer, so point your browser to http://localhost:631 to open the CUPS admin utility.
Log in as root with the root password.
Select Do Administration Tasks, Printers, Add Printer. Note that the Add New Printer dialog Name field must start with an alpha and contain no white space. The other two fields (Location and Description) are more relaxed.
Declare the Device to be Windows SMB (that selection was at the bottom of the list for me).
9. Device URI: The URI that worked for me is in the form: smb://[UName}:[Password]@[Machine Name]/[Sharename]
Implied in that statement is a user set up on XP for SMB login. Here I am not sure of exact facts, because there are many postings with varied info on what works when printing to Windows print queues. Some claim logging into a user account is not necessary, but I found that I had problems unless I did. Review your samba logs if you get unexpected results. They can be found in /var/log/samba. I have a user on the XP system with rights to the printer for the purpose of accepting print jobs from my Linux workstations. On my network it works using a URI like this:
10. You should be able to print a test page from the CUPS admin utility, now, and live happily ever after.