At our home we have a number of PC’s and just one printer. Two weeks ago I finally replaced our ‘main’ PC with a Mac; a Mac Mini. Being a Unix man since I could read and type 2 letter commands on a terminal this feels great. At last a real desktop system running Unix… Do you have a problem with sharing iTunes music across multiple users?? Just ‘chmod’ the offending directory properly and off you go…

Now back to this printer I’ve got. It’s a HP C3180 and directly connected to the Mac Mini. OSX 10.6 installed the proper driver automagically and all works out of the box, both printing and scanning. No bloatware (buy HP cartridges online..) but just the basics such as displaying the ink levels for the black and color cartridges.

So far so good, now the PC users at home want to print on this C3180. Of course I won’t allow them to have a login on the Mini and carry documents on USB-sticks, that is so 2009… Therefor I need remote printing.

Traditionally Unix supports remote printing with LPR/LPD (BDS style) and LP (SysV style). And guess what, OSX support LPR/LPD style printing in a modern way, it’s called CUPS. Wanna try: type “http://localhost:631/” into your browser on your Mac. Presto; you’re connected to the printing engine (on Mountain Lion this web-access is disabled by default and must be manually enabled). Check out wiki for CUPS and IPP for more info.

Bonjour is another nice piece of software from Apple. Bonjour makes all kinds of communication on your lan a breeze and guess what, it’s available for windows too. Wanna remote print from PC to Mac? First install bonjour for Windows (1.0.6 is the latest) on all your PC’s. This creates a remote printer wizard icon on your desktop. This is what we’re gonna use, but first I’ll explain this remote printing interface on your Mac a little more.

CUPS implements a print queue that holds all your print jobs. In order for different users and PC’s to print to this single queue, it would be nice to use a common format for each print job. Well, this common format is actually a world standard and it’s called postscript. (real printers talk postscript..) My C3180 printer is a cheap and dumb printer; it does not know postscript. Here the printer-driver comes into play. Postscript jobs from the queue are processed by the printer-driver into the proper format for my C3180. So actually CUPS transforms my Mac/Printer combo into a postscript printing system (isn’t that cool).

What does all of this has to do with remote printing and bonjour you might ask. Well anybody who has run the bonjour remote printing wizard on windows already knows… Run the wizard and check if it finds your Mac/printer combo (make sure printer sharing on your Mac is switched on). Next select generic/postscript als your printer type; this is key to make this work. This will install an Apple Color Laser Printer (being a postscript printer that windows knows about) on your windows PC. Check out the printer queue on your PC and you’re actually looking at the queue on you Mac! Try this: switch off your printer and print something on your Mac; this will leave a job in the queue. Then check the print queue on your PC… So now you can print from PC to Mac, actually from all your PC’s to Mac since the Mac/printer combo is acting as a networked postscript print server.

How about printing to a printer that’s connected to an Airport Express? Do you think this tiny white box implements postscript and a queue? Ehhh, no. There’s no CUPS on the AE and therefore each Mac or PC that want’s to print to an AE has to install a printer-specific driver. The AE implements a so called raw interface to your printer (on TCP port 9100). As a result you have to select a printer-specific driver when running the bonjour for windows printer setup wizard. I’ve not yet tried this; so I don’t know if you can select your specific printer in this case. Otherwise select “have disk” and navigate to the proper directory where your printer driver setup file (*.inf) is located .

Finally one nice trick (Unix rules!) on how to remove incorrect print jobs from the queue. These jobs might occur during testing, for instance when you select Generic/PCL instead of generic/Postscript in the bonjour setup wizard. On your Mac, open a terminal window and type “cancel -a”. This will cancel all (-a) print jobs in the queue of the CUPS printing subsystem. Check it out with “man cancel”.

Leave a Reply

Your email address will not be published. Required fields are marked *

8 + 2 =