Sharing Printers via CUPS: Difference between revisions

From Info Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 18: Line 18:
=== Linux & OSX ===
=== Linux & OSX ===
Both use CUPS and can be configured as below.
Both use CUPS and can be configured as below.
=== Prerequisites ===


==== Definitions ====
==== Definitions ====
Those acquainted with client/server model can skip to sub-item "CUPS Versioning Issues"

*"client computer" means the computer/device from which the print job will be generated
*"client computer" means the computer/device from which the print job will be generated
*it must have CUPS client installed, which is the default condition for Max OSX and Linux
*it must have CUPS client installed, which is the default condition for Max OSX and Linux
Line 35: Line 34:
**the relevant printer must appear in its "Printers" list, and be working
**the relevant printer must appear in its "Printers" list, and be working
**the computet must be posered on, to enable printing, although logon won't usually be required .
**the computet must be posered on, to enable printing, although logon won't usually be required .
=== Prerequisites ===

This guide assumes that CUPS is installed and generally functioning on both computers. The screen shots are from CUPS version 1.4.x/1.5.x. Versions 1.6 et seq have similar menus, but fewer options, with some changes having to be effected via computer's Control Panel instead.
=== CUPS Versioning Issues ===
=== CUPS Versioning Issues ===



Revision as of 04:01, 27 January 2016

Overview

An overview of the techniques that are feasible for Windows and guides to implmenting those is available from:


Overview

CUPS is not applicable to Windows. Windows users see Printing via Network

CUPS now the default print sub-system in most Operating Systems - Android, ChromeOS, MacOS, Linux and BSD.

Its use can enable printing over a LAN to be achieved relatively simply, often requiring:

  • no additional installation of software or "drivers"
  • only simple configuration changes

Applicability

Android & iOS

Typically these require an App to be downloaded from the relevant Store and connect with WiFi enabled printers.

Linux & OSX

Both use CUPS and can be configured as below.

Definitions

Those acquainted with client/server model can skip to sub-item "CUPS Versioning Issues"

  • "client computer" means the computer/device from which the print job will be generated
  • it must have CUPS client installed, which is the default condition for Max OSX and Linux
  • it need not have any printer drivers installed
    • indeed, it is less confusing if it does not
  • "server computer" means the computer controlling the printer. It can be:
  • for network printers, which are connected directly to a network, any computer on the network, having the relevant CUPS print drivers installed
    • network may be wired, WiFi or bluetooth
    • it is perfectly acceptable to configure several computers to use a particular network printer
  • for USB/parallel attached printers, the computer to which the printer is attached
    • it must have CUPS server installed, which is the default condition for Max OSX and Linux
    • the relevant printer must appear in its "Printers" list, and be working
    • the computet must be posered on, to enable printing, although logon won't usually be required .

Prerequisites

This guide assumes that CUPS is installed and generally functioning on both computers. The screen shots are from CUPS version 1.4.x/1.5.x. Versions 1.6 et seq have similar menus, but fewer options, with some changes having to be effected via computer's Control Panel instead.

CUPS Versioning Issues

Devices sold by Apple Inc can deploy proprietary extensions to CUPS. Consequently, some features may not work as expected, if the print job is sent to a printer that is controlled by another version of CUPS

As a general rule, the print server should have a version not earlier than the client Version 1.5 of CUPS is likely to produce a print job as a PDF file, whereas version 1.3 & 1.4 servers accept only PostScript files

  • check in the Home tab of CUPS for version number

Cups printers listing.png


Configuration

CUPS is configured via a web browser. Its URL on the local computer is:

http://localhost:631

Windows might not implement the short-cut "localhost". If not, then substitute the real IP address of the PC. Execute "IPCONFIG" from a Windows command line to find this address.

From the server computer, in the CUPS "administration" tab, ensure that "Share printers connected to this system" is checked:


Cups admin home.png


then click "Change Settings" button to save any changes, if necessary

Then click on the "Manage Printers" button in the same tab, select the relevant printer and pull down the "Administration" menu

  1. select "modify printer" then click the "continue" button to proceed to its second screen


Cups printer network.png


Cups printer configuration2.png


  1. ensure that "share this printer" is checked
  2. it will be helpful to make the "Location" the name of the computer controlling this printer
  3. click "continue" until the process completes

From the client computer, in the CUPS "administration" tab, ensure that "Show printers shared by other systems" is checked


Cups admin home.png


then click "Change Settings" button to save any changes, if necessary

Quicktest

Both computers must be connecting to the local LAN via wired or wireless interface. A quick test is to start a web browser and check that the Internet is accessible. Provided that network access is working:

  1. Start a text editor (kate, leafpad etc)
    • if the application is already running then it may need to be shutdown and restarted to recognize newly available printers
  2. Open a new document and type a few words
  3. From the file menu, select "Print"
  4. Select the relevant printer from the drop-down dialog
    • which should list all shared printers on the LAN
  5. click on the properties/settings button
  6. ensure that the key settings are suitable eg A4 paper size, portrait orientation
  7. click OK/print

Preliminary Troubleshooting

1. No printers listed in the print dialog

This problem frequently is the result of a firewall running on one or both computers. Network printing can work only if either:

  • firewalls on each computer allow port 631 through or
  • Ethernet zones are set as "trusted/internal" in the firewalls on each computer

Only printers powered up will appear in the list

  • confirm that the relevant printer is powered on
  • if it is attached to another PC via parallel or USB cable then that PC must also be powered on
    • (it is not necessary to log in to the sharing PC)

2. Print Job accepted but no output on Printer

This can be a result of many possible causes. Some simple checks:

  1. is CUPS known to be installed and working on the computer from which the text was created ?.
  2. Can it print to some printer at its home base ?
  3. does a similar print job created on the server computer give output on the printer ?

3. Print Job rejected by Server

  • possible permissions issue - check that:
    • printer is set as "share this printer" on the server
      • follow "modify this printer" dialog
  • possibly incompatible CUPS verions
    • as a general rule, the print server should have a version not earlier than the client
    • version 1.5 clients produce jobs as PDF files, that are likely to be rejected by 1.3/1.4 servers, which expect PostScript files
    • preferably upgrade the complete CUPS system on the server to version 1.5
      • a new version of the driver for each printer is required at the server end, to support PDF print jobs
      • if a binary driver, from the manufacturer, was previously used, check whether a driver is now included in CUPS or, failing that, whether an updated driver can be obtained from the manufacturer
    • following the upgrade, follow the "modify this printer" dialog for each printer and select the most recent PPD file.

If all else fails, then the CUPS Administration page has a button "View Error Log". Text towards the end of that file may give some clues.

Getting Techhnical

The above changes can also be implemented via a combination of editing config files and commands via CLI.

At the server end:

  1. ensure that /etc/cups/cups-browsed.conf includes the statements
  • BrowseRemoteProtocols DNSSD,CUPS
  • BrowseProtocols DNSSD CUPS
  • BrowseAllow 192.168.1.0/24 (or network address your LAN, if not this)
  1. Log to a terminal as root and execute:

# systemctl cups-browsed.service enable

# systemctl cups-browsed.service start

At the client end:

  1. ensure that /etc/cups/cups-browsed.conf includes the statements
  • BrowseRemoteProtocols DNSSD,CUPS2
  • BrowseProtocols DNSSD CUPS
  • BrowseAllow 192.168.1.0/24 (or network address your LAN, if not this)
  1. Log to a terminal as root and execute:

# systemctl cups-browsed.service enable

# systemctl cups-browsed.service start

---[[-Rod --Rpeters (talk) 14:46, 27 January 2016 (AEDT) --