任何使用网络中的多台计算机和一台打印机的人都知道能够共享资源的重要性。在之前的教程中,我们解释了如何(How)从Ubuntu访问 Windows 7(Access Windows 7) 共享(Shared)文件夹。然而(How),分享并不止于此。本教程将展示如何从与另一台 Windows 计算机共享的(Windows computer)Ubuntu打印机进行访问。
注意:(NOTE:)文章已更新以适用于Ubuntu v10.10和 11.04。
第 1 步(Step 1):在同一工作组(Same Workgroup)中配置计算机(Computers)
为了让Ubuntu 和 Windows(Ubuntu and Windows) 7 共享打印机,必须将它们配置为在同一个Workgroup中。
要更改您的Windows 7工作组,请参阅:如何更改Windows 7中的工作组(Workgroup)。
要更改您的Ubuntu 工作组(Ubuntu workgroup),请参阅:如何在Ubuntu Linux中启用(Ubuntu Linux)文件共享和更改(File Sharing & Change)工作组(Workgroup)。
一旦工作组(Workgroup)在两台计算机上设置为相同,请继续执行步骤 2 以共享您的打印机。
第 2 步:从(Step 2)Windows 7共享打印机
接下来,您需要将打印机配置为在网络上共享。为此,请参阅:如何在您的网络上共享(Your Network)打印机(Printer)。
第 3 步(Step 3):配置Ubuntu以访问打印机
从您的主面板,转到'System -> Administration -> Printing'以打开打印机配置管理器(printer configuration manager)。

在此窗口中,您可以看到安装在您的计算机上的所有打印机以及网络上的其他计算机。

右键单击(Right-click)要访问的网络打印机,然后从(network printer)菜单中选择(menu select) Properties。

在Printer Properties窗口中,如果打印机的Make and Model列为Local Raw Printer,您需要为该打印机安装驱动程序。单击(Click)相应的更改(Change)按钮以访问更改驱动程序(Change Driver)窗口。
注意:(Note:)如果打印机的品牌和型号(Make and Model)正确,您可以跳过接下来的步骤,因为打印机将在Ubuntu上工作。

在“更改驱动程序”(Change Driver) 窗口中,搜索(window search)您要访问的打印机的制造商并选择它。在我们的示例中,它是 HP。然后点击转发(Forward)。

现在搜索并选择正确的打印机型号。我们的是Photosmart (Photosmart C5200)C5200(Ours)。如果您必须在多个驱动程序之间进行选择,请选择名称中带有“cups”的驱动程序(这些驱动程序应该在Linux上工作得更好,CUPS表示通用 Unix 打印系统(Common Unix Printing System))。单击前进(Forward)以继续。

在下一个窗口中,系统会询问您是否要传输当前设置。由于打印机尚未安装,因此没有要传输的设置,因此,选择按原样使用新的 PPD(Postscript 打印机描述)(Use the new PPD (Postscript Printer Description) as is)并单击转发(Forward)。

最后一步是选择要安装的附加选项。这些选项取决于打印机型号(printer model),在我们的示例中,我们只能安装双面打印器(Duplexer),该功能允许在纸张的两面打印。选择要安装的选项,然后单击Apply。

现在,在打印机属性(Printer Properties)窗口中,品牌和型号(Make and Model)字段显示正确识别的打印机。最后,要测试打印机,请单击打印测试页(Print Test Page)按钮。

您被告知测试页(test page)已提交。如果一切正常,单击(Click)确定(OK),然后关闭打印机属性窗口。(Printer Properties)

结论
如您所见,使用Ubuntu访问网络上的共享打印机相当容易。如果您对Ubuntu 和 Windows 7 之间的(Ubuntu and Windows)打印机共享(printer sharing)或共享打印机的高级使用有任何提示,请随时发表评论。您可能还想查看下面的文章,这些文章可以进一步解释Windows 和 Ubuntu(Windows and Ubuntu)在网络上的操作能力。
How to Access A Windows Shared Printer from Ubuntu
Anyone who utilizes multiple cоmputers in a network with a single printer knows the importance of being able tо share resources. In a previоus tutorial, we explained How to Access Windows 7 Shared Folders from Ubuntu. However, the sharing doesn't stop there. This tutorial will show how to access from Ubuntu printers that are shared from another Windows computer.
NOTE: Article updated to work on Ubuntu v10.10 & 11.04.
Step 1: Configure the Computers on the Same Workgroup
In order for Ubuntu and Windows 7 to share printers, they have to be configured to be in the same Workgroup.
To change your Windows 7 workgroup, see: How to Change the Workgroup in Windows 7.
To change your Ubuntu workgroup, see: How to Enable File Sharing & Change the Workgroup in Ubuntu Linux.
Once the Workgroup is set up to be the same on both computers, proceed to step 2 to share your printer.
Step 2: Share the Printer from Windows 7
Next, you'll need to configure the printer to be shared on the network. To do this, please see: How to Share a Printer on Your Network.
Step 3: Configure Ubuntu to Access the Printer
From your main panel, go to 'System -> Administration -> Printing' to open the printer configuration manager.

In this window you can see all the printers installed your computer and the other computers on your network.

Right-click on the network printer that you want to access and from the menu select Properties.

In the Printer Properties window, if the Make and Model of the printer is listed as Local Raw Printer, you need to install drivers for that printer. Click on the corresponding Change button to access the Change Driver window.
Note: If the Make and Model of the printer is correct, you can skip the next steps, because the printer will work from Ubuntu.

In the Change Driver window search the manufacturer of the printer you want to access and select it. In our example, it is HP. Then click on Forward.

Now search and select the correct model of the printer. Ours is a Photosmart C5200. If you have to choose between multiple drivers, select the one with 'cups' in its name (these drivers should work better on Linux, CUPS meaning Common Unix Printing System). Click Forward to proceed.

In the next window you are asked if you want to transfer the current settings. Because the printer is not yet installed there are no settings to transfer, therefore, select Use the new PPD (Postscript Printer Description) as is and click on Forward.

The final step is choosing which additional options to install. These options depend on the printer model, in our example we can only install the Duplexer, a feature that allows printing on both sides of a paper. Choose the options that you want to install and click on Apply.

Now, in the Printer Properties window, the Make and Model field shows the printer correctly identified. Finally, to test the printer, click the Print Test Page button.

You are informed that the test page was submitted. Click on OK and then close the Printer Properties window if all is good.

Conclusion
As you can see, accessing a shared printer on a network is reasonably easy to do with Ubuntu. If you have any tips for printer sharing or advanced usage of shared printers between Ubuntu and Windows 7, feel free to leave a comment. You may also want to review the articles below that can further explain the operation capabilities between Windows and Ubuntu on a network.