All my machines in my network are already running Linux, Ubuntu 5.10 and OpenSUSE 10.0 are my distros of choice. Only one machine is running Windows XP because of custom Visual Basic Programs, and this Windows machine also serves as our Print Server. In this mini-How-To, I'll discuss how to share a Printer in Windows XP to Linux machines particularly Ubuntu 5.10 and OpenSUSE 10.0. We will use the graphical interface of Ubuntu (GNOME) and SUSE (KDE) to set up the printer.. no command lines.. promise.. =)
The Windows XP Machine (The Print Server)
- Install your printer.
- Open your Control Panel, then open your "Add or Remove Programs"
- Click on "Add/Remove Windows Components" located on the left side of the dialog box
- Put a check on "Other Netwrok File and Print Services" then click "Details" make sure that the "Print Services for Unix" is selected. (you may need your XP CD and a reboot)
- Open "Printer and Faxes" then right click on your printer then "Share", give your printer a share name that is short and with no special characters or spaces (ex. "HP940c" quotations not inclucded). This Share Name would later be used as the Print Queue on your Linux machine.
- The Windows Firewall may block Linux machines from printing, turn off your firewall for the meantime.. we will turn it back on later.
- Make sure that your Windows' IP number is Static.
- From the panel (default is on top) open System>Administration>Printing
- Click on "New Printer"
- Select "Network Printer" then use "Unix Printing LPD"
- Type on the "Host" Field the IP number of your Windows Print Server (ex. 192.168.0.101)
- Type on the "Queue" field the Share Name of the printer, in our example we used "HP940c" (quotations not included)
- Click "Forward" then select the manufacturer and model of your printer from the list. Then click "Apply".
- Your new printer will now appear in the dialog box. Print a test page to make sure that the paper settings and print out mode are in the right settings..
- That's all... =)
- Open the "YaST Control Center" (you need root access)
- Select "Hardware" from the choices on the left
- Under Hardware, click "Printer"
- Under Printer, click "Add", if it asks you for a new Queue, just click "No" (this will happen if you have an exisiting installed printer)
- Under Printer Type, select "Print Directly to a Netwrok Printer" then click next.
- on the next dialog, choose "Remote LPD Queue" then click next.
- Type on the "Hostname of Print Server" Field the IP number of your Windows Print Server (ex. 192.168.0.101)
- Type on the "Remote Queue Name" field the Share Name of the printer, in our example we used "HP940c" (quotations not included) then click next.
- For "Queue Name and Spooler Settings" put the "Queue Name" or Share Name of the printer that you used under "Name for Printing"... you may leave the other fields blank. Then click next.
- Now choose the proper Manufacturer and Model of your printer. click next.
- Accept all the changes, then you may try to print a test page..
- That's all... =)
Back to the Firewall
At this point, you should have already succesfully installed your printer and have printed a test page. Now, we will turn back on the Firewall of your Windows XP machine (this is a necessity because Windows has very poor security).
- Turn back on your personal firewall in your Windows XP.
- Now, print a test page from your Linux machine... the printing would fail because it was blocked by the firewall.. but that's ok.. will fix that..
- Locate your firewall log file by opening the Firewall Settings, then under Advance tab click on the Settings of Security Logging and there you will find the location and filename of your firewall log file..
- Open the firewall log file using Notepad and look for the Port number to which the printing was blocked.. this port number is between 500 to 700.
- After determining the port number, go back to the Firewall Settings and under the Exceptions tab, click "Add Port".
- Now, just enter the port number which was blobked previously by the firewall then select "TCP", give it a nice name like "Netwrok Printing".. and you're all set..
- Try again to print again a test page, you should have no more trouble printing..
Copyright (C) 2005 Gerald Cortez
Verbatim copying and distribution of this article is permitted in any medium, provided this copyright notice is preserved.