Home > Enterprise Linux Tips > Migration & Integration > Printer sharing between Windows and Linux
Enterprise Linux Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

MIGRATION & INTEGRATION

Printer sharing between Windows and Linux


Serdar Yegulalp
04.16.2007
Rating: -3.50- (out of 5)


Enterprise IT tips and expert advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


The less you need to rely on any proprietary protocol to get work done, the better off you are overall. Some of those protocols have been real stumbling blocks -- such as SMB, Microsoft's proprietary protocol for file and printer sharing. Linux implementations of SMB exist, but you're probably better off without it in the long run whenever you can manage it.

More on file/print sharing:
Using Samba for file/print sharing needs

RHEL4 and Windows integration using Samba-3 

I recently set up a Linux workstation that shared out a Hewlett-Packard printer to the rest of my network -- a network that otherwise consisted entirely of Windows machines. I didn't like the idea of setting up SMB support on the Linux box, and instead, explored the possibility of having the Windows machines connect directly to the shared printer as a network printing device.

To my surprise, this turned out to be pretty easy. Here are the steps to connect your Windows machines to the shared printer:

  1. Set up the printer on your Linux machine and share it using CUPS via port 631. The exact method for doing this varies between distributions, so check with your distro's documentation. The end result should be a working printer, and a running CUPS service which you can access through your Web browser at http://localhost:631 from the Linux system.

  2. Using the CUPS Web interface, go to the Printers tab and make a note of the printer name, which is typically the Description: line). You can do this from the Windows machine where you plan to set up printer support.

  3. In Windows, go to Control Panel | Printers and click onAdd a printer.

  4. When prompted for a printer location, select Network printer, in the Add Printer Wizard.

  5. When prompted for the network location, select URL and use the following URL format: http://<hostname>:631/printers/<printername>.

    For instance, if the Linux host has a DNS name of linuxbox and the printer is named LaserJet-5, you'd use http://linuxbox:631/printers/LaserJet-5 as the URL.

  6. When asked for a printer driver, select Generic as the manufacturer and MS Publisher Imagesetter as the driver. In truth, any generic PostScript driver will do, but this works as well as any.

  7. When finished with the wizard, print a test page to make sure everything is set up correctly.

In Windows Vista, the steps are almost exactly the same, but the nomenclature for some of the steps is a little different. In the first step of the wizard, Vista will attempt to search for a printer (via SMB, which it won't find). Click Stop to halt the search and then click The printer that I want wasn't listed to add a printer manually.

In the next step of the wizard, use Select a shared printer by name when you want to supply the printer's URL. The rest should unfold exactly as before. Adding a printer by TCP/IP address or hostname will not work. Finally, if you're using a firewall product, make sure that port 631 is not being blocked. The Microsoft firewall on the Windows machine will usually know automatically what to do, but some third-party products may not.

If you're managing a workgroup and using system images to deploy your desktops, you can use the Windows con2prt utility, or a freeware substitute like AdPrintX, as a way to automate adding references to a CUPS-managed printer. If you're dealing with multiple CUPS-driven printing systems on the Linux side, you may want to drop the cash for the CUPS Companion CD and its accompanying book. The CUPS Companion CD is now offered in lieu of the commercial UNIX printing product ESP Print Pro, which is being discontinued by the manufacturer.

Have a question or comment about the tip? Email us. And don't forget to visit our new blog, the Enterprise Linux Log.

Rate this Tip
To rate tips, you must be a member of SearchEnterpriseLinux.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
Enlightenment (E)  (SearchEnterpriseLinux.com)
GNU GRUB  (SearchEnterpriseLinux.com)
GRUB (GRand Unified Bootloader)  (SearchEnterpriseLinux.com)
Linux Standard Base  (SearchEnterpriseLinux.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Enterprise Linux Web Server & Application Server
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2003 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts