Use your Mac laptop to utilize a Windows printer
I recently set up a wireless connection in my apartment, consisting of a Linksys WRT54G router, a Netgear CM212 cable modem, and a desktop running Windows XP Pro and a G4 iBook running OS X 10.4.2 Tiger. I have an Epson Stylus CX5400 USB printer attached to the Windows box, and wanted to get it working under the iBook wirelessly. Could it be done?
I tried the simple method of connecting directly to the share from Finder’s Network connection, but for whatever reason, it refused me access. I could see my computer, but there was no way of connecting to the printer. I quickly ran to Google for an alternative method.
Google told me that I could make this work, under the re-assuring article entitled, "How to Use a Printer Attached to a Windows XP Computer in Mac OS X” which just about hit the nail on the head. Unfortunately, the exact method described did not work for me, although it got me very close to success.
After reading another article, entitled "Five Cool Things to do with CUPS", I finally got it working.
This article is a mix and mash of the two mentioned articles, plus a few comments from myself that will hopefully be the fastest and clearest way to set up wireless printing on an OS X laptop. All of the original correct methods have been pioneered by the original authors, I’ve just taken the information and joined the bits that worked the best for me.
First things first: I am going to assume that your printer is already successfully hooked up and working on your Windows box. You should also have a wireless network set up and functioning correctly. I also am taking the assumption that you are at least vaguely familiar with the Windows XP and OS X environments, so if I mention the Control Panel on the XP box, you know how to get there, and so forth. If you don’t know, then ask our friend Google, he’ll help you out with a quickness.
Ok, now that all of that is out of the way, here’s what we need to do.
Get the Windows IP address. Fastest way to do this is go to Start > Run > and type in
cmd
Then in the new window, type
ipconfig
and write down the windows IP address; we’ll need it later. It should be in the ballpark of http://192.168.1.xxx or somewhere around there.
We need to tell Windows that we’re going to share the printer. Click Start and then Control Panel. Then double click on Printers and Faxes. Right-click on your printer, then select Properties. Select the Sharing tab, set Sharing to on, and name the Share something short and sweet. Don’t use spaces, you don’t want to make this more complicated than you have to. My printer’s name is “printy”, which I think is accurate.
Ever since Service Pack 2 came out for Windows, additional security measures have been set in place, so we’ll need to manually open up an additional port, although we just told Windows to share the printer.
So go to Start > Control Panel > My Network Places > Network Connections. New task on the left: Change Windows Firewall Settings, then click on the Exceptions tab. Click on Add Port, enter "OS X printer" (or whatever you want) in Name and "515" in Port Number. Leave TCP selected, click OK, OK and you’re done.
You might have to enable the Print Server service in the Services section of the Administrative Tools control panel. To check this, open Control Panel, then open Administrative Tools, then Services. Click on the Extended tab. Find the service TCP/IP Print Server, start it, and set it to start automatically.
Now we must set up print services for Unix. Click Start and then Control Panel. Double click on Add or Remove Programs. Click on Add/Remove Windows Components. Double click Other Network File and Print Services. Select Print Services for Unix. You might need your Windows XP CD, but I didn’t. Click OK to go back to the Add/Remove panel. Close it.
We’re done with the Windows box, now we need to get the Mac working with it.
Open a terminal window and type in:
cd /usr/libexec/cups/backend/
and then type in
sudo ln -s /usr/bin/smbspool smb
This creates a symbolic link for working with CUPS (Common Unix Printing System), if you’re curious about what you just typed in. After the sudo command, it will ask you for a password, so you need to have administrator’s privileges.
Now start up printer sharing from the Sharing Preference Pane. If you have already started it, you need to turn it off and then on again for CUPS to pick up the changes.
Go to the CUPS web interface at http://127.0.0.1:631
Select “Add Printer.” Give it a name, a location, and a description. These can be whatever you want.
Then choose:
LPD/LPR Host or Printer
The URI is in this format:
lpd://your.windows.ipaddress.from-earlier/your-printers-shared-name
Then choose the make and model. If they don’t have it exactly, it will probably still work.
That’s it. Hopefully you can now print with ease from your toilet or your bed or wherever you want to now.
-->

September 10th, 2005 at 2:09 am
Nice writeup. Another one I found helpful is:
http://www.ifelix.co.uk/tech/3002.html
Cheers,
HJ
October 10th, 2005 at 5:42 pm
Thanks. This was a very timely posting. I had the exact problem and the problem is solved. This writeup was so clear that even a rookie could follow the instructions.
MJM
October 27th, 2005 at 4:43 pm
Hey,
This worked straight away… i had a HP printer and I used the Cups driver as the list of models didn’t exactly match.
Fair play!
The Goose.
November 5th, 2005 at 12:23 pm
Worked like a charm. Thanks!!
November 21st, 2005 at 2:30 am
Thank you so much! There were so many pages with such wrong advice, but your step-by-step setup worked perfectly to let me print wirelessly when visiting my Windows-centric parents.
November 24th, 2005 at 1:29 am
Thanks! ! it worked for a day, but then it stopped working. What’s wrong with my mac??? but it made me happy for a little while. ^_^ thanks.
November 24th, 2005 at 6:08 pm
japnzb0i, it was probably due to your DHCP settings in your router which assigned your windows box an ip address before your Mac, or vice versa. This happens when both machines are turned off, and whichever one gets booted first grabs the first ip address (if you have DHCP enabled on your router).
You can go to your CUPS admin page and change the ip address, or look into assigning a static DHCP to your laptop, so it will always have the same address while you’re at home. I used a 3rd party firmware to allow me to do this.
December 4th, 2005 at 8:01 pm
Extensions - Firefox 1.5
After making the switch to Firefox 1.5, here are the add-ons I currently have installed. (list generated by this extension, great for keeping a back-up record)
Please comment if you have any suggestions..
Enabled Extensions: (25)
All-in-One Gestures 0.17
December 11th, 2005 at 6:51 am
Great! I am really need it
January 16th, 2006 at 12:44 am
I followed all the steps, but it doesnt work.
Once I added the printer via the CUPS web utility, I printed a test page. Then I refreshed and it said that the job was sent successfully. When I goto the windows machine and look at the print queue, it shows the job, but says Failed - print. This has happened every time, with every method (printer setup utility etc…)
February 23rd, 2006 at 5:41 pm
Does this work if the mac is connected via AirPort extreme?
February 23rd, 2006 at 5:43 pm
I just ask this question that can look stupid because my printer is not a network printer, so i am not able to share it directly from the airport’s usb. another question: will the scanner built in my printer work wirelessly? and the media card reader? thx
March 30th, 2006 at 11:20 pm
This is just such exciting stuff. Great blog.
May 18th, 2006 at 3:52 pm
Thanks,
I was ready to buy a bluetooth printer, because I was fed up with everything else I had read. You saved me lots o money and it was very easy.
May 20th, 2006 at 10:10 am
Absolutely fantistico! Congratulation, a superb well laid out piece of advice. Thank you very much. I was nervous as I havent used macs nor unix that much, you made it easy!
regards
rahul
May 29th, 2006 at 10:16 pm
Thanks for publishing this. I have no idea how I could have figured out this by myself! Most helpful.
June 18th, 2006 at 5:27 pm
i can’t get past the CUPS utility. it asks for a password???? my admin password isn’t working. any suggestions.
TIA
June 27th, 2006 at 6:50 pm
[…] The following how-to post proved to be very helpful and blockquoted are passages from those instructions below, which boiled down to the following steps: […]
June 30th, 2006 at 12:57 am
Giving my IP address to a public adress - (Go to the CUPS web interface at http://127.0.0.1:631) is it safe? I am newbie, if this question is silly, forgive me…
July 12th, 2006 at 10:45 pm
hello, don’t worry, you’re fine. you’re confused about how the internet works but the short answer is: don’t worry
July 27th, 2006 at 1:17 am
Thanks a lot! This helped me immensely to solve my problem with printer-sharing between my PC and my Mac. Keep up the good work.
July 29th, 2006 at 5:02 pm
I have the opposite problem…I have a printer connected to a mac and a windows laptop on a wireless network. I can’t get the printer to recognize print commands sent by the laptop, even when I can connect to it via the network. Any thoughts?
August 28th, 2006 at 9:19 pm
Same Problem as Tom - asks for a password and admin password doesn’t work
September 4th, 2006 at 1:48 pm
In following the directions I ran into a couple of obstacles. One I could not locate the service TCP/IP Print Server on my XP. Also, when I go to add printer on CUPS it asks for a username and password. Here I am lost as what to enter. HELP! LOL
October 13th, 2006 at 10:36 am
I also had the problem, however, I found if you clicked the bottom choice;
Download The Current CUPS Software
The first thing on the left is FAQ that explains the password thing.
I’m running 10.4.8 and my short name/password worked fine
Thanks for the tutorial.
sKurt
October 15th, 2006 at 2:33 pm
“The process “rasterohp” stopped unexpectedly with status 1″ I followed all the instructions to the letter. The windows computer is running xp and I have the current version for tiger. I would like to print on an HP 4200 series. The correct driver does not come up on the cups page, so I use the only cups driver shown. The error above keeps showing up on my mac printer que page. The printer works fine on the windows compuer. Plus, I could not find tcp/ip print server. I did find “server” and it did mention printing. It is configured to be auto. Please email me an answer if you get the time. Thank you…(Still not working)
October 29th, 2006 at 8:02 pm
worked great thankyou
December 27th, 2006 at 4:06 pm
I still cannot locate the service TCP/IP Print Server on my XP. HELP!
February 28th, 2007 at 1:16 pm
Hi Eric - thanks VERY much for your clear and straightforward tutorial. I’d been combing the Web for weeks and banging my head on my desk - I even tried (and failed) to set up a standalone print server. Ugh.
rperkins - I also had problems finding my TCP/IP Print Server. I had to install the additional Windows components before I could move on. I’m not a WinXP expert, but I added the following Networking Services.
(Control Panel -> Add/Remove Programs -> Add/Remove Windows Components)
select “Networking Services”
select “Simple TCP/IP Services”
(just to be sure, I added “Peer-to-Peer” and “UPnP User Interface” - but suspect this step is irrelevant)
Once I finished the process - which involved installing files from the original WinXP CD and WinXP Service Pack 2 - the TCP/IP Print Server appeared and was ready to enable. The rest of Eric’s tutorial went like clockwork.
(I had also been worried about using the CUPS Web interface, but didn’t have any problems logging in with my Mac OS username and password.)
Hope this helps. Eric, thanks again for the great work.
February 12th, 2008 at 4:36 pm
Thanks for all of the information. Your instructions are the simplest I have seen and got me the closest to printing from my Mac. However, I am still having a problem. When i send a job, I see it in the Windows Queue. It processes and appears to complete. But, the printer remains silent. I have no idea why. No error. Nothing. I fall on your mercy for help.
March 25th, 2008 at 6:37 am
Great step by step instructions, so easy to follow. I got all the way through and I can’t print! I did the steps twice to make sure I didn’t miss anything, but no change. I keep getting the error message : “There is a problem communicating with the printer. Make sure the printer is powered on and connected to the computer. Please cancel or stop job and try again. Make sure your printer is connected to your USB port.”
I set it up as you said above, (wireless) so I’m wondering why it’s asking me to connect it via USB. I have a Lexmark P6250 connected to my Windows XP and I’m using a Trendnet TEW-432BRP router for my network.
Do I need some kind of wireless driver for my printer maybe? (It’s about 3 years old)…
Any suggestions would be greatly appreciated.
Thank you in advance for your help!
LG
March 27th, 2008 at 9:15 pm
It’s me LG again! (read above)
I tried choosing another printer from the Lexmark list. (not my model) I have more progress now, but still no full printing. I now can hear the Lexmark guy saying “Printing started” on the PC and then something clicks on the printer, and the progress bar comes very briefly on the screen, (sounds like it will start printing) but it seems to cut out after that. The paper doesn’t feed or print. So, the good news is something is going through the wireless network, but obviously something is blocking the entire job.
If anyone has any suggestions I’d be OH SO grateful! I went so far as to try EVERY printer on the Lexmark list to see if it’d work and none of them did! :( Is it possible that there’s something on my PC blocking the connection?
In hopes someone reads this and can respond. I’m getting very frustrated!!!
Thanks!
LG