When shared printers in OS X goes wrong

Back when I bought my Mac it was a bit more of an experiment than anything. At the time I didn’t figure on needing to print so I didn’t arrange anyway for the Mac to access our printer. At the same time I really didn’t have a good setup for my laptop to access the printer either. The printer sat in my wife’s office and if we wanted to print, we had to bring the laptop to the printer, hook up the USB cable and then print.

Well, the Mac is now what I consider my primary computer and since it is a stationary box it makes a lot more sense to have the printer hooked up to the Mac and then share it. So now my current setup has the printer connected directly to the Mac and then shared to my XP laptop.

This is where the fun began. While Mac people like to talk about how easy OS X is and how easy it is to share your files or share your printers with other computers the brutal truth is OS X much prefers to share with other OS X machines, particularly in Leopard. This is evident in Apples choice to enable file sharing using Apple’s AFP by default rather than smb/cifs. In other words, enabling file sharing without visiting an options dialog will leave you scratching your head. Same thing applies to printing, though it is barely Apple’s fault here. The difference lies in the printing systems used in the OS X/Linux world and Windows.

OS X, like most Linux systems today, uses CUPS or Common Unix Printing System to provide print services for OS X. Windows does not and so it does not understand the drivers that CUPS uses for printing. So when I shared out my Photosmart 8150 and added it to my XP laptop my laptop requested the drivers for my printer. After providing the drivers and attempting to print a test page I was greeted with a whole lot of nothing. Why? Well it turns out that the Windows drivers will not talk to the OS X drivers properly and nothing happens.

Thankfully CUPS on OS X can be configured manually just like it can be under Linux by using the web interface. Here’s how.

Start by enabling printer sharing on OS X. Even though Windows can’t print to this printer you must enable printer sharing so that OS X opens up and starts the necessary ports and services.

Next, you must have your root account enabled. The easiest way to do this if you haven’t already is to open terminal and type ‘sudo su -‘ (no quotes) and press enter. Enter your password and press enter. Now set root’s password by typing ‘passwd’ and pressing enter. Follow the on screen prompts. If you don’t have a password set you can also use Directory Utility to enable the root account and then set a password. I don’t have experience using this method so YMMV.

Next, open up your favorite web browser and head to http://localhost:631 and click on the add printer button. Type in a name for your printer. For my setup I used Photosmart_for_Windows. Notice the underscores in place of spaces. Click continue

On the next screen you will select the device you wish to print to. In my case, I chose HP Photosmart series 8100 USB. Click continue.

On the next screen you might be asked to select which specific model you are using. You can simply click the Add Printer button without choosing anything.

On the next screen you will be asked what Make the printer is. Here, be sure to click raw and then click the Add Printer button again.

Next you’ll be asked about the Model and this time your only option will be Raw Queue. Click this option and click Add Printer. You will be asked for a username and password. Here you provide your root username and password. In my case it is root and ******.

You are now done with the OS X portion of the setup.

On the Windows computer go to Printers and Faxes in the control panel and click the Add a printer link on the left or Add Printer from the file menu.

Choose ‘A network printer…’ and click next

Click the third radio button for ‘Connect to a printer on the Internet….’ and enter in the following

http://<mac hostname>:631/printers/<printer name>

In my setup it is

http://macmini:631/printers/Photosmart_for_Windows

Click next

Window will pause for a while and then finally ask you for the printer drivers. Either choose the appropriate drivers from the list or use have disk and browse for them. Finish the add printer routine and do a test print.

Leave a Reply

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