You specify a printer location using special URI protocols. For a locally attached USB printer, the USB URI is usb. For another CUPS printer on a remote host, the protocol used is ipp, for Internet Printing Protocol, whereas for a Windows printer, it would be smb. Older UNIX or Linux systems using LPRng would use the lpd protocol.
You can use system-config-printer to set up a remote printer on Linux, UNIX, or Windows networks. When you add a new printer or edit one, the New Printer dialog will list possible remote connection types under the Network entry. When you select a remote connection entry, a pane will be displayed to the right where you can enter configuration information.
For a remote Linux or UNIX printer, select either Internet Printing Protocol (ipp), which is used for newer systems, or LPD/LPR Host or Printer, which is used for older systems. Both panes display entries for the Host name and the queue. For the Host name, enter the hostname for the system that controls the printer. For an Apple or HP jet direct printer on your network, select the AppSocket/HP jetDirect entry.
A “Windows printer via Samba” printer is one located on a Windows network (see Figure 16-16). You need to specify the Windows server (host name or IP address), the name of the share, the name of the printer’s workgroup, and the username and password. The format of the printer SMB URL is shown on the SMP Printer pane. The share is the hostname and printer name in the smb URI format //workgroup/hostname /printername. The workgroup is the windows network workgroup that the printer belongs to. On small networks there is usually only one. The hostname is the computer where the printer is located. The username and password can be for the printer resource itself, or for access by a particular user. The pane will display a box at the top where you can enter the share host and printer name as a smb URI.
You can click the Browse button to open a SMB Browser window, where you can select the printer from a listing of Windows hosts on your network (see Figure 16-17). For example, if your Windows network is WORKGROUP, then the entry WORKGROUP will be shown, which you can then expand to list all the Windows hosts on that network (if your network is MSHOME, then that is what will be listed). If you are using a firewall, be sure to turn it off before browsing a Windows workgroup for a printer, unless already configured to allow Samba access.
When you make your selection, the corresponding URI will show up in the smb:// box (See Figure 16-18). You also can enter in any needed Samba authentication, if required, like user name or password. Check “Authentication required” to allow you to enter the Samba Username and Password.
You then continue with install screens for the printer model, driver, and name. Once installed, you can then access the printer properties just as you would any printer (see Figure 16- 19). To access an SMB shared remote printer, you need to install Samba and have the Server Message Block services enabled using the smbd and nmbd daemons. The Samba service will be enabled by default. You can use the service command to restart, stop, and start the services. Printer sharing must be enabled on the Windows network.
sudo service smbd restart
sudo service nmbd restart
On an older Windows system, like Windows XP, you can use the Add Printer Wizard to locate a shared printer on a Linux system. Locate the Ubuntu system, click on it, and the shared printers on the Ubuntu system will be listed.
On Windows 7, you first open Control Panels, then select Devices and Printers, click the “Add a printer” item at the top. In the Add Printer dialog click the “Add a network, wireless, or Bluetooth printer” link. Your connected network printers are detected and listed. Choose the one connected to your Ubuntu system. Provide a printer name you want to use for that printer on your system.
Note: If a password prompt prevents you from accessing a Windows printer on Windows 7, you may have to uninstall the “Windows Live Sign In Assistant” on your Windows 7 system.