From Fedora Project Wiki

Revision as of 17:47, 4 March 2009 by Laubersm (talk | contribs) (Docs/Drafts/AdministrationGuide/CupsPrinting moved to Archive:Docs/Drafts/AdministrationGuide/CupsPrinting: This page references a newer draft version. Archiving old page tree then I'll go back and redirect to the new.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

CUPS Printing

CUPS encompasses many different aspects of printing. For quick snapshot, it is CUPS when you are:

  • printing from your linux computer to a printer, attached to your computer straight;
  • printing from linux to a printer attached to another computer running linux (cups);
  • printing from MS to a printer, attached to a computer running linux (cups+samba);
  • printing from linux machine to a printer, attached to a computer running MS (cups+smbclient);

In short CUPS can act both as server and client towards different operating systems, be it linux, MS or Mac. With these features CUPS is ideal for heterogeneous networks. To give an idea of pervasiveness CUPS can deliver, one can have printer hooked to MS box, access it from another Linux/CUPS machine and subsequently publish further from CUPS/linux machine to the rest of the network to all different computers running MS/Linux/Mac.

Installation/packages

  • cups - core of the system;
  • system-config-printer gui config tool;
  • kdebase - provides KDE gui config utility;

All part of Fedora repo, can be installed with yum install cups system-config-network kdebase. Once installed enable for future boots by running the command su -c 'chkconfig cups on' and enable for current session with su -c 'service cups start'.

Configuration

Bulk of CUPS configuration can be done from user friendly graphical interface. Three (supposedly equivalent) options are available:

  • web based config utility, [1] - the way to go;
  • system-config-printer - user friendly graphical utility;
  • kprinter - accessible from Settings > Printer in KDE;

There is an opinion that of three the web based utility is preferable both, by functionality and reliability. Present page will follow web based interface where gui configuration will be proper, other two interfaces mimic the first very closely, things done the same way.

web based interface and cupsd.conf

the default configuration of CUPS is open towards localhost, but closed towards other computers, which config is controlled from /etc/cups/cupsd.conf file. The format is allow/deny similar to many other linux configs. the default config file is selfexplanatory and one can add options at own discretion. namely, if you want to have web interface access with admin privileges you need modify <Location /admin> and <Location /admin/conf> tags. Here is example from my File:Docs Drafts AdministrationGuide CupsPrinting cupsd.conf file which allowes both printing and administering from any IP on local network.

port 631

By default CUPS is using port 631 which needs to be open if using Firewall .

Installing printer

local printer

Some usb printers will be detected automatically, else from [2] click button Add printer and for the rest it is pretty much self explanatory.

network Linux printer

After Add printer button choose Network ipp printer and on next screen enter the printer path ipp://hostname/ipp/ (ipp stands for Internet printing protocol and is supported by both, linux and MS).

Alternately, if you have the openslp package installed on the machine with the printer attached then the printer can be automatically discovered and configured by other hosts on the network.

network MS printer

The same as above, after Add printer button choose Network ipp printer and on next screen enter the printer path ipp://hostname/ipp/. You can also use smb://hostname/printername.

drivers and Openprinting.org

If driver availability turns out a problem (you don't find your printer in available list) try to google ppd file for you printer. [3] is one large pool of linux supported printer drivers. If you find ppd file, you can indicate it instead of choosing one from available list in appropriate installation step.

Sharing printer

Sharing with other linux machines

Publish printer button at [4] does the job. You can finetune access right in /etc/cups/cupsd.conf file by modifying allow/deny options <Location/ printers> tag.

Sharing with MS boxes

In addition to be published, to enable other MS computers to print to your CUPS shared printer, it needs to be shared through Samba , which can be easily done using [5] - Swat web based configuration tool for Samba, the printer tab there is pretty mush self explanatory. One only needs to add ip for admitted clients in hosts allow line. The config can be verified in /etc/samba/sbm.conf file which among other must contain following

[global] 
...
printcap name = cups
printing = cups
cups options = raw
print command =
lpq command = %p
lprm command =
...
[printers] 
comment = All Printers
path = /var/spool/samba
printer admin = root
guest ok = Yes
printable = Yes
use client driver = Yes
browseable = No
...