Diff for /wikisrc/tutorials/how_to_setup_cups_in_netbsd.mdwn between versions 1.1 and 1.2

version 1.1, 2011/11/20 20:55:21 version 1.2, 2012/02/05 07:14:36
Line 1 Line 1
 **Contents**  **Contents**
   
 [[!toc levels=2]]  [[!toc levels=2]]
   
 #  Introduction  #  Introduction
   
 The Common Unix Printing System (CUPS) is a modular printing system for Unix-like computer operating systems that allows a computer to act as a powerful print server. A computer running CUPS is a host which can accept print jobs from client computers, process them, and send them to the appropriate printer. More information regarding the architecture of CUPS can be found [here](http://en.wikipedia.org/wiki/Common_Unix_Printing_System).  The Common Unix Printing System (CUPS) is a modular printing system for Unix-like computer operating systems that allows a computer to act as a powerful print server. A computer running CUPS is a host which can accept print jobs from client computers, process them, and send them to the appropriate printer. More information regarding the architecture of CUPS can be found [here](http://en.wikipedia.org/wiki/Common_Unix_Printing_System). 
   
 To check whether your printer works with CUPS and to what extent, you may visit the [OpenPrinting database](http://www.linuxprinting.org/printer_list.cgi).  To check whether your printer works with CUPS and to what extent, you may visit the [OpenPrinting database](http://www.linuxprinting.org/printer_list.cgi). 
   
 #  Install CUPS  #  Install CUPS
   
 Assuming your [[pkgsrc/pkgsrc]] tree lies at `/usr/pkgsrc`, type:  Assuming your [[pkgsrc/pkgsrc]] tree lies at `/usr/pkgsrc`, type: 
          
     # cd /usr/pkgsrc/print/cups      # cd /usr/pkgsrc/print/cups
     # make install      # make install
          
   
 #  Modify rc.conf  #  Modify rc.conf
   
 Next copy cupsd startup script at /etc/rc.d:  Next copy cupsd startup script at /etc/rc.d: 
          
     # cp /usr/pkg/share/examples/rc.d/cupsd /etc/rc.d      # cp /usr/pkg/share/examples/rc.d/cupsd /etc/rc.d
          
   
 Then add the following line to your /etc/rc.conf file:  Then add the following line to your /etc/rc.conf file: 
          
     cupsd=YES      cupsd=YES
          
   
 And start the CUPS daemon, with:  And start the CUPS daemon, with: 
          
     # /etc/rc.d/cupsd start      # /etc/rc.d/cupsd start
     Starting cupsd.      Starting cupsd.
     #      #
          
   
 #  Install Foomatic PPD collection  #  Install Foomatic PPD collection
   
 The Foomatic PPD collection includes suitable PPDs for printers listed in the Foomatic printer/driver database. Together with the foomatic-filters package, this collection of PPDs allows many non-PostScript printers to function as if they were [PostScript](http://en.wikipedia.org/wiki/PostScript) printers:  The Foomatic PPD collection includes suitable PPDs for printers listed in the Foomatic printer/driver database. Together with the foomatic-filters package, this collection of PPDs allows many non-PostScript printers to function as if they were [PostScript](http://en.wikipedia.org/wiki/PostScript) printers: 
          
 # cd /usr/pkgsrc/print/foomatic-ppds  # cd /usr/pkgsrc/print/foomatic-ppds
     # make install      # make install
          
   
 The following package adds Foomatic PPDs to the CUPS PPD database:  The following package adds Foomatic PPDs to the CUPS PPD database: 
          
     # cd /usr/pkgsrc/print/foomatic-ppds-cups      # cd /usr/pkgsrc/print/foomatic-ppds-cups
     # make install      # make install
          
   
 #  Setup CUPS  #  Setup CUPS
   
 Open a web browser and type in the address/location bar:  Open a web browser and type in the address/location bar: 
          
     http://localhost:631      http://localhost:631
          
   
 You will enter a web-based interface where you can manage your printing system (add printers, etc).  You will enter a web-based interface where you can manage your printing system (add printers, etc). 
   
 To print using cups from the command line without further modifications you have to use **/usr/pkg/bin/lpr**. Using simply **lpr** will not print using cups but the default NetBSD printing system. The same apply to the spool queue examination command **lpq**.  To print using cups from the command line without further modifications you have to use **/usr/pkg/bin/lpr**. Using simply **lpr** will not print using cups but the default NetBSD printing system. The same apply to the spool queue examination command **lpq**. 
   
 #  Network configuration  #  Network configuration
   
 ##  Server side  ##  Server side
   
 ##  Client side  ##  Client side
   
 #  Documentation  #  Documentation
   
   * [OpenPrinting CUPS Quick Start](http://www.linux-foundation.org/en/OpenPrinting/Database/CUPSDocumentation)    * [OpenPrinting CUPS Quick Start](http://www.linux-foundation.org/en/OpenPrinting/Database/CUPSDocumentation)
   * [BSDnexus forums / CUPS Howto](http://forums.bsdnexus.com/viewtopic.php?id=36)    * [BSDnexus forums / CUPS Howto](http://forums.bsdnexus.com/viewtopic.php?id=36)
   
 #  Screenshots  #  Screenshots
   
 [![][24]][25]  [![][24]][25]
   
    [24]: /images/120px-Print_CUPS_5.jpg     [24]: /images/120px-Print_CUPS_5.jpg
    [25]: /images/Print_CUPS_5.jpg (Print CUPS 5.jpg)     [25]: /images/Print_CUPS_5.jpg (Print CUPS 5.jpg)
   
 Web interface  Web interface 
   
 #  Notes  #  Notes
   
 ##  Permissions  ##  Permissions
   
 Just for the record (I'm not sure where this fits in): To make it print, I had to  Just for the record (I'm not sure where this fits in): To make it print, I had to 
          
     chown lp /dev/ulpt0 # usb              chown lp /dev/ulpt0 # usb        
          
   
 and install print/hpijs for my Deskjet (it is used by gs via the foomatic thing), then set some additional options in the web interface, e.g. a4 paper size. Conclusion: The web interface sucks, looking into the logs is indispensable.  and install print/hpijs for my Deskjet (it is used by gs via the foomatic thing), then set some additional options in the web interface, e.g. a4 paper size. Conclusion: The web interface sucks, looking into the logs is indispensable. 
   
 ##  BSD lpr  ##  BSD lpr
   
 I think I no longer need the BSD lpr, so i just did this to avoid confusion:  I think I no longer need the BSD lpr, so i just did this to avoid confusion: 
          
     # chmod -x /usr/bin/lp*      # chmod -x /usr/bin/lp*
     # chmod -x /usr/sbin/lp*      # chmod -x /usr/sbin/lp*
          
   
 ##  HP Printer  ##  HP Printer
   
 To use HP printers (like DeskJet, OfficeJet, PhotoSmart, Business InkJet, and some LaserJet models) and to not have this kind of error **/usr/pkg/libexec/cups/filter/foomatic-rip failed**, you need to install another package named hpijs :  To use HP printers (like DeskJet, OfficeJet, PhotoSmart, Business InkJet, and some LaserJet models) and to not have this kind of error **/usr/pkg/libexec/cups/filter/foomatic-rip failed**, you need to install another package named hpijs : 
          
     # cd /usr/pkgsrc/print/hpijs      # cd /usr/pkgsrc/print/hpijs
     # make install clean clean-depends      # make install clean clean-depends
          
   
 #  See also  #  See also
   
   * [[Cups](http://www.cups.org/)    * [[Cups](http://www.cups.org/) 
   

Removed from v.1.1  
changed lines
  Added in v.1.2


CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb