Sunday, 8 March 2009

Printing from Windows XP to a CUPS shared printer on Ubuntu

On the face of it, this task would seem to be very simple and there are various pages with instructions on how to set this up. Basically you configure CUPS to allow the local USB printer to be shared and then set up a new network printer on windows that has the address http://<hostname>:631/printers/<printername>. The problem is that, whilst this all seems to work OK, when you print, nothing seems to actually hit the printer. Nothing meaningful in the CUPS logs.

Lots of Googling brought me to this page.

The really critical part which makes things work is :

"Now, once you have that information, you can open a command prompt on
Windows, and type in the following command (all on one line, it is
wrapped here):

rundll32 printui.dll,PrintUIEntry /b "Printer on Ubuntu" /x /n
"blah" /if /f %windir%\inf\ntprint.inf /r
"http://<hostname>:631/printers/<printername>" /m "MS Publisher Imagesetter"

That command will install the MS Publisher Imagesetter printer driver
(which is a printer driver that uses PostScript, which is what CUPS
takes as input), and setup the printer spool on Windows. You can then
open the Printers control panel and set the printer as the default
printer, and you will be able to print to it."

No comments: