Tuesday, September 7, 2010

Ubuntu - Sharing a Printer with CUPS

To share the printer with CUPS, you will need to configure both the printer server and the client.

On the print server:

1. Edit /etc/cups/cupsd.conf and change the line that reads Listen localhost:631 to Port 631. This tells CUPS to allow printing from any remote system, and not just localhost.

2. (Optional) Edit /etc/cups/cupsd.conf and change Browsing off to Browsing on. This allows the server to announce the printer’s availability to other hosts on the network.

3. Restart the CUPS subsystem on the print server:
sudo /etc/init.d/cupsys restart # Hardy Heron (8.04 LTS) and older sudo /etc/init.d/cups restart # Jaunty Jackalope and newer

The default is an announcement every 30 seconds. You can change this by specifying a BrowseInterval. For example, BrowseInterval 15 will announce every 15 seconds, and a value of 300 will announce every five minutes.

On the print client:

1. Go to System -> Administration -> Printing to open the printer applet.

2. Add a New Printer.

3. Select a Network Printer and the CUPS Printer (IPP) protocol.

4. Enter the printer hostname and printer name as a URL. For example, if the server is named printer.home.com and the printer is called Okidata, then you would use ipp://printer.home.com/printers/Okidata.

5. Click the Forward button and select the printer model.

6. Create a description for the printer

7. Click on the Apply button to create the printer.

If you enabled browsing in Step 2 of the server configuration, then Ubuntu clients will try to automatically discover and configure the remote printer.

CUPS provides many configuration options, but it has a long history of being a security risk. The CUPS installation includes a web-based administration interface. By default, it is not accessible remotely. (But if you followed the steps under Sharing With CUPS, then it is remotely accessible.) The URL for this interface is http://localhost:631/.

Although you can use the CUPS web interface to view and manage the print queue, the default administration interface does not permit adding new printers or changing configurations. This functionality is disabled in Ubuntu, primarily because of security risks. Enabling this interface is not recommended. Instead, if you need to modify printer configurations, use the System -> Preferences -> Printing application.

Source of Information : Wiley Ubuntu Powerful Hacks And Customizations

No comments: