Sharing Printers via CUPS: Difference between revisions
(redirected Windows users to different page) |
|||
(13 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Overview == |
== 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. |
|||
CUPS is a newer printing sub-system, that has inbuilt support for network printing. Its use can enable printing over a LAN to be achieved relatively simply, often requiring: |
|||
Its use can enable printing over a LAN to be achieved relatively simply, often requiring: |
|||
*no additional installation of software or "drivers" |
*no additional installation of software or "drivers" |
||
*only simple configuration changes |
*only simple configuration changes |
||
== Applicability == |
|||
One feature of CUPS which can frequently be useful is its ability to print to a network/shared printer when the computer from which the print job is created has no relevant printer drivers installed. Three examples: |
|||
=== Android & iOS === |
|||
Typically these require an App, specific to the printer, to be downloaded from the relevant Store and connect with WiFi enabled printers. |
|||
*a laptop/netbook/tablet computer being used away from its home location |
|||
*an OS for which a suitable printer driver can't be obtained eg Windows 7, 64 bit Windows |
|||
*a computer where the administrator password (which may be required to install drivers) is unknown. |
|||
CUPS is now the default print sub-system in most Operating Systems - Android, ChromeOS, MacOS, Linux and BSD. |
|||
Consequently, it is widely deployed on many devices, such as Smartphones, Tablets, Media Centres & Macintoshes, as well as emerging "pocket computers" and might/could be on other Net/Notebooks, Laptops amd Desktop computers. |
|||
=== Limitations with Windows OS === |
|||
Windows does not have CUPS |
|||
*simplest alternative for network printing is described at [[Printing via Network]] |
|||
*although other work-arounds are available, these are the province of intermediate/advanced users and probably only worth pursuing in the following mid/long term scenarios: |
|||
**routine printing from a Windows version for which a particular printer "driver" is not available |
|||
**minimising maintenance of a mixed OS LAN |
|||
An overview of the techniques that are feasible for Windows and guides to implmenting those is available from: |
|||
http://en.opensuse.org/SDB:Printing_from_Windows_to_Linux |
|||
A lower tech solution for small LAN, having Windows as well as other OS, is long "USB" cables |
|||
*the limit of length to 5 metres for USB cables can be overcome by using a pair of USB-Ethernet/RJ45 converters, which enable a USB printer to be accessed from up to 100 metres over Cat 5 cabling. |
|||
**sets of these converters are available from specialisist computer hardware suppliers |
|||
**might variously be described as "printer extenders" "USB extenders" etc |
|||
*although this is '''not''' network printing, it can suffice. |
|||
==== Windows 7 ==== |
|||
This section requires input from an experienced Windows 7 user |
|||
*CUPS, per se, is not apparently available |
|||
**the underlying protocol IPP is available, (but not necessarily installled) for editions other than "Starter" |
|||
**it prints via the Internet, which may not meet a user's security requirements |
|||
==== Windows XP ==== |
|||
*requires 3rd party software, which wont be installed by default |
|||
*installing CUPS on Windows XP is complicated |
|||
*when installed, it can work only with Postscript capable printers (this excludes most ink-jets and many low cost laser printers) |
|||
**this limitation may also apply to Windows 7 |
|||
=== Mac OS === |
|||
Apple's implementation of CUPS includes some proprietary extensions. That is unlikely to effect Mac to Mac printing but may introduce limitations in printing between Mac OS and other Unix like OS. |
|||
== Situation == |
|||
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.3.x provide the functionality required but have different menus. |
|||
=== Prerequisites === |
|||
==== Definitions ==== |
|||
=== Linux & OSX === |
|||
Both use CUPS and can be configured as below. |
|||
== For General Users == |
|||
=== Definitions === |
|||
Those acquainted with client/server model can skip to sub-item "CUPS Inter-Version 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 73: | Line 28: | ||
*for USB/parallel attached printers, the computer to which the printer is attached |
*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 |
**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, |
**the relevant printer must appear in its "Printers" list, anAs a general rule, the print server should have a version not earlier than the clientd 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 Inter-Version Issues === |
|||
Firstly it is essential to ascertain which release of CUPS is in use, because versions 1.6 and later are largely incompatible with earlier releases. If uncertain, then on '''each''' machine involved in the network printing browse to: |
|||
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 |
|||
https://localhost:631/admin |
|||
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 |
|||
[[Image:Cups_printers_listing.png]] |
[[Image:Cups_printers_listing.png]] |
||
the release number should be displayed in the title bar |
|||
*CUPS <= 1.5.4 uses substantially different process from 1.6 and later |
|||
**printing between machines mixing these versions is complicated. see below for guidelines, if unavoidable |
|||
**as CUPS <= 1.5.4 is now used mainly in older OS, there is a case for upgrading the OS on such machines to a current release. |
|||
***it is not feasible for General Users to upgrade the version of CUPS '''without''' upgrading the whole OS |
|||
*CUPS 1.6 and later offer better long term solution |
|||
**currently no interoperability issues between various releases |
|||
*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 |
|||
=== CUPS mixed networks <= 1.5.4 plus 1.6 et seq === |
|||
=== Configuration === |
|||
Network printing in this environment is complex. For a guide to procedures see: |
|||
http://doc.opensuse.org/release-notes/x86_64/openSUSE/Leap/42.1/ |
|||
=== CUPS 1.6 and later === |
|||
CUPS is configured via a web browser. Its URL on the local computer is: |
|||
Later releases of CUPS impose greater network security. Default settings vary with system. Several settings might need to be changed to print via network - in summary: |
|||
*amend firewall settings, on both ends, if necessary |
|||
**firewall on router should '''not''' be altered |
|||
*activate cups-browsed service via system services (systemd) on both ends |
|||
**in many installations this suffices to get printing working via network, because the following two items are already activated |
|||
*set CUPS on server to share printers |
|||
*set CUPS on client to use printers shared by others |
|||
==== In Detail ==== |
|||
From the server computer, use "Control Panel" to set the following, if available (exact menus and terminology will vary): |
|||
*firewall on server must have port 631 open |
|||
*modify "system services" (exact terminology will vary) |
|||
**enable '''and''' activate "cups-browsed" |
|||
From the server computer, use any browser to https://localhost:631/admin |
|||
and activate radio buttons to: |
|||
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. |
|||
*Share printers connected to this system |
|||
**using protocols DNSSD & CUPS |
|||
*restrict sharing to "Local Network" |
|||
**could also be set as IP address eg 192.168.0.0/24 |
|||
*Allow remote administration |
|||
It is inadvisable to enable |
|||
From the server computer, in the CUPS "administration" tab, ensure that "Share printers connected to this system" is checked: |
|||
*Allow printing from the Internet*print via network |
|||
Line 112: | Line 91: | ||
[[Image:Cups_printer_configuration2.png]] |
[[Image:Cups_printer_configuration2.png]] |
||
22 |
|||
#ensure that "share this printer" is checked |
#ensure that "share this printer" is checked |
||
#it will be helpful to make the "Location" the name of the computer controlling this printer |
#it will be helpful to make the "Location" the name of the computer controlling this printer |
||
#click "continue" until the process completes |
#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 |
|||
From the client computer, in the CUPS "administration" tab, ensure that "Show printers shared by other systems" 2is checked |
|||
Line 126: | Line 106: | ||
then click "Change Settings" button to save any changes, if necessary |
then click "Change Settings" button to save any changes, if necessary |
||
=== Quicktest === |
==== 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: |
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: |
||
Line 140: | Line 120: | ||
#click OK/print |
#click OK/print |
||
=== Preliminary Troubleshooting === |
==== Preliminary Troubleshooting ==== |
||
''1. No printers listed in the print dialog'' |
''1. No printers listed in the print dialog'' |
||
Line 164: | Line 144: | ||
''3. Print Job rejected by Server'' |
''3. Print Job rejected by Server'' |
||
*possible permissions issue - check |
*possible permissions issue - check thehat: |
||
**printer is set as "share this printer" on the server |
**printer is set as "share this printer" on the server |
||
***follow "modify this printer" dialog |
***follow "modify this printer" dialog |
||
*possibly incompatible CUPS verions |
*possibly incompatible CUPS verions |
||
**most suitable arrangement is for all machines using CUPS #< 1.6 |
|||
**as a general rule, the print server should have a version not earlier than the client |
|||
***achievable only by upgrading the complete OS |
|||
**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 |
***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 |
***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. |
***following the upgrade, follow the "modify this printer" dialog for '''each''' printer and select the most recent PPD file. |
||
**on older installations, it might be necessary to keep all machines at CUPS version #< 1.5.4 |
|||
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. |
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. |
||
=== CUPS <= 1.5.4 === |
|||
---[[-[[User:Rpeters|Rpeters]] 18:02, 18 August 2012 (EST)]] |
|||
With this version, a (different) CUPS browsing module is usually enabled by default. Simpler configuration changes usually suffice. |
|||
At the server end, browse to |
|||
https://localhost:631/admin |
|||
and activate radio buttons to: |
|||
*Share printers connected to this system |
|||
At the workstation/client end, browse to |
|||
https://localhost:631/admin |
|||
and activate radio buttons to: |
|||
*Use printers shared by others |
|||
The above troubleshooting tips apply |
|||
== Getting Techhnical == |
|||
The above changes can also be implemented via a combination of editing config files and commands via CLI. |
|||
At the server end: |
|||
#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) |
|||
#Log to a terminal as root and execute: |
|||
<nowiki># systemctl cups-browsed.service enable</nowiki> |
|||
<nowiki># systemctl cups-browsed.service start</nowiki> |
|||
At the client end: |
|||
#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) |
|||
#Log to a terminal as root and execute: |
|||
<nowiki># systemctl cups-browsed.service enable</nowiki> |
|||
<nowiki># systemctl cups-browsed.service start</nowiki> |
|||
---[[-[[User:Rpeters|Rod]] --[[User:Rpeters|Rpeters]] ([[User talk:Rpeters|talk]]) 14:46, 27 January 2016 (AEDT) |
|||
--[[Category:Technical Info]] |
--[[Category:Technical Info]] |
Latest revision as of 04:28, 27 January 2016
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, specific to the printer, to be downloaded from the relevant Store and connect with WiFi enabled printers.
Linux & OSX
Both use CUPS and can be configured as below.
For General Users
Definitions
Those acquainted with client/server model can skip to sub-item "CUPS Inter-Version 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, anAs a general rule, the print server should have a version not earlier than the clientd 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 Inter-Version Issues
Firstly it is essential to ascertain which release of CUPS is in use, because versions 1.6 and later are largely incompatible with earlier releases. If uncertain, then on each machine involved in the network printing browse to: https://localhost:631/admin
the release number should be displayed in the title bar
- CUPS <= 1.5.4 uses substantially different process from 1.6 and later
- printing between machines mixing these versions is complicated. see below for guidelines, if unavoidable
- as CUPS <= 1.5.4 is now used mainly in older OS, there is a case for upgrading the OS on such machines to a current release.
- it is not feasible for General Users to upgrade the version of CUPS without upgrading the whole OS
- CUPS 1.6 and later offer better long term solution
- currently no interoperability issues between various releases
- 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
CUPS mixed networks <= 1.5.4 plus 1.6 et seq
Network printing in this environment is complex. For a guide to procedures see: http://doc.opensuse.org/release-notes/x86_64/openSUSE/Leap/42.1/
CUPS 1.6 and later
Later releases of CUPS impose greater network security. Default settings vary with system. Several settings might need to be changed to print via network - in summary:
- amend firewall settings, on both ends, if necessary
- firewall on router should not be altered
- activate cups-browsed service via system services (systemd) on both ends
- in many installations this suffices to get printing working via network, because the following two items are already activated
- set CUPS on server to share printers
- set CUPS on client to use printers shared by others
In Detail
From the server computer, use "Control Panel" to set the following, if available (exact menus and terminology will vary):
- firewall on server must have port 631 open
- modify "system services" (exact terminology will vary)
- enable and activate "cups-browsed"
From the server computer, use any browser to https://localhost:631/admin
and activate radio buttons to:
- Share printers connected to this system
- using protocols DNSSD & CUPS
- restrict sharing to "Local Network"
- could also be set as IP address eg 192.168.0.0/24
- Allow remote administration
It is inadvisable to enable
- Allow printing from the Internet*print via network
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
- select "modify printer" then click the "continue" button to proceed to its second screen
- ensure that "share this printer" is checked
- it will be helpful to make the "Location" the name of the computer controlling this printer
- click "continue" until the process completes
From the client computer, in the CUPS "administration" tab, ensure that "Show printers shared by other systems" 2is checked
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:
- 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
- Open a new document and type a few words
- From the file menu, select "Print"
- Select the relevant printer from the drop-down dialog
- which should list all shared printers on the LAN
- click on the properties/settings button
- ensure that the key settings are suitable eg A4 paper size, portrait orientation
- 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:
- is CUPS known to be installed and working on the computer from which the text was created ?.
- Can it print to some printer at its home base ?
- 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 thehat:
- printer is set as "share this printer" on the server
- follow "modify this printer" dialog
- printer is set as "share this printer" on the server
- possibly incompatible CUPS verions
- most suitable arrangement is for all machines using CUPS #< 1.6
- achievable only by upgrading the complete OS
- 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.
- on older installations, it might be necessary to keep all machines at CUPS version #< 1.5.4
- most suitable arrangement is for all machines using CUPS #< 1.6
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.
CUPS <= 1.5.4
With this version, a (different) CUPS browsing module is usually enabled by default. Simpler configuration changes usually suffice.
At the server end, browse to https://localhost:631/admin and activate radio buttons to:
- Share printers connected to this system
At the workstation/client end, browse to https://localhost:631/admin and activate radio buttons to:
- Use printers shared by others
The above troubleshooting tips apply
Getting Techhnical
The above changes can also be implemented via a combination of editing config files and commands via CLI.
At the server end:
- 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)
- Log to a terminal as root and execute:
# systemctl cups-browsed.service enable
# systemctl cups-browsed.service start
At the client end:
- 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)
- Log to a terminal as root and execute:
# systemctl cups-browsed.service enable
# systemctl cups-browsed.service start