Howto: setup Windows printers

From andLinux

(Difference between revisions)
Jump to: navigation, search
m
Current revision (10:25, 23 May 2009) (edit) (undo)
m (typo)
 
(6 intermediate revisions not shown.)
Line 2: Line 2:
<h1>Abstract</h1>
<h1>Abstract</h1>
-
As mentionned in the FAQ, one can print from andLinux to local Windows printers through standard Microsoft printer sharing. This however requires the installation and configuration of Samba on the Linux side, and of File-and-printer sharing one the Windows side. This may not work smoothly for some people, for various reasons related to the complexity of the protocols.
+
There are two ways one can print from andLinux to local Windows printers: first, one can print through standard Microsoft printer sharing. This requires the installation and configuration of Samba on the Linux side, and of file and printer sharing on the Windows side. This may not work smoothly for some people, for various reasons related to the complexity of the protocols.
-
Alternatively, these is a more Unix-like way to print to a Windows printer. The relies on running the TCP/IP print server built into XP/Vista, and then using it as a remote lpd queue for andLinux printers.
+
<font color="red">Note: When printing via Samba, cups tries to popup a prompt for the Samba user and password required to access the Windows printer. For some strange reason, this appears not to work. Thus, the second way is the recommended way of printing, unless someone gets this to work again.</font> To those willing to investigate into this issue: cups finds out by itself whether a password is required. If so, it automatically adds <tt>AuthInfoRequired</tt> to <tt>/etc/cups/printers.conf</tt>.
-
Here are the steps neccesary to achieve this.
+
Second, there is a more Unix-like way to print to a Windows printer. It relies on running the TCP/IP print server built into XP / Vista, and then using it as a remote lpd queue for andLinux printers.
-
<h2>Setup TCP/IP Print Server in ''Windows XP''</h2>
+
<h1>Installing packages on the andLinux side</h1>
 +
This step can be skipped since andLinux Beta 2 (final).
 +
 
 +
In older releases, please ensure these packages are installed:
 +
<blockquote><pre>apt-get install cupsddk cupsddk-drivers cupsys cupsys-client cupsys-common cupsys-driver-gutenprint
 +
foomatic-db foomatic-db-engine foomatic-filters openprinting-ppds openprinting-ppds-extra</pre></blockquote>
 +
 
 +
<h1>Configuration using Microsoft printer sharing / Samba</h1>
 +
<h2>Configuration steps on the Windows side</h2>
 +
1. Enable file and printer sharing in the TAP-Colinux network adapter (usually this is already enabled)
 +
 
 +
2. Ensure that your firewall does not block traffic on the UDP ports 137 and 138 and the TCP ports 139 and 445 on the TAP-Colinux network adapter in either direction (incoming + outgoing)
 +
 
 +
3. Enable sharing for one or more of your Windows printers
 +
 
 +
<h2>Configuration steps on the andLinux side</h2>
 +
1. Visit the cups configuration webinterface in your favorite browser (on andLinux, not Windows!): [http://localhost:631/admin http://localhost:631/admin]
 +
 
 +
2. Select "Add printer", enter a name, etc.
 +
 
 +
3. As device please choose "Windows printer via Samba" and enter the URL <tt>smb://192.168.11.1/my_share</tt>, where <tt>my_share</tt> is exactly the name you chose as the printer's share name on Windows (previous section, step 3).
 +
 
 +
4. Complete the configuration by selecting the appriopriate drivers etc.
 +
 
 +
5. Print a test page. If nothing prints, verify your firewall settings. A common fix is also to substitute the host address with the local Windows IP address, which can be found with the ipconfig command in a Windows command terminal (run: cmd.exe then ipconfig)
 +
 
 +
<h1>Configuration using remote lpd queue</h1>
 +
<h2>Configuration steps on the Windows side</h2>
 +
 
 +
<h3>Setup TCP/IP Print Server in ''Windows XP''</h3>
1. Select Start:Control Panel and select "Add/Remove Programs"
1. Select Start:Control Panel and select "Add/Remove Programs"
Line 32: Line 61:
11. Exit the control panel
11. Exit the control panel
-
<h2>Setup TCP/IP Print Server in ''Windows Vista''</h2>
+
<h3>Setup TCP/IP Print Server in ''Windows Vista''</h3>
1. Select Start:Control Panel and select "Programs and features"
1. Select Start:Control Panel and select "Programs and features"
Line 44: Line 73:
5. Exit the control panel
5. Exit the control panel
-
<h2>Share your printer</h2>
+
<h3>Share your printer</h3>
1. Go to the Printers control panel
1. Go to the Printers control panel
Line 56: Line 85:
5. Exit the Printers panel
5. Exit the Printers panel
-
<h2>Setup the andLinux printer</h2>
+
<h3>Verify your firewall settings</h3>
-
 
+
Ensure that your firewall does not block traffic on the port 515 for both TCP and UDP on the TAP-Colinux network adapter in either direction (incoming + outgoing).
-
1. First make sure necessary printer packages are present: <blockquote> <pre>apt-get install cupsddk cupsddk-drivers cupsys cupsys-client cupsys-common cupsys-driver-gutenprint
+
-
foomatic-db foomatic-db-engine foomatic-filters openprinting-ppds openprinting-ppds-extra </pre></blockquote>
+
-
 
+
-
2. In the KDE control center (kcontrol), section "Peripherals", subsection "Printers", select CUPS as the "Print system currently used" and then add a printer.
+
-
3. In the add-printer-wizard, choose "Remote lpd queue"
+
<h2>Configuration steps on the andLinux side</h2>
 +
1. Visit the cups configuration webinterface in your favorite browser (on andLinux, not Windows!): [http://localhost:631/admin http://localhost:631/admin]
-
4. For the host, enter the Windows host IP address, typically 192.168.11.1
+
2. Select "Add printer", enter a name, etc.
-
5. For the queue, enter the shared printer name from the previous section.
+
3. As device please choose "LPD / LPR host or printer" and enter the URL <tt>lpd://192.168.11.1/my_share</tt>, where <tt>my_share</tt> is exactly the name you chose as the printer's share name on Windows (section "Share your printer", step 4).
-
6. Choose the manufacturer and model and configure as needed
+
4. Complete the configuration by selecting the appriopriate drivers etc.
-
7. Print a test page. If nothing prints, verify firewall settings. A common fix is also to substitute the host address with the local Windows IP address, which can be found with the ipconfig conmmand in a Windows command terminal (run: cmd.exe then ipconfig)
+
5. Print a test page. If nothing prints, verify your firewall settings. A common fix is also to substitute the host address with the local Windows IP address, which can be found with the ipconfig command in a Windows command terminal (run: cmd.exe then ipconfig)

Current revision

Accessing Windows printers using the TCP/IP printer service

Contents

Abstract

There are two ways one can print from andLinux to local Windows printers: first, one can print through standard Microsoft printer sharing. This requires the installation and configuration of Samba on the Linux side, and of file and printer sharing on the Windows side. This may not work smoothly for some people, for various reasons related to the complexity of the protocols.

Note: When printing via Samba, cups tries to popup a prompt for the Samba user and password required to access the Windows printer. For some strange reason, this appears not to work. Thus, the second way is the recommended way of printing, unless someone gets this to work again. To those willing to investigate into this issue: cups finds out by itself whether a password is required. If so, it automatically adds AuthInfoRequired to /etc/cups/printers.conf.

Second, there is a more Unix-like way to print to a Windows printer. It relies on running the TCP/IP print server built into XP / Vista, and then using it as a remote lpd queue for andLinux printers.

Installing packages on the andLinux side

This step can be skipped since andLinux Beta 2 (final).

In older releases, please ensure these packages are installed:

apt-get install cupsddk cupsddk-drivers cupsys cupsys-client cupsys-common cupsys-driver-gutenprint
foomatic-db foomatic-db-engine foomatic-filters openprinting-ppds openprinting-ppds-extra

Configuration using Microsoft printer sharing / Samba

Configuration steps on the Windows side

1. Enable file and printer sharing in the TAP-Colinux network adapter (usually this is already enabled)

2. Ensure that your firewall does not block traffic on the UDP ports 137 and 138 and the TCP ports 139 and 445 on the TAP-Colinux network adapter in either direction (incoming + outgoing)

3. Enable sharing for one or more of your Windows printers

Configuration steps on the andLinux side

1. Visit the cups configuration webinterface in your favorite browser (on andLinux, not Windows!): http://localhost:631/admin

2. Select "Add printer", enter a name, etc.

3. As device please choose "Windows printer via Samba" and enter the URL smb://192.168.11.1/my_share, where my_share is exactly the name you chose as the printer's share name on Windows (previous section, step 3).

4. Complete the configuration by selecting the appriopriate drivers etc.

5. Print a test page. If nothing prints, verify your firewall settings. A common fix is also to substitute the host address with the local Windows IP address, which can be found with the ipconfig command in a Windows command terminal (run: cmd.exe then ipconfig)

Configuration using remote lpd queue

Configuration steps on the Windows side

Setup TCP/IP Print Server in Windows XP

1. Select Start:Control Panel and select "Add/Remove Programs"

2. Select "Add/Remove Windows Components" in the left panel

3. In the list of components, scroll down and check the box for "Other Network and File Print Services"

4. Check "Print Services for Unix"

5. Click Finish to exit

6. Exit the "Add/Remove Programs" control panel

7. Select Start:Control Panel:Administrative Tools

8. Double-click "Services"

9. Find "TCP/IP Print Server" in the list and double-click it; its property sheet will appear

10. Change "Startup Type" to "Automatic" and click the "Apply" button

11. Exit the control panel

Setup TCP/IP Print Server in Windows Vista

1. Select Start:Control Panel and select "Programs and features"

2. Select "Turn Windows features On or Off" in the left panel

3. In the list of features, check the box for "LPD print service" under "Print Services"

4. Press OK to apply the change

5. Exit the control panel

Share your printer

1. Go to the Printers control panel

2. Right-click on the printer to be shared and select "Sharing"

3. If sharing is not enabled, activate it (don't use the wizard).

4. Share the printer and give it a name

5. Exit the Printers panel

Verify your firewall settings

Ensure that your firewall does not block traffic on the port 515 for both TCP and UDP on the TAP-Colinux network adapter in either direction (incoming + outgoing).

Configuration steps on the andLinux side

1. Visit the cups configuration webinterface in your favorite browser (on andLinux, not Windows!): http://localhost:631/admin

2. Select "Add printer", enter a name, etc.

3. As device please choose "LPD / LPR host or printer" and enter the URL lpd://192.168.11.1/my_share, where my_share is exactly the name you chose as the printer's share name on Windows (section "Share your printer", step 4).

4. Complete the configuration by selecting the appriopriate drivers etc.

5. Print a test page. If nothing prints, verify your firewall settings. A common fix is also to substitute the host address with the local Windows IP address, which can be found with the ipconfig command in a Windows command terminal (run: cmd.exe then ipconfig)

Seen a page that contains spam or objectionable material? Please report the link and/or login of the author to david @ andLinux . org (remove spaces)