Below are the high level steps
- Make sure the printer is setup on the linux machine, and is able to print using CUPS.
- Open the CUPS service to be accessible from other computers. Here is how to do this: Invoke the browser, and type http://localhost:631. You should see the CUPS service page. Note the printer name, and change settings for that printer to share on other computers, and enable remote configuration (you should see check boxes for this).
- Once you share, you should be able to type http://
hostname:631 (hostname can be found by typing hostname command in a xterm window) and access the same CUPS service page. Or, in case DNS is not setup, you should be able to type an IP address in lieu of host name (e.g. http://192.1628.1.5:631) and get the CUPS page. (Type hostname -i to get this IP address). Be sure you use the WiFi interface IP address (or the Ethernet interface IP address, as appropriate). - CUPS listens on port 631, so the goal here is to open 631 across all firewalls. Invoke the Firewall on both Linux and Windows computers, and open up port 631. You may also have to do this step on your wireless router. Be sure to open up only to internal network, and not externally to the world.
- Now, go to your Windows computer, and try accessing the CUPS printer. You can first try using the browser as in step 3, and then add it as a network printer using the Control Panel, Add Network Printer option. In my case, the network printer URL is something like http://192.168.1.5:631/printers/stylusphotor260. It is hard coded to the IP address, but it will work as long as the wireless router keeps the linux machine assigned to that IP.