md   :netprint  services   résumé   portfolio   pursuits   contact 

Solving Common Printing Problems with Windows XP and Remote HP USB Printers


Updated 2004-12-17

Connecting low-cost USB printers to a Unix machine with Samba and CUPS is a convenient alternative to a costly network-ready printer. But printing from Windows in this arrangement can be trouble unless you know the secret workaround.

Most users create a new printer under Windows, choosing the "Network printer" option for use with a Samba share. This seems logical and is how I did it for years. But this creates two common problems.

The first is getting multiple copies to print. Any time you print multiple copies, the printer only prints one. The web is rife with hapless souls searching for the solution to this problem. (If you're one of them, keep reading because I have your remedy.)

The second and much more serious problem started when I got an HP OfficeJet 6110xi. Installing the software and creating a new printer via the "network printer" option resulted in "fatal exception" crashes any time you tried to use the printer, get Properties on it, etc. Very nasty and quite frustrating.

After much experimentation, I came up with a solution that solves both of these problems. Follow the steps below and you can have a networked USB printer as if it were connected directly to your workstation or laptop. And you can efficiently print multiple copies! (Now, if I could just find a way to remotely scan on the OfficeJet...)


These instructions assume you have Windows XP with Service Pack 2 or newer, CUPS and Samba already installed and working locally on the Unix system, and you are able to see the printers over the network from Windows. You also need to create a separate printer in CUPS that uses a RAW printing driver.


   Create a Locally Connected Generic Printer in Windows XP

  1. Click Start >> Printers and Faxes
  2. Click "Add a Printer" and click Next
  3. Choose "Local printer attached to this computer" and make sure "Automatically detect..." is not checked.
  4. Select any local printer port (e.g., LPT1) and click Next
  5. Choose the "Generic" printer manufacturer and "Generic / Text Only" printer.
  6. Complete the rest of the wizard steps (don't print a test page)
   Reassign a new Printer Port
  1. Right click on the new printer and choose Properties
  2. Give your Generic printer a meaningful name
  3. Select the "Ports" tab
  4. Click the "Add Port" button
  5. Select "Local Port" and click "New Port..."
  6. Enter the UNC path as configured in CUPS and Samba to the networked printer (e.g., \\server\hpraw)
   Install the Printer Driver
  1. Download and unpack the latest drivers for your printer (you may or may not need to actually install them at this point -- but you'll find out soon enough).
  2. Select the "Advanced" tab
  3. Click the "New Driver..." button
  4. Click "Have Disk..." and navigate to the HP driver directory
  5. Complete the driver installation. If you have trouble with this step (as hinted in step 1), you'll need to temporarily connect the printer directly to the Windows machine and do a standard installation. That will cause the drivers to be loaded into Windows. Put the printer back on the Unix box and you should be able to assign the installed drivers to your original printer (replaces the Generic / Text driver).
  6. Print a test page. If no test page appears, your CUPS configuration probably doesn't have binary (raw) printing support enabled. Edit the CUPS mime.types and mime.convs files and uncomment the lines that refer to "application/octet-stream". Restart CUPS and try again.
  7. You're done!
Please let me know if these steps work for you.


  COPYRIGHT © MORGAN DAVIS