diff options
Diffstat (limited to 'docs/htmldocs/CUPS-printing.html')
-rw-r--r-- | docs/htmldocs/CUPS-printing.html | 1984 |
1 files changed, 738 insertions, 1246 deletions
diff --git a/docs/htmldocs/CUPS-printing.html b/docs/htmldocs/CUPS-printing.html index 46ca8e15f7..8bfe11405f 100644 --- a/docs/htmldocs/CUPS-printing.html +++ b/docs/htmldocs/CUPS-printing.html @@ -1,54 +1,59 @@ -<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 19. CUPS Printing Support in Samba 3.0</title><link rel="stylesheet" href="samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.60.1"><link rel="home" href="index.html" title="SAMBA Project Documentation"><link rel="up" href="optional.html" title="Part III. Advanced Configuration"><link rel="previous" href="printing.html" title="Chapter 18. Classical Printing Support"><link rel="next" href="VFS.html" title="Chapter 20. Stackable VFS modules"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 19. CUPS Printing Support in Samba 3.0</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="printing.html">Prev</a> </td><th width="60%" align="center">Part III. Advanced Configuration</th><td width="20%" align="right"> <a accesskey="n" href="VFS.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="CUPS-printing"></a>Chapter 19. CUPS Printing Support in Samba 3.0</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Kurt</span> <span class="surname">Pfeifle</span></h3><div class="affiliation"><span class="orgname"> Danka Deutschland GmbH <br></span><div class="address"><p><tt class="email"><<a href="mailto:kpfeifle@danka.de">kpfeifle@danka.de</a>></tt></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Ciprian</span> <span class="surname">Vizitiu</span></h3><span class="contrib">drawings</span><div class="affiliation"><div class="address"><p><tt class="email"><<a href="mailto:CVizitiu@gbif.org">CVizitiu@gbif.org</a>></tt></p></div></div></div></div><div><p class="pubdate"> (3 June 2003) </p></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="CUPS-printing.html#id2953785">Introduction</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2953792">Features and Benefits</a></dt><dt><a href="CUPS-printing.html#id2953845">Overview</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2953900">Basic Configuration of CUPS support</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2953979">Linking of smbd with libcups.so</a></dt><dt><a href="CUPS-printing.html#id2954122">Simple smb.conf Settings for CUPS</a></dt><dt><a href="CUPS-printing.html#id2954205">More complex smb.conf Settings for -CUPS</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2954322">Advanced Configuration</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2954343">Central spooling vs. "Peer-to-Peer" printing</a></dt><dt><a href="CUPS-printing.html#id2954370">CUPS/Samba as a "spooling-only" Print Server; "raw" printing -with Vendor Drivers on Windows Clients</a></dt><dt><a href="CUPS-printing.html#id2954406">Driver Installation Methods on Windows Clients</a></dt><dt><a href="CUPS-printing.html#id2954465">Explicitly enable "raw" printing for -application/octet-stream!</a></dt><dt><a href="CUPS-printing.html#id2954626">Three familiar Methods for driver upload plus a new one</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2954719">Using CUPS/Samba in an advanced Way -- intelligent printing -with PostScript Driver Download</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2954794">GDI on Windows -- PostScript on Unix</a></dt><dt><a href="CUPS-printing.html#id2954839">Windows Drivers, GDI and EMF</a></dt><dt><a href="CUPS-printing.html#id2954940">Unix Printfile Conversion and GUI Basics</a></dt><dt><a href="CUPS-printing.html#id2955028">PostScript and Ghostscript</a></dt><dt><a href="CUPS-printing.html#id2955125">Ghostscript -- the Software RIP for non-PostScript Printers</a></dt><dt><a href="CUPS-printing.html#id2955238">PostScript Printer Description (PPD) Specification</a></dt><dt><a href="CUPS-printing.html#id2955308">CUPS can use all Windows-formatted Vendor PPDs</a></dt><dt><a href="CUPS-printing.html#id2955397">CUPS also uses PPDs for non-PostScript Printers</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2955420">The CUPS Filtering Architecture</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2955560">MIME types and CUPS Filters</a></dt><dt><a href="CUPS-printing.html#id2955747">MIME type Conversion Rules</a></dt><dt><a href="CUPS-printing.html#id2955864">Filter Requirements</a></dt><dt><a href="CUPS-printing.html#id2956034">Prefilters</a></dt><dt><a href="CUPS-printing.html#id2956120">pstops</a></dt><dt><a href="CUPS-printing.html#id2956222">pstoraster</a></dt><dt><a href="CUPS-printing.html#id2956377">imagetops and imagetoraster</a></dt><dt><a href="CUPS-printing.html#id2956434">rasterto [printers specific]</a></dt><dt><a href="CUPS-printing.html#id2956519">CUPS Backends</a></dt><dt><a href="CUPS-printing.html#id2956831">cupsomatic/Foomatic -- how do they fit into the Picture?</a></dt><dt><a href="CUPS-printing.html#id2956944">The Complete Picture</a></dt><dt><a href="CUPS-printing.html#id2956960">mime.convs</a></dt><dt><a href="CUPS-printing.html#id2957012">"Raw" printing</a></dt><dt><a href="CUPS-printing.html#id2957066">"application/octet-stream" printing</a></dt><dt><a href="CUPS-printing.html#id2957282">PostScript Printer Descriptions (PPDs) for non-PS Printers</a></dt><dt><a href="CUPS-printing.html#id2957510">Difference between cupsomatic/foomatic-rip and -native CUPS printing</a></dt><dt><a href="CUPS-printing.html#id2957666">Examples for filtering Chains</a></dt><dt><a href="CUPS-printing.html#id2957897">Sources of CUPS drivers / PPDs</a></dt><dt><a href="CUPS-printing.html#id2958024">Printing with Interface Scripts</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2958100">Network printing (purely Windows)</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2958116">From Windows Clients to an NT Print Server</a></dt><dt><a href="CUPS-printing.html#id2958155">Driver Execution on the Client</a></dt><dt><a href="CUPS-printing.html#id2958227">Driver Execution on the Server</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2958289">Network Printing (Windows clients -- UNIX/Samba Print -Servers)</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2958310">From Windows Clients to a CUPS/Samba Print Server</a></dt><dt><a href="CUPS-printing.html#id2958474">Samba receiving Jobfiles and passing them to CUPS</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2958550">Network PostScript RIP: CUPS Filters on Server -- clients use -PostScript Driver with CUPS-PPDs</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2958605">PPDs for non-PS Printers on UNIX</a></dt><dt><a href="CUPS-printing.html#id2958646">PPDs for non-PS Printers on Windows</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2958712">Windows Terminal Servers (WTS) as CUPS Clients</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2958729">Printer Drivers running in "Kernel Mode" cause many -Problems</a></dt><dt><a href="CUPS-printing.html#id2958763">Workarounds impose Heavy Limitations</a></dt><dt><a href="CUPS-printing.html#id2958784">CUPS: a "Magical Stone"?</a></dt><dt><a href="CUPS-printing.html#id2958811">PostScript Drivers with no major problems -- even in Kernel -Mode</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2958865"> Setting up CUPS for driver Download</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2958884">cupsaddsmb: the unknown Utility</a></dt><dt><a href="CUPS-printing.html#id2958976">Prepare your smb.conf for -cupsaddsmb</a></dt><dt><a href="CUPS-printing.html#id2959022">CUPS Package of "PostScript Driver for WinNT/2k/XP"</a></dt><dt><a href="CUPS-printing.html#id2959220">Recognize the different Driver Files</a></dt><dt><a href="CUPS-printing.html#id2959278">Acquiring the Adobe Driver Files</a></dt><dt><a href="CUPS-printing.html#id2959310">ESP Print Pro Package of "PostScript Driver for -WinNT/2k/XP"</a></dt><dt><a href="CUPS-printing.html#id2959360">Caveats to be considered</a></dt><dt><a href="CUPS-printing.html#id2959582">What are the Benefits of using the "CUPS PostScript Driver for -Windows NT/2k/XP" as compared to the Adobe Driver?</a></dt><dt><a href="CUPS-printing.html#id2959764">Run "cupsaddsmb" (quiet Mode)</a></dt><dt><a href="CUPS-printing.html#id2959865">Run "cupsaddsmb" with verbose Output</a></dt><dt><a href="CUPS-printing.html#id2960092">Understanding cupsaddsmb</a></dt><dt><a href="CUPS-printing.html#id2960186">How to recognize if cupsaddsm completed successfully</a></dt><dt><a href="CUPS-printing.html#id2960273">cupsaddsmb with a Samba PDC</a></dt><dt><a href="CUPS-printing.html#id2960308">cupsaddsmb Flowchart</a></dt><dt><a href="CUPS-printing.html#id2960361">Installing the PostScript Driver on a Client</a></dt><dt><a href="CUPS-printing.html#id2960474">Avoiding critical PostScript Driver Settings on the -Client</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2960608">Installing PostScript Driver Files manually (using -rpcclient)</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2960723">A Check of the rpcclient man Page</a></dt><dt><a href="CUPS-printing.html#id2960836">Understanding the rpcclient man Page</a></dt><dt><a href="CUPS-printing.html#id2960925">Producing an Example by querying a Windows Box</a></dt><dt><a href="CUPS-printing.html#id2961015">What is required for adddriver and setdriver to succeed</a></dt><dt><a href="CUPS-printing.html#id2961177">Manual Commandline Driver Installation in 15 little Steps</a></dt><dt><a href="CUPS-printing.html#id2961830">Troubleshooting revisited</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2961930">The printing *.tdb Files</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2962033">Trivial DataBase Files</a></dt><dt><a href="CUPS-printing.html#id2962103">Binary Format</a></dt><dt><a href="CUPS-printing.html#id2962165">Losing *.tdb Files</a></dt><dt><a href="CUPS-printing.html#id2962224">Using tdbbackup</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2962290">CUPS Print Drivers from Linuxprinting.org</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2962398">foomatic-rip and Foomatic explained</a></dt><dt><a href="CUPS-printing.html#id2963027">foomatic-rip and Foomatic-PPD Download and Installation</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2963488">Page Accounting with CUPS</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2963519">Setting up Quotas</a></dt><dt><a href="CUPS-printing.html#id2963551">Correct and incorrect Accounting</a></dt><dt><a href="CUPS-printing.html#id2963592">Adobe and CUPS PostScript Drivers for Windows Clients</a></dt><dt><a href="CUPS-printing.html#id2963663">The page_log File Syntax</a></dt><dt><a href="CUPS-printing.html#id2963765">Possible Shortcomings</a></dt><dt><a href="CUPS-printing.html#id2963836">Future Developments</a></dt><dt><a href="CUPS-printing.html#id2963884">Other Accounting Tools</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2963899">Additional Material</a></dt><dt><a href="CUPS-printing.html#id2964092">Auto-Deletion or Preservation of CUPS Spool Files</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2964138">CUPS Configuration Settings explained</a></dt><dt><a href="CUPS-printing.html#id2964221">Pre-conditions</a></dt><dt><a href="CUPS-printing.html#id2964281">Manual Configuration</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2964299">When not to use Samba to print to -CUPS</a></dt><dt><a href="CUPS-printing.html#id2964316">In Case of Trouble.....</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2964352">Where to find Documentation</a></dt><dt><a href="CUPS-printing.html#id2964364">How to ask for Help</a></dt><dt><a href="CUPS-printing.html#id2964377">Where to find Help</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2964391">Appendix</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2964398">Printing from CUPS to Windows attached -Printers</a></dt><dt><a href="CUPS-printing.html#id2964612">More CUPS filtering Chains</a></dt><dt><a href="CUPS-printing.html#id2964919">Trouble Shooting Guidelines to fix typical Samba printing -Problems</a></dt><dt><a href="CUPS-printing.html#id2966041">An Overview of the CUPS Printing Processes</a></dt></dl></dd></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2953785"></a>Introduction</h2></div></div><div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2953792"></a>Features and Benefits</h3></div></div><div></div></div><p> - The Common Unix Print System (<a href="http://www.cups.org/" target="_top">CUPS</a>) has become very popular. All - big Linux distributions now ship it as their default printing - system. But to many it is still a very mystical tool. Normally it - "just works" (TM). People tend to regard it as a sort of "black box", - which they don't want to look into, as long as it works OK. But once +<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 19. CUPS Printing Support in Samba 3.0</title><link rel="stylesheet" href="samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.60.1"><link rel="home" href="samba-doc.html" title="SAMBA Project Documentation"><link rel="up" href="optional.html" title="Part III. Advanced Configuration"><link rel="previous" href="printing.html" title="Chapter 18. Classical Printing Support"><link rel="next" href="VFS.html" title="Chapter 20. Stackable VFS modules"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 19. CUPS Printing Support in Samba 3.0</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="printing.html">Prev</a> </td><th width="60%" align="center">Part III. Advanced Configuration</th><td width="20%" align="right"> <a accesskey="n" href="VFS.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="CUPS-printing"></a>Chapter 19. CUPS Printing Support in Samba 3.0</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Kurt</span> <span class="surname">Pfeifle</span></h3><div class="affiliation"><span class="orgname">Danka Deutschland GmbH <br></span><div class="address"><p><tt class="email"><<a href="mailto:kpfeifle@danka.de">kpfeifle@danka.de</a>></tt></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Ciprian</span> <span class="surname">Vizitiu</span></h3><span class="contrib">drawings</span><div class="affiliation"><div class="address"><p><tt class="email"><<a href="mailto:CVizitiu@gbif.org">CVizitiu@gbif.org</a>></tt></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Jelmer</span> <span class="othername">R.</span> <span class="surname">Vernooij</span></h3><span class="contrib">drawings</span><div class="affiliation"><span class="orgname">The Samba Team<br></span><div class="address"><p><tt class="email"><<a href="mailto:jelmer@samba.org">jelmer@samba.org</a>></tt></p></div></div></div></div><div><p class="pubdate"> (3 June 2003) </p></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="CUPS-printing.html#id2923750">Introduction</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2923756">Features and Benefits</a></dt><dt><a href="CUPS-printing.html#id2923811">Overview</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2923880">Basic Configuration of CUPS support</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2923972">Linking of smbd with libcups.so</a></dt><dt><a href="CUPS-printing.html#id2924213">Simple smb.conf Settings for CUPS</a></dt><dt><a href="CUPS-printing.html#id2924395">More complex smb.conf Settings for +CUPS</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2924750">Advanced Configuration</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2924770">Central spooling vs. "Peer-to-Peer" printing</a></dt><dt><a href="CUPS-printing.html#id2924825">CUPS/Samba as a "spooling-only" Print Server; "raw" printing +with Vendor Drivers on Windows Clients</a></dt><dt><a href="CUPS-printing.html#id2924894">Driver Installation Methods on Windows Clients</a></dt><dt><a href="CUPS-printing.html#id2924971">Explicitly enable "raw" printing for +application/octet-stream!</a></dt><dt><a href="CUPS-printing.html#id2925177">Three familiar Methods for driver upload plus a new one</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2925317">Using CUPS/Samba in an advanced Way -- intelligent printing +with PostScript Driver Download</a></dt><dd><dl><dt><a href="CUPS-printing.html#gdipost">GDI on Windows -- PostScript on UNIX</a></dt><dt><a href="CUPS-printing.html#id2925497">Windows Drivers, GDI and EMF</a></dt><dt><a href="CUPS-printing.html#id2925650">UNIX Printfile Conversion and GUI Basics</a></dt><dt><a href="CUPS-printing.html#post-and-ghost">PostScript and Ghostscript</a></dt><dt><a href="CUPS-printing.html#id2925951">Ghostscript -- the Software RIP for non-PostScript Printers</a></dt><dt><a href="CUPS-printing.html#id2926092">PostScript Printer Description (PPD) Specification</a></dt><dt><a href="CUPS-printing.html#id2926179">CUPS can use all Windows-formatted Vendor PPDs</a></dt><dt><a href="CUPS-printing.html#id2926285">CUPS also uses PPDs for non-PostScript Printers</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2926306">The CUPS Filtering Architecture</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2926501">MIME types and CUPS Filters</a></dt><dt><a href="CUPS-printing.html#id2926707">MIME type Conversion Rules</a></dt><dt><a href="CUPS-printing.html#id2926862">Filter Requirements</a></dt><dt><a href="CUPS-printing.html#id2927043">Prefilters</a></dt><dt><a href="CUPS-printing.html#id2927153">pstops</a></dt><dt><a href="CUPS-printing.html#id2927264">pstoraster</a></dt><dt><a href="CUPS-printing.html#id2927459">imagetops and imagetoraster</a></dt><dt><a href="CUPS-printing.html#id2927523">rasterto [printers specific]</a></dt><dt><a href="CUPS-printing.html#id2927675">CUPS Backends</a></dt><dt><a href="CUPS-printing.html#id2928022">cupsomatic/Foomatic -- how do they fit into the Picture?</a></dt><dt><a href="CUPS-printing.html#id2928168">The Complete Picture</a></dt><dt><a href="CUPS-printing.html#id2928183">mime.convs</a></dt><dt><a href="CUPS-printing.html#id2928246">"Raw" printing</a></dt><dt><a href="CUPS-printing.html#id2928335">"application/octet-stream" printing</a></dt><dt><a href="CUPS-printing.html#id2928581">PostScript Printer Descriptions (PPDs) for non-PS Printers</a></dt><dt><a href="CUPS-printing.html#id2928848">Difference between cupsomatic/foomatic-rip and +native CUPS printing</a></dt><dt><a href="CUPS-printing.html#id2929083">Examples for filtering Chains</a></dt><dt><a href="CUPS-printing.html#id2929420">Sources of CUPS drivers / PPDs</a></dt><dt><a href="CUPS-printing.html#id2929572">Printing with Interface Scripts</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2929667">Network printing (purely Windows)</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2929677">From Windows Clients to an NT Print Server</a></dt><dt><a href="CUPS-printing.html#id2929741">Driver Execution on the Client</a></dt><dt><a href="CUPS-printing.html#id2929818">Driver Execution on the Server</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2929936">Network Printing (Windows clients -- UNIX/Samba Print +Servers)</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2929956">From Windows Clients to a CUPS/Samba Print Server</a></dt><dt><a href="CUPS-printing.html#id2930169">Samba receiving Jobfiles and passing them to CUPS</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2930255">Network PostScript RIP: CUPS Filters on Server -- clients use +PostScript Driver with CUPS-PPDs</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2930344">PPDs for non-PS Printers on UNIX</a></dt><dt><a href="CUPS-printing.html#id2930400">PPDs for non-PS Printers on Windows</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2930476">Windows Terminal Servers (WTS) as CUPS Clients</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2930493">Printer Drivers running in "Kernel Mode" cause many +Problems</a></dt><dt><a href="CUPS-printing.html#id2930538">Workarounds impose Heavy Limitations</a></dt><dt><a href="CUPS-printing.html#id2930560">CUPS: a "Magical Stone"?</a></dt><dt><a href="CUPS-printing.html#id2930614">PostScript Drivers with no major problems -- even in Kernel +Mode</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2930637">Setting up CUPS for driver Download</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2930710">cupsaddsmb: the unknown Utility</a></dt><dt><a href="CUPS-printing.html#id2930811">Prepare your smb.conf for cupsaddsmb</a></dt><dt><a href="CUPS-printing.html#id2931030">CUPS Package of "PostScript Driver for WinNT/2k/XP"</a></dt><dt><a href="CUPS-printing.html#id2931268">Recognize the different Driver Files</a></dt><dt><a href="CUPS-printing.html#id2931460">Acquiring the Adobe Driver Files</a></dt><dt><a href="CUPS-printing.html#id2931493">ESP Print Pro Package of "PostScript Driver for +WinNT/2k/XP"</a></dt><dt><a href="CUPS-printing.html#id2931562">Caveats to be considered</a></dt><dt><a href="CUPS-printing.html#id2931837">Benefits of using "CUPS PostScript Driver for +Windows NT/2k/XP" instead of Adobe Driver</a></dt><dt><a href="CUPS-printing.html#id2932052">Run "cupsaddsmb" (quiet Mode)</a></dt><dt><a href="CUPS-printing.html#id2932180">Run "cupsaddsmb" with verbose Output</a></dt><dt><a href="CUPS-printing.html#id2932401">Understanding cupsaddsmb</a></dt><dt><a href="CUPS-printing.html#id2932551">How to recognize if cupsaddsmb completed successfully</a></dt><dt><a href="CUPS-printing.html#id2932633">cupsaddsmb with a Samba PDC</a></dt><dt><a href="CUPS-printing.html#id2932714">cupsaddsmb Flowchart</a></dt><dt><a href="CUPS-printing.html#id2932789">Installing the PostScript Driver on a Client</a></dt><dt><a href="CUPS-printing.html#id2932953">Avoiding critical PostScript Driver Settings on the +Client</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2933086">Installing PostScript Driver Files manually (using +rpcclient)</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2933288">A Check of the rpcclient man Page</a></dt><dt><a href="CUPS-printing.html#id2933403">Understanding the rpcclient man page</a></dt><dt><a href="CUPS-printing.html#id2933506">Producing an Example by querying a Windows Box</a></dt><dt><a href="CUPS-printing.html#id2933674">What is required for adddriver and setdriver to succeed</a></dt><dt><a href="CUPS-printing.html#id2933889">Manual Driver Installation in 15 Steps</a></dt><dt><a href="CUPS-printing.html#id2934958">Troubleshooting revisited</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2935118">The printing *.tdb Files</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2935364">Trivial DataBase Files</a></dt><dt><a href="CUPS-printing.html#id2935456">Binary Format</a></dt><dt><a href="CUPS-printing.html#id2935520">Losing *.tdb Files</a></dt><dt><a href="CUPS-printing.html#id2935579">Using tdbbackup</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2935716">CUPS Print Drivers from Linuxprinting.org</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2935871">foomatic-rip and Foomatic explained</a></dt><dt><a href="CUPS-printing.html#id2936640">foomatic-rip and Foomatic-PPD Download and Installation</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2937141">Page Accounting with CUPS</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2937193">Setting up Quotas</a></dt><dt><a href="CUPS-printing.html#id2937258">Correct and incorrect Accounting</a></dt><dt><a href="CUPS-printing.html#id2937303">Adobe and CUPS PostScript Drivers for Windows Clients</a></dt><dt><a href="CUPS-printing.html#id2937398">The page_log File Syntax</a></dt><dt><a href="CUPS-printing.html#id2937516">Possible Shortcomings</a></dt><dt><a href="CUPS-printing.html#id2937592">Future Developments</a></dt><dt><a href="CUPS-printing.html#id2937648">Other Accounting Tools</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2937662">Additional Material</a></dt><dt><a href="CUPS-printing.html#id2937912">Auto-Deletion or Preservation of CUPS Spool Files</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2937974">CUPS Configuration Settings explained</a></dt><dt><a href="CUPS-printing.html#id2938069">Pre-conditions</a></dt><dt><a href="CUPS-printing.html#id2938226">Manual Configuration</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2938284">In Case of Trouble.....</a></dt><dt><a href="CUPS-printing.html#id2938356">Printing from CUPS to Windows attached +Printers</a></dt><dt><a href="CUPS-printing.html#id2938656">More CUPS filtering Chains</a></dt><dt><a href="CUPS-printing.html#id2938758">Common Errors</a></dt><dd><dl><dt><a href="CUPS-printing.html#id2938765">Win9x client can't install driver</a></dt><dt><a href="CUPS-printing.html#id2938787">"cupsaddsmb" keeps asking for root password in + neverending loop</a></dt><dt><a href="CUPS-printing.html#id2938835">"cupsaddsmb" gives "No PPD file for printer..." + message while PPD file is present</a></dt><dt><a href="CUPS-printing.html#id2938893">Client can't connect to Samba printer</a></dt><dt><a href="CUPS-printing.html#id2938921">Can't reconnect to Samba under new account + from Win2K/XP</a></dt><dt><a href="CUPS-printing.html#id2939149">Avoid being connected to the Samba server as the + "wrong" user</a></dt><dt><a href="CUPS-printing.html#id2939202">Upgrading to CUPS drivers from Adobe drivers on + NT/2K/XP clients gives problems</a></dt><dt><a href="CUPS-printing.html#id2939219">Can't use "cupsaddsmb" on Samba server which is + a PDC</a></dt><dt><a href="CUPS-printing.html#id2939249">Deleted Win2K printer driver is still shown</a></dt><dt><a href="CUPS-printing.html#id2939258">Win2K/XP "Local Security + Policies"</a></dt><dt><a href="CUPS-printing.html#id2939297">WinXP clients: "Administrator can not install + printers for all local users"</a></dt><dt><a href="CUPS-printing.html#id2939331">"Print Change Notify" functions on + NT-clients</a></dt><dt><a href="CUPS-printing.html#id2939354">WinXP-SP1</a></dt><dt><a href="CUPS-printing.html#id2939398">Print options for all users can't be set on Win2K/XP</a></dt><dt><a href="CUPS-printing.html#id2939689">Most common blunders in driver + settings on Windows clients</a></dt><dt><a href="CUPS-printing.html#id2939734">cupsaddsmb does not work + with newly installed printer</a></dt><dt><a href="CUPS-printing.html#id2939796">Permissions on +/var/spool/samba/ get reset after each +reboot</a></dt><dt><a href="CUPS-printing.html#id2939905">Printer named "lp" +intermittently swallows jobs and spits out completely different +ones</a></dt><dt><a href="CUPS-printing.html#id2939953">Location of Adobe PostScript driver files necessary for "cupsaddsmb"</a></dt></dl></dd><dt><a href="CUPS-printing.html#id2940008">An Overview of the CUPS Printing Processes</a></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2923750"></a>Introduction</h2></div></div><div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2923756"></a>Features and Benefits</h3></div></div><div></div></div><p> + The Common UNIX Print System (<a href="http://www.cups.org/" target="_top">CUPS</a>) has become very popular. All + major Linux distributions now ship it as their default printing + system. To many it is still a very mystical tool. Mostly, it + "just works" (TM). People tend to regard it as a "black box" + which they don't want to look into, as long as it works. But once there is a little problem, they are in trouble to find out where to - start debugging it. Also, even the most recent and otherwise excellent - printed Samba documentation has only limited attention paid to CUPS - printing, leaving out important pieces or even writing plain wrong - things about it. This demands rectification. But before you dive into - this chapter, make sure that you don't forget to refer to the - "Classical Printing" chapter also. It contains a lot of information - that is relevant for CUPS too. + start debugging it. Refer to the "Classical Printing" chapter also, it + contains a lot of information that is relevant for CUPS. </p><p> CUPS sports quite a few unique and powerful features. While their basic functions may be grasped quite easily, they are also new. Because they are different from other, more traditional printing systems, it is best to try and not apply any prior knowledge about - printing upon this new system. Rather try to start understand CUPS - from the beginning. This documentation will lead you here to a - complete understanding of CUPS, if you study all of the material - contained. But lets start with the most basic things first. Maybe this - is all you need for now. Then you can skip most of the other - paragraphs. - </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2953845"></a>Overview</h3></div></div><div></div></div><p> + printing upon this new system. Rather, try to understand CUPS + from the beginning. This documentation will lead you to a + complete understanding of CUPS. Let's start with the most basic + things first. + </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2923811"></a>Overview</h3></div></div><div></div></div><p> CUPS is more than just a print spooling system. It is a complete printer management system that complies with the new IPP (<span class="emphasis"><em>Internet Printing Protocol</em></span>). IPP is an industry and IETF (<span class="emphasis"><em>Internet Engineering Task Force</em></span>) standard for network printing. Many of its functions can be managed remotely (or locally) via a web browser (giving you a - platform-independent access to the CUPS print server). In addition it - has the traditional commandline and several more modern GUI interfaces + platform-independent access to the CUPS print server). Additionally, it + has the traditional command line and several more modern GUI interfaces (GUI interfaces developed by 3rd parties, like KDE's overwhelming <a href="http://printing.kde.org/" target="_top">KDEPrint</a>). </p><p> @@ -60,80 +65,53 @@ Problems</a></dt><dt><a href="CUPS-printing.html#id2966041">An Overview of the C argue that CUPS is better! In any case, let us now move on to explore how one may configure CUPS for interfacing with MS Windows print clients via Samba. - </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2953900"></a>Basic Configuration of CUPS support</h2></div></div><div></div></div><p> - Printing with CUPS in the most basic <tt class="filename">smb.conf</tt> - setup in Samba 3.0 (as was true for 2.2.x) only needs two - settings: <i class="parameter"><tt>printing = cups</tt></i> and <i class="parameter"><tt>printcap - = cups</tt></i>. CUPS itself doesn't need a printcap file - anymore. However, the <tt class="filename">cupsd.conf</tt> configuration - file knows two related directives: they control if such a file should - be automatically created and maintained by CUPS for the convenience of - third party applications (example: <i class="parameter"><tt>Printcap - /etc/printcap</tt></i> and <i class="parameter"><tt>PrintcapFormat - BSD</tt></i>). These legacy programs often require the existence of - printcap file containing printernames or they will refuse to - print. Make sure CUPS is set to generate and maintain a printcap! For - details see <b class="command">man cupsd.conf</b> and other CUPS-related - documentation, like the wealth of documents on your CUPS server + </p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2923880"></a>Basic Configuration of CUPS support</h2></div></div><div></div></div><p> + Printing with CUPS in the most basic <tt class="filename">smb.conf</tt> setup in Samba 3.0 (as was true for 2.2.x) only needs two + settings: <a class="indexterm" name="id2923898"></a><i class="parameter"><tt>printing</tt></i> = cups and + <a class="indexterm" name="id2923912"></a><i class="parameter"><tt>printcap</tt></i> = cups. CUPS does not need a printcap file. + However, the <tt class="filename">cupsd.conf</tt> configuration file knows of two related directives that control + how such a file will be automatically created and maintained by CUPS for the convenience of third party + applications (example: <i class="parameter"><tt>Printcap /etc/printcap</tt></i> and <i class="parameter"><tt>PrintcapFormat BSD</tt></i>). + Legacy programs often require the existence of a printcap file containing printer names or they will refuse to + print. Make sure CUPS is set to generate and maintain a printcap file! For details see + <b class="command">man cupsd.conf</b> and other CUPS-related documentation, like the wealth of documents on your CUPS server itself: <a href="http://localhost:631/documentation.html" target="_top">http://localhost:631/documentation.html</a>. - </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2953979"></a>Linking of smbd with libcups.so</h3></div></div><div></div></div><p> - Samba has a very special relationship to CUPS. The reason is: Samba - can be compiled with CUPS library support. Most recent installations - have this support enabled, and per default CUPS linking is compiled + </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2923972"></a>Linking of smbd with libcups.so</h3></div></div><div></div></div><p> + Samba has a very special relationship to CUPS. Samba can be compiled with CUPS library support. + Most recent installations have this support enabled. Per default CUPS linking is compiled into smbd and other Samba binaries. Of course, you can use CUPS even if Samba is not linked against <tt class="filename">libcups.so</tt> -- but there are some differences in required or supported configuration then. </p><p> - If SAMBA is compiled against libcups, then <i class="parameter"><tt>printcap = - cups</tt></i> uses the CUPS API to list printers, submit jobs, - query queues, etc. Otherwise it maps to the System V commands with an - additional <b class="command">-oraw</b> option for printing. On a Linux - system, you can use the <b class="command">ldd</b> utility to find out - details (ldd may not be present on other OS platforms, or its function - may be embodied by a different command): - </p><pre class="screen"> - transmeta:/home/kurt # ldd `which smbd` - libssl.so.0.9.6 => /usr/lib/libssl.so.0.9.6 (0x4002d000) - libcrypto.so.0.9.6 => /usr/lib/libcrypto.so.0.9.6 (0x4005a000) - libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) - [....] - </pre><p> - The line <tt class="computeroutput">libcups.so.2 => /usr/lib/libcups.so.2 - (0x40123000)</tt> shows there is CUPS support compiled - into this version of Samba. If this is the case, and printing = cups - is set, then <span class="emphasis"><em>any otherwise manually set print command in - <tt class="filename">smb.conf</tt> is ignored</em></span>. This is an - important point to remember! - </p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><p> Should you require -- for any reason -- to set your own - print commands, you can still do this by setting <i class="parameter"><tt>printing = - sysv</tt></i>. However, you'll loose all the benefits from the - close CUPS/Samba integration. You are on your own then to manually - configure the rest of the printing system commands (most important: - <i class="parameter"><tt>print command</tt></i>; other commands are - <i class="parameter"><tt>lppause command, lpresume command, lpq command, lprm - command, queuepause command </tt></i> and <i class="parameter"><tt>queue resume - command</tt></i>).</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2954122"></a>Simple <tt class="filename">smb.conf</tt> Settings for CUPS</h3></div></div><div></div></div><p> - To summarize, here is the simplest printing-related setup - for <tt class="filename">smb.conf</tt> to enable basic CUPS support: + When Samba is compiled against libcups, <a class="indexterm" name="id2924002"></a><i class="parameter"><tt>printcap</tt></i> = cups + uses the CUPS API to list printers, submit jobs, query queues, etc. Otherwise it maps to the System V + commands with an additional <b class="command">-oraw</b> option for printing. On a Linux + system, you can use the <b class="command">ldd</b> utility to find out details (ldd may not be present on + other OS platforms, or its function may be embodied by a different command): </p><pre class="screen"> - - [global] - load printers = yes - printing = cups - printcap name = cups - - [printers] - comment = All Printers - path = /var/spool/samba - browseable = no - public = yes - guest ok = yes - writable = no - printable = yes - printer admin = root, @ntadmins - - </pre><p> +<tt class="prompt">root# </tt><b class="userinput"><tt>ldd `which smbd`</tt></b> +libssl.so.0.9.6 => /usr/lib/libssl.so.0.9.6 (0x4002d000) +libcrypto.so.0.9.6 => /usr/lib/libcrypto.so.0.9.6 (0x4005a000) +libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000) +[....] +</pre><p> + The line <tt class="computeroutput">libcups.so.2 => /usr/lib/libcups.so.2 (0x40123000)</tt> shows + there is CUPS support compiled into this version of Samba. If this is the case, and printing = cups + is set, then <span class="emphasis"><em>any otherwise manually set print command in <tt class="filename">smb.conf</tt> is ignored</em></span>. + This is an important point to remember! + </p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><p> Should it be necessary, for any reason, to set your own print commands, you can do this by setting + <a class="indexterm" name="id2924097"></a><i class="parameter"><tt>printing</tt></i> = sysv. However, you will loose all the benefits + of tight CUPS/Samba integration. When you do this you must manually configure the printing system commands + (most important: <a class="indexterm" name="id2924114"></a><i class="parameter"><tt>print command</tt></i>; other commands are + <a class="indexterm" name="id2924128"></a><i class="parameter"><tt>lppause command</tt></i>, + <a class="indexterm" name="id2924142"></a><i class="parameter"><tt>lpresume command</tt></i>, + <a class="indexterm" name="id2924155"></a><i class="parameter"><tt>lpq command</tt></i>, + <a class="indexterm" name="id2924169"></a><i class="parameter"><tt>lprm command</tt></i>, + <a class="indexterm" name="id2924183"></a><i class="parameter"><tt>queuepause command</tt></i> and + <a class="indexterm" name="id2924197"></a><i class="parameter"><tt>queue resume command</tt></i>).</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2924213"></a>Simple <tt class="filename">smb.conf</tt> Settings for CUPS</h3></div></div><div></div></div><p> + To summarize, here is the simplest printing-related setup for <tt class="filename">smb.conf</tt> to enable basic CUPS support: + </p><div class="example"><a name="id2924241"></a><p class="title"><b>Example 19.1. Simplest printing-related smb.conf</b></p><table class="simplelist" border="0" summary="Simple list"><tr><td> </td></tr><tr><td><i class="parameter"><tt>[global]</tt></i></td></tr><tr><td><i class="parameter"><tt>load printers = yes</tt></i></td></tr><tr><td><i class="parameter"><tt>printing = cups</tt></i></td></tr><tr><td><i class="parameter"><tt>printcap name = cups</tt></i></td></tr><tr><td> </td></tr><tr><td><i class="parameter"><tt>[printers]</tt></i></td></tr><tr><td><i class="parameter"><tt>comment = All Printers</tt></i></td></tr><tr><td><i class="parameter"><tt>path = /var/spool/samba</tt></i></td></tr><tr><td><i class="parameter"><tt>browseable = no</tt></i></td></tr><tr><td><i class="parameter"><tt>public = yes</tt></i></td></tr><tr><td><i class="parameter"><tt>guest ok = yes</tt></i></td></tr><tr><td><i class="parameter"><tt>writable = no</tt></i></td></tr><tr><td><i class="parameter"><tt>printable = yes</tt></i></td></tr><tr><td><i class="parameter"><tt>printer admin = root, @ntadmins</tt></i></td></tr></table></div><p> This is all you need for basic printing setup for CUPS. It will print all Graphic, Text, PDF and PostScript file submitted from Windows clients. However, most of your Windows users would not know how to @@ -148,67 +126,29 @@ Problems</a></dt><dt><a href="CUPS-printing.html#id2966041">An Overview of the C printer is not a PostScript device, the print data stream is "binary", sensible only for the target printer. Read on to learn which problem this may cause and how to avoid it. - </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2954205"></a>More complex <tt class="filename">smb.conf</tt> Settings for + </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2924395"></a>More complex <tt class="filename">smb.conf</tt> Settings for CUPS</h3></div></div><div></div></div><p> Here is a slightly more complex printing-related setup for <tt class="filename">smb.conf</tt>. It enables general CUPS printing support for all printers, but defines one printer share which is set up differently. -</p><pre class="screen"> - - [global] - printing = cups - printcap name = cups - load printers = yes - - [printers] - comment = All Printers - path = /var/spool/samba - public = yes - guest ok = yes - writable = no - printable = yes - printer admin = root, @ntadmins - - [special_printer] - comment = A special printer with his own settings - path = /var/spool/samba-special - printing = sysv - printcap = lpstat - print command = echo "NEW: `date`: printfile %f" >> /tmp/smbprn.log ;\ - echo " `date`: p-%p s-%s f-%f" >> /tmp/smbprn.log ;\ - echo " `date`: j-%j J-%J z-%z c-%c" >> /tmp/smbprn.log :\ - rm %f - public = no - guest ok = no - writeable = no - printable = yes - printer admin = kurt - hosts deny = 0.0.0.0 - hosts allow = turbo_xp, 10.160.50.23, 10.160.51.60 - -</pre><p> -This special share is only there for my testing purposes. It doesn't -even write the print job to a file. It just logs the job parameters -known to Samba into the <tt class="filename">/tmp/smbprn.log</tt> file and -deletes the jobfile. Moreover, the <i class="parameter"><tt>printer -admin</tt></i> of this share is "kurt" (not the "@ntadmins" group); -guest access is not allowed; the share isn't announced in Network -Neighbourhood (so you need to know it is there), and it is only -allowing access from three hosts. To prevent CUPS kicking in and -taking over the print jobs for that share, we need to set -<i class="parameter"><tt>printing = sysv</tt></i> and <i class="parameter"><tt>printcap = -lpstat</tt></i>. -</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2954322"></a>Advanced Configuration</h2></div></div><div></div></div><p> -Before we dive into all the configuration options, let's clarify a few +</p><div class="example"><a name="id2924426"></a><p class="title"><b>Example 19.2. Overriding global CUPS settings for one printer</b></p><table class="simplelist" border="0" summary="Simple list"><tr><td> </td></tr><tr><td><i class="parameter"><tt>[global]</tt></i></td></tr><tr><td><i class="parameter"><tt>printing = cups</tt></i></td></tr><tr><td><i class="parameter"><tt>printcap name = cups</tt></i></td></tr><tr><td><i class="parameter"><tt>load printers = yes</tt></i></td></tr><tr><td> </td></tr><tr><td><i class="parameter"><tt>[printers]</tt></i></td></tr><tr><td><i class="parameter"><tt>comment = All Printers</tt></i></td></tr><tr><td><i class="parameter"><tt>path = /var/spool/samba</tt></i></td></tr><tr><td><i class="parameter"><tt>public = yes</tt></i></td></tr><tr><td><i class="parameter"><tt>guest ok = yes</tt></i></td></tr><tr><td><i class="parameter"><tt>writable = no</tt></i></td></tr><tr><td><i class="parameter"><tt>printable = yes</tt></i></td></tr><tr><td><i class="parameter"><tt>printer admin = root, @ntadmins</tt></i></td></tr><tr><td> </td></tr><tr><td><i class="parameter"><tt>[special_printer]</tt></i></td></tr><tr><td><i class="parameter"><tt>comment = A special printer with his own settings</tt></i></td></tr><tr><td><i class="parameter"><tt>path = /var/spool/samba-special</tt></i></td></tr><tr><td><i class="parameter"><tt>printing = sysv</tt></i></td></tr><tr><td><i class="parameter"><tt>printcap = lpstat</tt></i></td></tr><tr><td><i class="parameter"><tt>print command = echo "NEW: `date`: printfile %f" >> /tmp/smbprn.log ; \</tt></i></td></tr><tr><td><i class="parameter"><tt>echo " `date`: p-%p s-%s f-%f" >> /tmp/smbprn.log ; \</tt></i></td></tr><tr><td><i class="parameter"><tt>echo " `date`: j-%j J-%J z-%z c-%c" >> /tmp/smbprn.log : rm %f</tt></i></td></tr><tr><td><i class="parameter"><tt>public = no</tt></i></td></tr><tr><td><i class="parameter"><tt>guest ok = no</tt></i></td></tr><tr><td><i class="parameter"><tt>writeable = no</tt></i></td></tr><tr><td><i class="parameter"><tt>printable = yes</tt></i></td></tr><tr><td><i class="parameter"><tt>printer admin = kurt</tt></i></td></tr><tr><td><i class="parameter"><tt>hosts deny = 0.0.0.0</tt></i></td></tr><tr><td><i class="parameter"><tt>hosts allow = turbo_xp, 10.160.50.23, 10.160.51.60</tt></i></td></tr></table></div><p> +This special share is only there for testing purposes. It does not write the print job to a file. It just logs the job parameters +known to Samba into the <tt class="filename">/tmp/smbprn.log</tt> file and deletes the jobfile. Moreover, the +<a class="indexterm" name="id2924692"></a><i class="parameter"><tt>printer admin</tt></i> of this share is "kurt" (not the "@ntadmins" group); +guest access is not allowed; the share isn not published to the Network Neighbourhood (so you need to know it is there), and it only +allows access from only three hosts. To prevent CUPS kicking in and taking over the print jobs for that share, we need to set +<a class="indexterm" name="id2924720"></a><i class="parameter"><tt>printing</tt></i> = sysv and +<a class="indexterm" name="id2924733"></a><i class="parameter"><tt>printcap</tt></i> = lpstat. +</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2924750"></a>Advanced Configuration</h2></div></div><div></div></div><p> +Before we delve into all the configuration options, let us clarify a few points. <span class="emphasis"><em>Network printing needs to be organized and setup correctly</em></span>. Often this is not done correctly. Legacy systems -or small LANs in business environments often lack a clear design and -good housekeeping. -</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2954343"></a>Central spooling vs. "Peer-to-Peer" printing</h3></div></div><div></div></div><p> +or small business LAN environments often lack design and good housekeeping. +</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2924770"></a>Central spooling vs. "Peer-to-Peer" printing</h3></div></div><div></div></div><a class="indexterm" name="id2924780"></a><a class="indexterm" name="id2924790"></a><p> Many small office or home networks, as well as badly organized larger environments, allow each client a direct access to available network -printers. Generally, this is a bad idea. It often blocks one client's +printers. This is generally a bad idea. It often blocks one client's access to the printer when another client's job is printing. It also might freeze the first client's application while it is waiting to get rid of the job. Also, there are frequent complaints about various jobs @@ -217,18 +157,18 @@ is the usage of a "print server": it routes all jobs through one central system, which responds immediately, takes jobs from multiple concurrent clients at the same time and in turn transfers them to the printer(s) in the correct order. -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2954370"></a>CUPS/Samba as a "spooling-only" Print Server; "raw" printing -with Vendor Drivers on Windows Clients</h3></div></div><div></div></div><p> -Most traditionally configured Unix print servers acting on behalf of +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2924825"></a>CUPS/Samba as a "spooling-only" Print Server; "raw" printing +with Vendor Drivers on Windows Clients</h3></div></div><div></div></div><a class="indexterm" name="id2924835"></a><a class="indexterm" name="id2924844"></a><p> +Most traditionally configured UNIX print servers acting on behalf of Samba's Windows clients represented a really simple setup. Their only task was to manage the "raw" spooling of all jobs handed to them by Samba. This approach meant that the Windows clients were expected to -prepare the print job file in such a way that it became fit to be fed to -the printing device. Here a native (vendor-supplied) Windows printer +prepare the print job file that it s ready to be sent to the printing +device. Here a native (vendor-supplied) Windows printer driver for the target device needed to be installed on each and every client. </p><p> -Of course you can setup CUPS, Samba and your Windows clients in the +It is possible to configure CUPS, Samba and your Windows clients in the same, traditional and simple way. When CUPS printers are configured for RAW print-through mode operation it is the responsibility of the Samba client to fully render the print job (file). The file must be @@ -236,21 +176,23 @@ sent in a format that is suitable for direct delivery to the printer. Clients need to run the vendor-provided drivers to do this. In this case CUPS will NOT do any print file format conversion work. -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2954406"></a>Driver Installation Methods on Windows Clients</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2924894"></a>Driver Installation Methods on Windows Clients</h3></div></div><div></div></div><p> The printer drivers on the Windows clients may be installed in two functionally different ways: </p><div class="itemizedlist"><ul type="disc"><li><p>manually install the drivers locally on each client, one by one; this yields the old <span class="emphasis"><em>LanMan</em></span> style printing; it uses a <tt class="filename">\\sambaserver\printershare</tt> -type of connection.</p></li><li><p>deposit and prepare the drivers (for later download) on +type of connection.</p></li><li><p> +<a class="indexterm" name="id2924937"></a> + deposit and prepare the drivers (for later download) on the print server (Samba); this enables the clients to use -"Point'n'Print" to get drivers semi-automatically installed the +"Point and Print" to get drivers semi-automatically installed the first time they access the printer; with this method NT/2K/XP clients use the <span class="emphasis"><em>SPOOLSS/MS-RPC</em></span> type printing calls.</p></li></ul></div><p> The second method is recommended for use over the first. -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2954465"></a>Explicitly enable "raw" printing for -<span class="emphasis"><em>application/octet-stream</em></span>!</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2924971"></a>Explicitly enable "raw" printing for +<span class="emphasis"><em>application/octet-stream</em></span>!</h3></div></div><div></div></div><a class="indexterm" name="id2924984"></a><p> If you use the first option (drivers are installed on the client side), there is one setting to take care of: CUPS needs to be told that it should allow "raw" printing of deliberate (binary) file @@ -263,16 +205,12 @@ be uncommented to allow RAW mode operation. In<tt class="filename">/etc/cups/mime.types</tt> make sure this line is present: </p><pre class="screen"> - application/octet-stream - </pre><p> In <tt class="filename">/etc/cups/mime.convs</tt>, have this line: -</p><pre class="screen"> - +</p><a class="indexterm" name="id2925053"></a><pre class="screen"> application/octet-stream application/vnd.cups-raw 0 - - </pre><p> If these two files are not set up correctly for raw Windows client printing, you may encounter the dreaded <tt class="computeroutput">Unable to @@ -281,7 +219,7 @@ convert file 0</tt> in your CUPS error_log file. <tt class="filename">mime.types</tt> file does not <span class="emphasis"><em>enforce</em></span> "raw" printing, it only <span class="emphasis"><em>allows</em></span> it. -</p></div><p><b>Background. </b> +</p></div><p><b>Background. </b><a class="indexterm" name="id2925119"></a> CUPS being a more security-aware printing system than traditional ones does not by default allow a user to send deliberate (possibly binary) data to printing devices. This could be easily abused to launch a @@ -298,7 +236,7 @@ This is all you need to know to get the CUPS/Samba combo printing locally installed. If you are not interested in background information about more advanced CUPS/Samba printing, simply skip the remaining sections of this chapter. -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2954626"></a>Three familiar Methods for driver upload plus a new one</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2925177"></a>Three familiar Methods for driver upload plus a new one</h3></div></div><div></div></div><a class="indexterm" name="id2925185"></a><p> If you want to use the MS-RPC type printing, you must upload the drivers onto the Samba server first (<i class="parameter"><tt>[print$]</tt></i> share). For a discussion on how to deposit printer drivers on the @@ -306,23 +244,25 @@ Samba host (so that the Windows clients can download and use them via "Point'n'Print") please also refer to the previous chapter of this HOWTO Collection. There you will find a description or reference to three methods of preparing the client drivers on the Samba server: -</p><div class="itemizedlist"><ul type="disc"><li><p>the GUI, "Add Printer Wizard" +</p><a class="indexterm" name="id2925224"></a><div class="itemizedlist"><ul type="disc"><li><p>the GUI, "Add Printer Wizard" <span class="emphasis"><em>upload-from-a-Windows-client</em></span> method;</p></li><li><p>the commandline, "smbclient/rpcclient" <span class="emphasis"><em>upload-from-a-UNIX-workstation</em></span> -method;</p></li><li><p>the <span class="emphasis"><em>Imprints</em></span> Toolset +method;</p></li><li><p> +<a class="indexterm" name="id2925264"></a> + the <span class="emphasis"><em>Imprints</em></span> Toolset method.</p></li></ul></div><p> These 3 methods apply to CUPS all the same. A new and more convenient way to load the Windows drivers into Samba is provided -provided if you use CUPS: -</p><div class="itemizedlist"><ul type="disc"><li><p>the <span class="emphasis"><em>cupsaddsmb</em></span> +if you use CUPS: +</p><a class="indexterm" name="id2925285"></a><div class="itemizedlist"><ul type="disc"><li><p>the <span class="emphasis"><em>cupsaddsmb</em></span> utility.</p></li></ul></div><p> cupsaddsmb is discussed in much detail further below. But we will first explore the CUPS filtering system and compare the Windows and UNIX printing architectures. -</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2954719"></a>Using CUPS/Samba in an advanced Way -- intelligent printing -with PostScript Driver Download</h2></div></div><div></div></div><p> -Still reading on? Good. Let's go into more detail then. We now know +</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2925317"></a>Using CUPS/Samba in an advanced Way -- intelligent printing +with PostScript Driver Download</h2></div></div><div></div></div><a class="indexterm" name="id2925326"></a><p> +Are you still following this? Good. Let's go into more detail then. We now know how to set up a "dump" printserver, that is, a server which is spooling printjobs "raw", leaving the print data untouched. </p><p> @@ -343,13 +283,13 @@ server meeting these requirements, you'll first need to learn about how CUPS works and how you can enable its features. </p><p> What follows is the comparison of some fundamental concepts for -Windows and Unix printing; then is the time for a description of the +Windows and UNIX printing; then is the time for a description of the CUPS filtering system, how it works and how you can tweak it. -</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2954794"></a>GDI on Windows -- PostScript on Unix</h3></div></div><div></div></div><p> +</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="gdipost"></a>GDI on Windows -- PostScript on UNIX</h3></div></div><div></div></div><a class="indexterm" name="id2925423"></a><a class="indexterm" name="id2925431"></a><p> Network printing is one of the most complicated and error-prone day-to-day tasks any user or an administrator may encounter. This is true for all OS platforms. And there are reasons for this. -</p><p> +</p><a class="indexterm" name="id2925447"></a><a class="indexterm" name="id2925456"></a><p> You can't expect for most file formats to just throw them towards printers and they get printed. There needs to be a file format conversion in between. The problem is: there is no common standard for @@ -361,7 +301,7 @@ into semi-official "standards", by being the most widely used PDLs many manufacturers who "roll their own" (their reasons may be unacceptable license fees for using printer-embedded PostScript interpreters, etc.). -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2954839"></a>Windows Drivers, GDI and EMF</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2925497"></a>Windows Drivers, GDI and EMF</h3></div></div><div></div></div><a class="indexterm" name="id2925505"></a><a class="indexterm" name="id2925514"></a><a class="indexterm" name="id2925522"></a><p> In Windows OS, the format conversion job is done by the printer drivers. On MS Windows OS platforms all application programmers have at their disposal a built-in API, the GDI (<span class="emphasis"><em>Graphical Device @@ -378,16 +318,17 @@ the GDI, produces often a file format called EMF (<span class="emphasis"><em>Enh MetaFile</em></span>). The EMF is processed by the printer driver and converted to the printer-specific file format. </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> +<a class="indexterm" name="id2925583"></a> To the GDI foundation in MS Windows, Apple has chosen to put paper and screen output on a common foundation for their -(BSD-Unix-based, did you know??) Mac OS X and Darwin Operating -Systems.Their <span class="emphasis"><em>Core Graphic Engine</em></span> uses a -<span class="emphasis"><em>PDF</em></span> derivate for all display work. +(BSD-UNIX-based, did you know??) Mac OS X and Darwin Operating +Systems. Their <span class="emphasis"><em>Core Graphic Engine</em></span> uses a +<span class="emphasis"><em>PDF</em></span> derivative for all display work. </p></div><p> -</p><div class="figure"><a name="id2954904"></a><p class="title"><b>Figure 19.1. Windows Printing to a local Printer</b></p><div class="mediaobject"><img src="projdoc/imagefiles/1small.png" alt="Windows Printing to a local Printer"></div></div><p> -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2954940"></a>Unix Printfile Conversion and GUI Basics</h3></div></div><div></div></div><p> -In Unix and Linux, there is no comparable layer built into the OS +</p><div class="figure"><a name="small1"></a><p class="title"><b>Figure 19.1. Windows Printing to a local Printer</b></p><div class="mediaobject"><img src="projdoc/imagefiles/1small.png" width="270" alt="Windows Printing to a local Printer"></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2925650"></a>UNIX Printfile Conversion and GUI Basics</h3></div></div><div></div></div><a class="indexterm" name="id2925657"></a><a class="indexterm" name="id2925665"></a><a class="indexterm" name="id2925673"></a><a class="indexterm" name="id2925682"></a><p> +In UNIX and Linux, there is no comparable layer built into the OS kernel(s) or the X (screen display) server. Every application is responsible for itself to create its print output. Fortunately, most use PostScript. That gives at least some common ground. Unfortunately, @@ -406,7 +347,7 @@ ready for prime time.) You can see this unfavorable inheritance up to the present day by looking into the various "font" directories on your system; there are separate ones for fonts used for X display and fonts to be used on paper. -</p><p><b>Background. </b> +</p><p><b>Background. </b><a class="indexterm" name="id2925741"></a> The PostScript programming language is an "invention" by Adobe Inc., but its specifications have been published to the full. Its strength lies in its powerful abilities to describe graphical objects (fonts, @@ -422,9 +363,9 @@ form and you will be reading its PostScript code, the language instructions which need to be interpreted by a rasterizer. Rasterizers produce pixel images, which may be displayed on screen by a viewer program or on paper by a printer. -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2955028"></a>PostScript and Ghostscript</h3></div></div><div></div></div><p> -So, Unix is lacking a common ground for printing on paper and -displaying on screen. Despite this unfavorable legacy for Unix, basic +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="post-and-ghost"></a>PostScript and Ghostscript</h3></div></div><div></div></div><a class="indexterm" name="id2925792"></a><a class="indexterm" name="id2925800"></a><a class="indexterm" name="id2925811"></a><p> +So, UNIX is lacking a common ground for printing on paper and +displaying on screen. Despite this unfavorable legacy for UNIX, basic printing is fairly easy: if you have PostScript printers at your disposal! The reason is: these devices have a built-in PostScript language "interpreter", also called a <span class="emphasis"><em>Raster Image @@ -434,33 +375,35 @@ spit out your printed pages. Their RIP is doing all the hard work of converting the PostScript drawing commands into a bitmap picture as you see it on paper, in a resolution as done by your printer. This is no different to PostScript printing of a file from a Windows origin. -</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>Traditional Unix programs and printing systems -- while +</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> +<a class="indexterm" name="id2925853"></a> +Traditional UNIX programs and printing systems -- while using PostScript -- are largely not PPD-aware. PPDs are "PostScript Printer Description" files. They enable you to specify and control all options a printer supports: duplexing, stapling, punching... Therefore -Unix users for a long time couldn't choose many of the supported +UNIX users for a long time couldn't choose many of the supported device and job options, unlike Windows or Apple users. But now there -is CUPS.... ;-) +is CUPS.... </p></div><p> -</p><div class="figure"><a name="id2955075"></a><p class="title"><b>Figure 19.2. Printing to a Postscript Printer</b></p><div class="mediaobject"><img src="projdoc/imagefiles/2small.png" alt="Printing to a Postscript Printer"></div></div><p> -</p><p> + </p><div class="figure"><a name="small2"></a><p class="title"><b>Figure 19.2. Printing to a Postscript Printer</b></p><div class="mediaobject"><img src="projdoc/imagefiles/2small.png" width="270" alt="Printing to a Postscript Printer"></div></div><p> +</p><a class="indexterm" name="id2925928"></a><p> However, there are other types of printers out there. These don't know how to print PostScript. They use their own <span class="emphasis"><em>Page Description Language</em></span> (PDL, often proprietary). To print to them is much -more demanding. Since your Unix applications mostly produce +more demanding. Since your UNIX applications mostly produce PostScript, and since these devices don't understand PostScript, you need to convert the printfiles to a format suitable for your printer on the host, before you can send it away. -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2955125"></a>Ghostscript -- the Software RIP for non-PostScript Printers</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2925951"></a>Ghostscript -- the Software RIP for non-PostScript Printers</h3></div></div><div></div></div><a class="indexterm" name="id2925960"></a><p> Here is where <span class="emphasis"><em>Ghostscript</em></span> kicks in. Ghostscript is the traditional (and quite powerful) PostScript interpreter used on -Unix platforms. It is a RIP in software, capable to do a +UNIX platforms. It is a RIP in software, capable to do a <span class="emphasis"><em>lot</em></span> of file format conversions, for a very broad spectrum of hardware devices as well as software file formats. Ghostscript technology and drivers is what enables PostScript printing to non-PostScript hardware. </p><p> -</p><div class="figure"><a name="id2955155"></a><p class="title"><b>Figure 19.3. Ghostscript as a RIP for non-postscript printers</b></p><div class="mediaobject"><img src="projdoc/imagefiles/3small.png" alt="Ghostscript as a RIP for non-postscript printers"></div></div><p> + </p><div class="figure"><a name="small3"></a><p class="title"><b>Figure 19.3. Ghostscript as a RIP for non-postscript printers</b></p><div class="mediaobject"><img src="projdoc/imagefiles/3small.png" width="270" alt="Ghostscript as a RIP for non-postscript printers"></div></div><p> </p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><p> Use the "gs -h" command to check for all built-in "devices" of your Ghostscript version. If you specify e.g. a parameter of @@ -473,12 +416,12 @@ intervals, now by artofcode LLC. They are initially put under the "AFPL" license, but re-released under the GNU GPL as soon as the next AFPL version appears. GNU Ghostscript is probably the version installed on most Samba systems. But it has got some -deficiencies. Therefore ESP Ghostscript was developed as an +deficiencies. <a class="indexterm" name="id2926066"></a>Therefore ESP Ghostscript was developed as an enhancement over GNU Ghostscript, with lots of bug-fixes, additional devices and improvements. It is jointly maintained by developers from CUPS, Gimp-Print, MandrakeSoft, SuSE, RedHat and Debian. It includes the "cups" device (essential to print to non-PS printers from CUPS). -</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2955238"></a>PostScript Printer Description (PPD) Specification</h3></div></div><div></div></div><p> +</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2926092"></a>PostScript Printer Description (PPD) Specification</h3></div></div><div></div></div><a class="indexterm" name="id2926100"></a><p> While PostScript in essence is a <span class="emphasis"><em>Page Description Language</em></span> (PDL) to represent the page layout in a <span class="emphasis"><em>device independent</em></span> way, real world print jobs are @@ -504,15 +447,16 @@ user selections are somehow written (in the form of special PostScript, PJL, JCL or vendor-dependent commands) into the PostScript file created by the driver. </p><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p> +<a class="indexterm" name="id2926162"></a> A PostScript file that was created to contain device-specific commands for achieving a certain print job output (e.g. duplexed, stapled and punched) on a specific target machine, may not print as expected, or may not be printable at all on other models; it also may not be fit for further processing by software (e.g. by a PDF distilling program). -</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2955308"></a>CUPS can use all Windows-formatted Vendor PPDs</h3></div></div><div></div></div><p> +</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2926179"></a>CUPS can use all Windows-formatted Vendor PPDs</h3></div></div><div></div></div><p> CUPS can handle all spec-compliant PPDs as supplied by the manufacturers for their PostScript models. Even if a -Unix/Linux-illiterate vendor might not have mentioned our favorite +UNIX/Linux-illiterate vendor might not have mentioned our favorite OS in his manuals and brochures -- you can safely trust this: <span class="emphasis"><em>if you get hold of the Windows NT version of the PPD, you can use it unchanged in CUPS</em></span> and thus access the full @@ -524,6 +468,8 @@ immediately. CUPS in all versions after 1.1.19 has a much more strict internal PPD parsing and checking code enabled; in case of printing trouble this online resource should be one of your first pitstops. </p></div><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p> +<a class="indexterm" name="id2926227"></a> +<a class="indexterm" name="id2926235"></a> For real PostScript printers <span class="emphasis"><em>don't</em></span> use the <span class="emphasis"><em>Foomatic</em></span> or <span class="emphasis"><em>cupsomatic</em></span> PPDs from Linuxprinting.org. With these devices the original @@ -536,7 +482,7 @@ your LAN has the PostScript driver installed, just use access the Windows directory where all printer driver files are stored. First look in the <tt class="filename">W32X86/2</tt> subdir for the PPD you are seeking. -</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2955397"></a>CUPS also uses PPDs for non-PostScript Printers</h3></div></div><div></div></div><p> +</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2926285"></a>CUPS also uses PPDs for non-PostScript Printers</h3></div></div><div></div></div><p> CUPS also uses specially crafted PPDs to handle non-PostScript printers. These PPDs are usually not available from the vendors (and no, you can't just take the PPD of a Postscript printer with the same @@ -544,7 +490,7 @@ model name and hope it works for the non-PostScript version too). To understand how these PPDs work for non-PS printers we first need to dive deeply into the CUPS filtering and file format conversion architecture. Stay tuned. -</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2955420"></a>The CUPS Filtering Architecture</h2></div></div><div></div></div><p> +</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2926306"></a>The CUPS Filtering Architecture</h2></div></div><div></div></div><p> The core of the CUPS filtering system is based on <span class="emphasis"><em>Ghostscript</em></span>. In addition to Ghostscript, CUPS uses some other filters of its own. You (or your OS vendor) may have @@ -570,23 +516,27 @@ Make sure your Ghostscript version has the "cups" device compiled in may encounter the dreaded <tt class="computeroutput">Unable to convert file 0</tt> in your CUPS error_log file. To have "cups" as a device in your Ghostscript, you either need to <span class="emphasis"><em>patch GNU -Ghostscript</em></span> and re-compile or use <a href="http://www.cups.org/ghostscript.php" target="_top">ESP Ghostscript</a>. The +Ghostscript</em></span> and re-compile or use <a class="indexterm" name="id2926410"></a><a href="http://www.cups.org/ghostscript.php" target="_top">ESP Ghostscript</a>. The superior alternative is ESP Ghostscript: it supports not just CUPS, but 300 other devices too (while GNU Ghostscript supports only about 180). Because of this broad output device support, ESP Ghostscript is the first choice for non-CUPS spoolers too. It is now recommended by Linuxprinting.org for all spoolers. </p><p> +<a class="indexterm" name="id2926437"></a> +<a class="indexterm" name="id2926446"></a> CUPS printers may be setup to use <span class="emphasis"><em>external</em></span> rendering paths. One of the most common ones is provided by the <span class="emphasis"><em>Foomatic/cupsomatic</em></span> concept, from <a href="http://www.linuxprinting.org/" target="_top">Linuxprinting.org</a>. This uses the classical Ghostscript approach, doing everything in one step. It doesn't use the "cups" device, but one of the many others. However, even for Foomatic/cupsomatic usage, best results and +<a class="indexterm" name="id2926483"></a> broadest printer model support is provided by ESP Ghostscript (more about cupsomatic/Foomatic, particularly the new version called now <span class="emphasis"><em>foomatic-rip</em></span>, follows below). -</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2955560"></a>MIME types and CUPS Filters</h3></div></div><div></div></div><p> +</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2926501"></a>MIME types and CUPS Filters</h3></div></div><div></div></div><p> + <a class="indexterm" name="id2926512"></a> CUPS reads the file <tt class="filename">/etc/cups/mime.types</tt> (and all other files carrying a <tt class="filename">*.types</tt> suffix in the same directory) upon startup. These files contain the MIME @@ -595,10 +545,10 @@ auto-typing routines. The rule syntax is explained in the man page for <tt class="filename">mime.types</tt> and in the comments section of the <tt class="filename">mime.types</tt> file itself. A simple rule reads like this: +</p><p> +<a class="indexterm" name="id2926558"></a> </p><pre class="screen"> - application/pdf pdf string(0,%PDF) - </pre><p> This means: if a filename has either a <tt class="filename">.pdf</tt> suffix, or if the magic @@ -607,9 +557,7 @@ beginning of the file itself (offset 0 from the start), then it is a PDF file (<span class="emphasis"><em>application/pdf</em></span>). Another rule is this: </p><pre class="screen"> - application/postscript ai eps ps string(0,%!) string(0,<04>%!) - </pre><p> Its meaning: if the filename has one of the suffixes <tt class="filename">.ai</tt>, <tt class="filename">.eps</tt>, @@ -639,7 +587,7 @@ CUPS can handle ASCII text, HP-GL, PDF, PostScript, DVI and a lot of image formats (GIF. PNG, TIFF, JPEG, Photo-CD, SUN-Raster, PNM, PBM, SGI-RGB and some more) and their associated MIME types with its filters. -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2955747"></a>MIME type Conversion Rules</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2926707"></a>MIME type Conversion Rules</h3></div></div><div></div></div><a class="indexterm" name="id2926716"></a><p> CUPS reads the file <tt class="filename">/etc/cups/mime.convs</tt> (and all other files named with a <tt class="filename">*.convs</tt> suffix in the same directory) upon startup. These files contain @@ -648,39 +596,31 @@ conversion filter which can produce the output from the input type and virtual costs associated with this conversion. One example line reads like this: </p><pre class="screen"> - application/pdf application/postscript 33 pdftops - </pre><p> This means that the <span class="emphasis"><em>pdftops</em></span> filter will take <span class="emphasis"><em>application/pdf</em></span> as input and produce <span class="emphasis"><em>application/postscript</em></span> as output, the virtual cost of this operation is 33 CUPS-$. The next filter is more expensive, costing 66 CUPS-$: -</p><pre class="screen"> - +</p><a class="indexterm" name="id2926777"></a><pre class="screen"> application/vnd.hp-HPGL application/postscript 66 hpgltops - </pre><p> This is the <span class="emphasis"><em>hpgltops</em></span>, which processes HP-GL plotter files to PostScript. -</p><pre class="screen"> - +</p><a class="indexterm" name="id2926804"></a><pre class="screen"> application/octet-stream - </pre><p> Here are two more examples: -</p><pre class="screen"> - +</p><a class="indexterm" name="id2926827"></a><pre class="screen"> application/x-shell application/postscript 33 texttops text/plain application/postscript 33 texttops - </pre><p> The last two examples name the <span class="emphasis"><em>texttops</em></span> filter to work on "text/plain" as well as on "application/x-shell". (Hint: this differentiation is needed for the syntax highlighting feature of "texttops"). -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2955864"></a>Filter Requirements</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2926862"></a>Filter Requirements</h3></div></div><div></div></div><a class="indexterm" name="id2926870"></a><p> There are many more combinations named in mime.convs. However, you are not limited to use the ones pre-defined there. You can plug in any filter you like into the CUPS framework. It must meet, or must be made @@ -696,13 +636,13 @@ filenames or <tt class="filename">stdin</tt> as input and write to <span class="emphasis"><em>printer job user title copies options [filename]</em></span> </p><div class="variablelist"><dl><dt><span class="term">Printer</span></dt><dd><p>The name of the printer queue (normally this is the name of the filter being run)</p></dd><dt><span class="term">job</span></dt><dd><p>The numeric job ID for the job being -printed</p></dd><dt><span class="term">Printer</span></dt><dd><p>The string from the originating-user-name -attribute</p></dd><dt><span class="term">Printer</span></dt><dd><p>The string from the job-name attribute</p></dd><dt><span class="term">Printer</span></dt><dd><p>The numeric value from the number-copies -attribute</p></dd><dt><span class="term">Printer</span></dt><dd><p>The job options</p></dd><dt><span class="term">Printer</span></dt><dd><p>(Optionally) The print request file (if missing, +printed</p></dd><dt><span class="term">user</span></dt><dd><p>The string from the originating-user-name +attribute</p></dd><dt><span class="term">title</span></dt><dd><p>The string from the job-name attribute</p></dd><dt><span class="term">copies</span></dt><dd><p>The numeric value from the number-copies +attribute</p></dd><dt><span class="term">options</span></dt><dd><p>The job options</p></dd><dt><span class="term">filename</span></dt><dd><p>(Optionally) The print request file (if missing, filters expected data fed through <tt class="filename">stdin</tt>). In most cases it is very easy to write a simple wrapper script around existing -filters to make them work with CUPS.</p></dd></dl></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2956034"></a>Prefilters</h3></div></div><div></div></div><p> -As was said, PostScript is the central file format to any Unix based +filters to make them work with CUPS.</p></dd></dl></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2927043"></a>Prefilters</h3></div></div><div></div></div><a class="indexterm" name="id2927050"></a><p> +As was said, PostScript is the central file format to any UNIX based printing system. From PostScript, CUPS generates raster data to feed non-PostScript printers. </p><p> @@ -719,8 +659,8 @@ MIME type <span class="emphasis"><em>application/vnd.cups-postscript</em></span> (<span class="emphasis"><em>not</em></span> application/postscript), meaning it has the print options already embedded into the file. </p><p> -</p><div class="figure"><a name="id2956084"></a><p class="title"><b>Figure 19.4. Prefiltering in CUPS to form Postscript</b></p><div class="mediaobject"><img src="projdoc/imagefiles/4small.png" alt="Prefiltering in CUPS to form Postscript"></div></div><p> -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2956120"></a>pstops</h3></div></div><div></div></div><p> + </p><div class="figure"><a name="small4"></a><p class="title"><b>Figure 19.4. Prefiltering in CUPS to form Postscript</b></p><div class="mediaobject"><img src="projdoc/imagefiles/4small.png" width="270" alt="Prefiltering in CUPS to form Postscript"></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2927153"></a>pstops</h3></div></div><div></div></div><p> <span class="emphasis"><em>pstops</em></span>is the filter to convert <span class="emphasis"><em>application/postscript</em></span> to <span class="emphasis"><em>application/vnd.cups-postscript</em></span>. It was said @@ -728,7 +668,7 @@ above that this filter inserts all device-specific print options (commands to the printer to ask for the duplexing of output, or stapling an punching it, etc.) into the PostScript file. </p><p> -</p><div class="figure"><a name="id2956149"></a><p class="title"><b>Figure 19.5. Adding Device-specific Print Options</b></p><div class="mediaobject"><img src="projdoc/imagefiles/5small.png" alt="Adding Device-specific Print Options"></div></div><p> + </p><div class="figure"><a name="small5"></a><p class="title"><b>Figure 19.5. Adding Device-specific Print Options</b></p><div class="mediaobject"><img src="projdoc/imagefiles/5small.png" width="270" alt="Adding Device-specific Print Options"></div></div><p> </p><p> This is not all: other tasks performed by it are: </p><div class="itemizedlist"><ul type="disc"><li><p> @@ -740,7 +680,7 @@ putting 2 or more logical pages on one sheet of paper (the so-called "number-up" function) </p></li><li><p>counting the pages of the job to insert the accounting information into the <tt class="filename">/var/log/cups/page_log</tt> -</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2956222"></a>pstoraster</h3></div></div><div></div></div><p> +</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2927264"></a>pstoraster</h3></div></div><div></div></div><p> <span class="emphasis"><em>pstoraster</em></span> is at the core of the CUPS filtering system. It is responsible for the first stage of the rasterization process. Its input is of MIME type application/vnd.cups-postscript; @@ -749,20 +689,20 @@ yet meant to be printable. Its aim is to serve as a general purpose input format for more specialized <span class="emphasis"><em>raster drivers</em></span>, that are able to generate device-specific printer data. </p><p> -</p><div class="figure"><a name="id2956251"></a><p class="title"><b>Figure 19.6. Postscript to intermediate Raster format</b></p><div class="mediaobject"><img src="projdoc/imagefiles/6small.png" alt="Postscript to intermediate Raster format"></div></div><p> + </p><div class="figure"><a name="small6"></a><p class="title"><b>Figure 19.6. Postscript to intermediate Raster format</b></p><div class="mediaobject"><img src="projdoc/imagefiles/6small.png" width="270" alt="Postscript to intermediate Raster format"></div></div><p> </p><p> CUPS raster is a generic raster format with powerful features. It is able to include per-page information, color profiles and more to be used by the following downstream raster drivers. Its MIME type is registered with IANA and its specification is of course completely open. It is designed to make it very easy and inexpensive for -manufacturers to develop Linux and Unix raster drivers for their +manufacturers to develop Linux and UNIX raster drivers for their printer models, should they choose to do so. CUPS always takes care for the first stage of rasterization so these vendors don't need to care about Ghostscript complications (in fact, there is currently more than one vendor financing the development of CUPS raster drivers). </p><p> -</p><div class="figure"><a name="id2956304"></a><p class="title"><b>Figure 19.7. CUPS-raster production using Ghostscript</b></p><div class="mediaobject"><img src="projdoc/imagefiles/7small.png" alt="CUPS-raster production using Ghostscript"></div></div><p> + </p><div class="figure"><a name="small7"></a><p class="title"><b>Figure 19.7. CUPS-raster production using Ghostscript</b></p><div class="mediaobject"><img src="projdoc/imagefiles/7small.png" width="270" alt="CUPS-raster production using Ghostscript"></div></div><p> </p><p> CUPS versions before version 1.1.15 were shipping a binary (or source code) standalone filter, named "pstoraster". pstoraster was derived @@ -776,7 +716,7 @@ integrated back into Ghostscript (now based on GNU Ghostscript version parameter. If your Ghostscript doesn't show a success on asking for <b class="command">gs -h |grep cups</b>, you might not be able to print. Update your Ghostscript then! -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2956377"></a>imagetops and imagetoraster</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2927459"></a>imagetops and imagetoraster</h3></div></div><div></div></div><p> Above in the section about prefilters, we mentioned the prefilter that generates PostScript from image formats. The imagetoraster filter is used to convert directly from image to raster, without the @@ -784,13 +724,13 @@ intermediate PostScript stage. It is used more often than the above mentioned prefilters. Here is a summarizing flowchart of image file filtering: </p><p> -</p><div class="figure"><a name="id2956398"></a><p class="title"><b>Figure 19.8. Image format to CUPS-raster format conversion</b></p><div class="mediaobject"><img src="projdoc/imagefiles/8small.png" alt="Image format to CUPS-raster format conversion"></div></div><p> -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2956434"></a>rasterto [printers specific]</h3></div></div><div></div></div><p> + </p><div class="figure"><a name="small8"></a><p class="title"><b>Figure 19.8. Image format to CUPS-raster format conversion</b></p><div class="mediaobject"><img src="projdoc/imagefiles/8small.png" width="270" alt="Image format to CUPS-raster format conversion"></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2927523"></a>rasterto [printers specific]</h3></div></div><div></div></div><p> CUPS ships with quite some different raster drivers processing CUPS raster. On my system I find in /usr/lib/cups/filter/ these: -<i class="parameter"><tt>rastertoalps, rastertobj, rastertoepson, rastertoescp, -rastertopcl, rastertoturboprint, rastertoapdk, rastertodymo, -rastertoescp, rastertohp</tt></i> and +<i class="parameter"><tt>rastertoalps</tt></i>, <i class="parameter"><tt>rastertobj</tt></i>, <i class="parameter"><tt>rastertoepson</tt></i>, <i class="parameter"><tt>rastertoescp</tt></i>, +<i class="parameter"><tt>rastertopcl</tt></i>, <i class="parameter"><tt>rastertoturboprint</tt></i>, <i class="parameter"><tt>rastertoapdk</tt></i>, <i class="parameter"><tt>rastertodymo</tt></i>, +<i class="parameter"><tt>rastertoescp</tt></i>, <i class="parameter"><tt>rastertohp</tt></i> and <i class="parameter"><tt>rastertoprinter</tt></i>. Don't worry if you have less than this; some of these are installed by commercial add-ons to CUPS (like <i class="parameter"><tt>rastertoturboprint</tt></i>), others (like @@ -798,8 +738,8 @@ than this; some of these are installed by commercial add-ons to CUPS development projects (such as Gimp-Print) wanting to cooperate as closely as possible with CUPS. </p><p> -</p><div class="figure"><a name="id2956484"></a><p class="title"><b>Figure 19.9. Raster to Printer Specific formats</b></p><div class="mediaobject"><img src="projdoc/imagefiles/9small.png" alt="Raster to Printer Specific formats"></div></div><p> -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2956519"></a>CUPS Backends</h3></div></div><div></div></div><p> + </p><div class="figure"><a name="small9"></a><p class="title"><b>Figure 19.9. Raster to Printer Specific formats</b></p><div class="mediaobject"><img src="projdoc/imagefiles/9small.png" width="270" alt="Raster to Printer Specific formats"></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2927675"></a>CUPS Backends</h3></div></div><div></div></div><p> The last part of any CUPS filtering chain is a "backend". Backends are special programs that send the print-ready file to the final device. There is a separate backend program for any transfer @@ -854,7 +794,7 @@ This backend sends printfiles to printers shared by a Windows host. An example for CUPS device-URIs to use are: <tt class="filename">smb://workgroup/server/printersharename</tt> Or -<tt class="filename">Smb://server/printersharename</tt> +<tt class="filename">smb://server/printersharename</tt> or <tt class="filename">smb://username:password@workgroup/server/printersharename</tt> or @@ -880,13 +820,11 @@ printername). Not all of the mentioned backends may be present on your system or usable (depending on your hardware configuration). One test for all available CUPS backends is provided by the <span class="emphasis"><em>lpinfo</em></span> -utility. Used with the <i class="parameter"><tt>-v</tt></i> parameter, it lists +utility. Used with the <tt class="option">-v</tt> parameter, it lists all available backends: </p><pre class="screen"> - - lpinfo -v - -</pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2956831"></a>cupsomatic/Foomatic -- how do they fit into the Picture?</h3></div></div><div></div></div><p> +<tt class="prompt">$ </tt><b class="userinput"><tt>lpinfo -v</tt></b> +</pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2928022"></a>cupsomatic/Foomatic -- how do they fit into the Picture?</h3></div></div><div></div></div><a class="indexterm" name="id2928030"></a><a class="indexterm" name="id2928038"></a><p> "cupsomatic" filters may be the most widely used on CUPS installations. You must be clear about the fact that these were not developed by the CUPS people. They are a "Third Party" add-on to @@ -900,9 +838,7 @@ Printer & Driver Database at Linuxprinting.org. You can recognize these PPDs from the line calling the <span class="emphasis"><em>cupsomatic</em></span> filter: </p><pre class="screen"> - *cupsFilter: "application/vnd.cups-postscript 0 cupsomatic" - </pre><p> This line you may find amongst the first 40 or so lines of the PPD file. If you have such a PPD installed, the printer shows up in the @@ -911,7 +847,7 @@ the driver description. cupsomatic is a Perl script that runs Ghostscript, with all the complicated commandline options auto-constructed from the selected PPD and commandline options give to the printjob. -</p><p> +</p><a class="indexterm" name="id2928111"></a><p> However, cupsomatic is now deprecated. Its PPDs (especially the first generation of them, still in heavy use out there) are not meeting the Adobe specifications. You might also suffer difficulties when you try @@ -936,11 +872,11 @@ print-options from page to page, in the middle of a job. And the best thing is: the new foomatic-rip now works seamlessly with all legacy spoolers too (like LPRng, BSD-LPD, PDQ, PPR etc.), providing for them access to use PPDs for their printing! -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2956944"></a>The Complete Picture</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2928168"></a>The Complete Picture</h3></div></div><div></div></div><p> If you want to see an overview over all the filters and how they relate to each other, the complete picture of the puzzle is at the end of this document. -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2956960"></a><tt class="filename">mime.convs</tt></h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2928183"></a><tt class="filename">mime.convs</tt></h3></div></div><div></div></div><p> CUPS auto-constructs all possible filtering chain paths for any given MIME type, and every printer installed. But how does it decide in favor or against a specific alternative? (There may often be cases, @@ -957,7 +893,7 @@ cost. This is a very efficient way to limit the load of any CUPS server by setting an appropriate "FilterLimit" value. A FilterLimit of 200 allows roughly 1 job at a time, while a FilterLimit of 1000 allows approximately 5 jobs maximum at a time. -</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2957012"></a>"Raw" printing</h3></div></div><div></div></div><p> +</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2928246"></a>"Raw" printing</h3></div></div><div></div></div><p> You can tell CUPS to print (nearly) any file "raw". "Raw" means it will not be filtered. CUPS will send the file to the printer "as is" without bothering if the printer is able to digest it. Users need to @@ -966,9 +902,7 @@ printing can happen on any queue if the "-o raw" option is specified on the command line. You can also set up raw-only queues by simply not associating any PPD with it. This command: </p><pre class="screen"> - - lpadmin -P rawprinter -v socket://11.12.13.14:9100 -E - +<tt class="prompt">$ </tt><b class="userinput"><tt>lpadmin -P rawprinter -v socket://11.12.13.14:9100 -E</tt></b> </pre><p> sets up a queue named "rawprinter", connected via the "socket" protocol (a.k.a. "HP JetDirect") to the device at IP address @@ -980,7 +914,7 @@ CUPS will automatically treat each job sent to a queue as a "raw" one, if it can't find a PPD associated with the queue. However, CUPS will only send known MIME types (as defined in its own mime.types file) and refuse others. -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2957066"></a>"application/octet-stream" printing</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2928335"></a>"application/octet-stream" printing</h3></div></div><div></div></div><p> Any MIME type with no rule in the <tt class="filename">/etc/cups/mime.types</tt> file is regarded as unknown or <span class="emphasis"><em>application/octet-stream</em></span> and will not be @@ -989,9 +923,7 @@ you will probably have experienced the fact that printjobs originating from Windows clients were not printed. You may have found an error message in your CUPS logs like: </p><pre class="screen"> - Unable to convert file 0 to printable format for job - </pre><p> To enable the printing of "application/octet-stream" files, edit these two files: @@ -1000,20 +932,16 @@ Both contain entries (at the end of the respective files) which must be uncommented to allow RAW mode operation for application/octet-stream. In <tt class="filename">/etc/cups/mime.types</tt> make sure this line is present: -</p><pre class="screen"> - +</p><a class="indexterm" name="id2928420"></a><pre class="screen"> application/octet-stream - </pre><p> This line (with no specific auto-typing rule set) makes all files not otherwise auto-typed a member of application/octet-stream. In <tt class="filename">/etc/cups/mime.convs</tt>, have this line: </p><pre class="screen"> - application/octet-stream application/vnd.cups-raw 0 - - -</pre><p> +</pre><a class="indexterm" name="id2928460"></a><p> This line tells CUPS to use the <span class="emphasis"><em>Null Filter</em></span> (denoted as "-", doing... nothing at all) on <span class="emphasis"><em>application/octet-stream</em></span>, and tag the result as @@ -1038,7 +966,7 @@ be one that is known to CUPS and an allowed one. The file recognizes MIME types. The file <tt class="filename">/etc/cups/mime.convs</tt> decides which file conversion filter(s) may be applied to which MIME types. -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2957282"></a>PostScript Printer Descriptions (PPDs) for non-PS Printers</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2928581"></a>PostScript Printer Descriptions (PPDs) for non-PS Printers</h3></div></div><div></div></div><a class="indexterm" name="id2928590"></a><p> Originally PPDs were meant to be used for PostScript printers only. Here, they help to send device-specific commands and settings to the RIP which processes the jobfile. CUPS has extended this @@ -1051,10 +979,8 @@ printers the Ghostscript RIP runs on the host computer. </p><p> PPDs for a non-PS printer have a few lines that are unique to CUPS. The most important one looks similar to this: -</p><pre class="screen"> - +</p><a class="indexterm" name="id2928619"></a><pre class="screen"> *cupsFilter: application/vnd.cups-raster 66 rastertoprinter - </pre><p> It is the last piece in the CUPS filtering puzzle. This line tells the CUPS daemon to use as a last filter "rastertoprinter". This filter @@ -1070,24 +996,12 @@ CUPS by default ships only a few generic PPDs, but they are good for several hundred printer models. You may not be able to control different paper trays, or you may get larger margins than your specific model supports): -</p><div class="variablelist"><dl><dt><span class="term">deskjet.ppd</span></dt><dd><p>older HP inkjet printers and compatible -</p></dd><dt><span class="term">deskjet2.ppd</span></dt><dd><p>newer HP inkjet printers and compatible -</p></dd><dt><span class="term">dymo.ppd</span></dt><dd><p>label printers -</p></dd><dt><span class="term">epson9.ppd</span></dt><dd><p>Epson 24pin impact printers and compatible -</p></dd><dt><span class="term">epson24.ppd</span></dt><dd><p>Epson 24pin impact printers and compatible -</p></dd><dt><span class="term">okidata9.ppd</span></dt><dd><p>Okidata 9pin impact printers and compatible -</p></dd><dt><span class="term">okidat24.ppd</span></dt><dd><p>Okidata 24pin impact printers and compatible -</p></dd><dt><span class="term">stcolor.ppd</span></dt><dd><p>older Epson Stylus Color printers -</p></dd><dt><span class="term">stcolor2.ppd</span></dt><dd><p>newer Epson Stylus Color printers -</p></dd><dt><span class="term">stphoto.ppd</span></dt><dd><p>older Epson Stylus Photo printers -</p></dd><dt><span class="term">stphoto2.ppd</span></dt><dd><p>newer Epson Stylus Photo printers -</p></dd><dt><span class="term">laserjet.ppd</span></dt><dd><p>all PCL printers. Further below is a discussion -of several other driver/PPD-packages suitable fur use with CUPS. -</p></dd></dl></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2957510"></a>Difference between <span class="emphasis"><em>cupsomatic/foomatic-rip</em></span> and -<span class="emphasis"><em>native CUPS</em></span> printing</h3></div></div><div></div></div><p> +</p><div class="table"><a name="id2928665"></a><p class="title"><b>Table 19.1. PPD's shipped with CUPS</b></p><table summary="PPD's shipped with CUPS" border="1"><colgroup><col align="left"><col align="justify"></colgroup><thead><tr><th align="left">PPD file</th><th align="justify">Printer type</th></tr></thead><tbody><tr><td align="left">deskjet.ppd</td><td align="justify">older HP inkjet printers and compatible</td></tr><tr><td align="left">deskjet2.ppd</td><td align="justify">newer HP inkjet printers and compatible </td></tr><tr><td align="left">dymo.ppd</td><td align="justify">label printers </td></tr><tr><td align="left">epson9.ppd</td><td align="justify">Epson 24pin impact printers and compatible </td></tr><tr><td align="left">epson24.ppd</td><td align="justify">Epson 24pin impact printers and compatible </td></tr><tr><td align="left">okidata9.ppd</td><td align="justify">Okidata 9pin impact printers and compatible </td></tr><tr><td align="left">okidat24.ppd</td><td align="justify">Okidata 24pin impact printers and compatible </td></tr><tr><td align="left">stcolor.ppd</td><td align="justify">older Epson Stylus Color printers </td></tr><tr><td align="left">stcolor2.ppd</td><td align="justify">newer Epson Stylus Color printers </td></tr><tr><td align="left">stphoto.ppd</td><td align="justify">older Epson Stylus Photo printers </td></tr><tr><td align="left">stphoto2.ppd</td><td align="justify">newer Epson Stylus Photo printers </td></tr><tr><td align="left">laserjet.ppd</td><td align="justify">all PCL printers. Further below is a discussion of several other driver/PPD-packages suitable for use with CUPS. </td></tr></tbody></table></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2928848"></a>Difference between <span class="emphasis"><em>cupsomatic/foomatic-rip</em></span> and +<span class="emphasis"><em>native CUPS</em></span> printing</h3></div></div><div></div></div><a class="indexterm" name="id2928866"></a><a class="indexterm" name="id2928874"></a><p> Native CUPS rasterization works in two steps. </p><div class="itemizedlist"><ul type="disc"><li><p> First is the "pstoraster" step. It uses the special "cups" +<a class="indexterm" name="id2928898"></a> device from ESP Ghostscript 7.05.x as its tool </p></li><li><p> Second comes the "rasterdriver" step. It uses various @@ -1097,7 +1011,7 @@ Shareware/Non-Free, some are proprietary.</p></li></ul></div><p> Often this produces better quality (and has several more advantages) than other methods. </p><p> -</p><div class="figure"><a name="id2957561"></a><p class="title"><b>Figure 19.10. cupsomatic/foomatic processing versus Native CUPS</b></p><div class="mediaobject"><img src="projdoc/imagefiles/10small.png" alt="cupsomatic/foomatic processing versus Native CUPS"></div></div><p> + </p><div class="figure"><a name="small10"></a><p class="title"><b>Figure 19.10. cupsomatic/foomatic processing versus Native CUPS</b></p><div class="mediaobject"><img src="projdoc/imagefiles/10small.png" width="270" alt="cupsomatic/foomatic processing versus Native CUPS"></div></div><p> </p><p> One other method is the <span class="emphasis"><em>cupsomatic/foomatic-rip</em></span> way. Note that cupsomatic is <span class="emphasis"><em>not</em></span> made by the CUPS @@ -1111,6 +1025,8 @@ other (non-CUPS) spoolers. An upgrade to foomatic-rip is strongly advised, especially if you are upgrading to a recent version of CUPS too. </p><p> + <a class="indexterm" name="id2929012"></a> + <a class="indexterm" name="id2929021"></a> Both the cupsomatic (old) and the foomatic-rip (new) methods from Linuxprinting.org use the traditional Ghostscript print file processing, doing everything in a single step. It therefore relies on @@ -1132,7 +1048,7 @@ installation: Therefore the printfile bypasses the "pstoraster" filter cupsomatic hands the rendered file directly to the CUPS backend. The flowchart above illustrates the difference between native CUPS rendering and the Foomatic/cupsomatic method. -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2957666"></a>Examples for filtering Chains</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2929083"></a>Examples for filtering Chains</h3></div></div><div></div></div><p> Here are a few examples of commonly occurring filtering chains to illustrate the workings of CUPS. </p><p> @@ -1152,10 +1068,8 @@ PPD) into the new PostScript file; the file now is of PostScript MIME type <span class="emphasis"><em>application/vnd.cups-postscript</em></span>;</p></li><li><p>the file goes to the <span class="emphasis"><em>socket</em></span> backend, which transfers the job to the printers.</p></li></ul></div><p> -The resulting filter chain therefore is: -</p><pre class="screen"> -pdftops --> pstops --> socket -</pre><p> + The resulting filter chain therefore is as drawn in <a href="CUPS-printing.html#pdftosocket" title="Figure 19.11. PDF to socket chain">the image below</a>. +</p><div class="figure"><a name="pdftosocket"></a><p class="title"><b>Figure 19.11. PDF to socket chain</b></p><div class="mediaobject"><img src="projdoc/imagefiles/pdftosocket.png" width="270" alt="PDF to socket chain"></div></div><p> Assume your want to print the same filter to an USB-connected Epson Stylus Photo printer, installed with the CUPS <tt class="filename">stphoto2.ppd</tt>. The first few filtering stages @@ -1179,45 +1093,43 @@ does its work (as is indicated in the printer's PPD), creating the printer-specific raster data and embedding any user-selected print-options into the print data stream;</p></li><li><p>the file goes to the <span class="emphasis"><em>usb</em></span> backend, which transfers the job to the printers.</p></li></ul></div><p> -The resulting filter chain therefore is: -</p><pre class="screen"> -pdftops --> pstops --> pstoraster --> rastertoepson --> usb -</pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2957897"></a>Sources of CUPS drivers / PPDs</h3></div></div><div></div></div><p> + The resulting filter chain therefore is as drawn in <a href="CUPS-printing.html#pdftoepsonusb" title="Figure 19.12. PDF to USB chain">the image below</a>. +</p><div class="figure"><a name="pdftoepsonusb"></a><p class="title"><b>Figure 19.12. PDF to USB chain</b></p><div class="mediaobject"><img src="projdoc/imagefiles/pdftoepsonusb.png" width="270" alt="PDF to USB chain"></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2929420"></a>Sources of CUPS drivers / PPDs</h3></div></div><div></div></div><p> On the internet you can find now many thousand CUPS-PPD files (with their companion filters), in many national languages, supporting more than 1000 non-PostScript models. -</p><div class="itemizedlist"><ul type="disc"><li><p><a href="http://wwwl.easysw.com/printpro/" target="_top">ESP -PrintPro (http://wwwl.easysw.com/printpro/)</a> (commercial, +</p><div class="itemizedlist"><a class="indexterm" name="id2929436"></a><a class="indexterm" name="id2929448"></a><ul type="disc"><li><p><a href="http://wwwl.easysw.com/printpro/" target="_top">ESP +PrintPro</a> (commercial, non-Free) is packaged with more than 3000 PPDs, ready for successful use "out of the box" on Linux, Mac OS X, IBM-AIX, -HP-UX, Sun-Solaris, SGI-IRIX, Compaq Tru64, Digital Unix and some +HP-UX, Sun-Solaris, SGI-IRIX, Compaq Tru64, Digital UNIX and some more commercial Unices (it is written by the CUPS developers themselves and its sales help finance the further development of CUPS, as they feed their creators).</p></li><li><p>the <a href="http://gimp-print.sourceforge.net/" target="_top">Gimp-Print-Project -(http://gimp-print.sourceforge.net/)</a> (GPL, Free Software) +</a> (GPL, Free Software) provides around 140 PPDs (supporting nearly 400 printers, many driven to photo quality output), to be used alongside the Gimp-Print CUPS filters;</p></li><li><p><a href="http://www.turboprint.com/" target="_top">TurboPrint -(http://www.turboprint.com/)</a> (Shareware, non-Free) supports +</a> (Shareware, non-Free) supports roughly the same amount of printers in excellent quality;</p></li><li><p><a href="http://www-124.ibm.com/developerworks/oss/linux/projects/omni/" target="_top">OMNI -(http://www-124.ibm.com/developerworks/oss/linux/projects/omni/)</a> +</a> (LPGL, Free) is a package made by IBM, now containing support for more than 400 printers, stemming from the inheritance of IBM OS/2 Know-How ported over to Linux (CUPS support is in a Beta-stage at present);</p></li><li><p><a href="http://hpinkjet.sourceforge.net/" target="_top">HPIJS -(http://hpinkjet.sourceforge.net/)</a> (BSD-style licenses, Free) +</a> (BSD-style licenses, Free) supports around 150 of HP's own printers and is also providing excellent print quality now (currently available only via the Foomatic path);</p></li><li><p><a href="http://www.linuxprinting.org/" target="_top">Foomatic/cupsomatic -(http://www.linuxprinting.org/)</a> (LPGL, Free) from +</a> (LPGL, Free) from Linuxprinting.org are providing PPDs for practically every Ghostscript filter known to the world (including Omni, Gimp-Print and HPIJS).</p></li></ul></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> The cupsomatic/Foomatic trick from Linuxprinting.org works differently from the other drivers. This is explained elsewhere in this document. -</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2958024"></a>Printing with Interface Scripts</h3></div></div><div></div></div><p> +</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2929572"></a>Printing with Interface Scripts</h3></div></div><div></div></div><p> CUPS also supports the usage of "interface scripts" as known from System V AT&T printing systems. These are often used for PCL printers, from applications that generate PCL print jobs. Interface @@ -1230,61 +1142,60 @@ realm. On HP-UX platforms they are more often used. You can use any working interface script on CUPS too. Just install the printer with the <b class="command">-i</b> option: </p><pre class="screen"> - - lpadmin -p pclprinter -v socket://11.12.13.14:9100 -i /path/to/interface-script - +<tt class="prompt">root# </tt><b class="userinput"><tt>lpadmin -p pclprinter -v socket://11.12.13.14:9100 \ + -i /path/to/interface-script</tt></b> </pre><p> Interface scripts might be the "unknown animal" to many. However, with CUPS they provide the most easy way to plug in your own custom-written filtering script or program into one specific print queue (some information about the traditional usage of interface scripts is to be found at <a href="http://playground.sun.com/printing/documentation/interface.html" target="_top">http://playground.sun.com/printing/documentation/interface.html</a>). -</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2958100"></a>Network printing (purely Windows)</h2></div></div><div></div></div><p> +</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2929667"></a>Network printing (purely Windows)</h2></div></div><div></div></div><p> Network printing covers a lot of ground. To understand what exactly goes on with Samba when it is printing on behalf of its Windows clients, let's first look at a "purely Windows" setup: Windows clients with a Windows NT print server. -</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2958116"></a>From Windows Clients to an NT Print Server</h3></div></div><div></div></div><p> +</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2929677"></a>From Windows Clients to an NT Print Server</h3></div></div><div></div></div><p> Windows clients printing to an NT-based print server have two options. They may -</p><div class="itemizedlist"><ul type="disc"><li><p>execute the driver locally and render the GDI output +</p><a class="indexterm" name="id2929699"></a><a class="indexterm" name="id2929707"></a><div class="itemizedlist"><ul type="disc"><li><p>execute the driver locally and render the GDI output (EMF) into the printer specific format on their own, or</p></li><li><p>send the GDI output (EMF) to the server, where the driver is executed to render the printer specific output.</p></li></ul></div><p> Both print paths are shown in the flowcharts below. -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2958155"></a>Driver Execution on the Client</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2929741"></a>Driver Execution on the Client</h3></div></div><div></div></div><p> In the first case the print server must spool the file as "raw", meaning it shouldn't touch the jobfile and try to convert it in any -way. This is what traditional Unix-based print server can do too; and +way. This is what traditional UNIX-based print server can do too; and at a better performance and more reliably than NT print server. This is what most Samba administrators probably are familiar with. One advantage of this setup is that this "spooling-only" print server may -be used even if no driver(s) for Unix are available it is sufficient +be used even if no driver(s) for UNIX are available it is sufficient to have the Windows client drivers available and installed on the clients. </p><p> -</p><div class="figure"><a name="id2958191"></a><p class="title"><b>Figure 19.11. Print Driver execution on the Client</b></p><div class="mediaobject"><img src="projdoc/imagefiles/11small.png" alt="Print Driver execution on the Client"></div></div><p> -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2958227"></a>Driver Execution on the Server</h3></div></div><div></div></div><p> + </p><div class="figure"><a name="small11"></a><p class="title"><b>Figure 19.13. Print Driver execution on the Client</b></p><div class="mediaobject"><img src="projdoc/imagefiles/11small.png" width="270" alt="Print Driver execution on the Client"></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2929818"></a>Driver Execution on the Server</h3></div></div><div></div></div><a class="indexterm" name="id2929822"></a><a class="indexterm" name="id2929831"></a><a class="indexterm" name="id2929839"></a><a class="indexterm" name="id2929847"></a><a class="indexterm" name="id2929855"></a><p> The other path executes the printer driver on the server. The clients transfers print files in EMF format to the server. The server uses the PostScript, PCL, ESC/P or other driver to convert the EMF file into -the printer-specific language. It is not possible for Unix to do the +the printer-specific language. It is not possible for UNIX to do the same. Currently there is no program or method to convert a Windows -client's GDI output on a Unix server into something a printer could +client's GDI output on a UNIX server into something a printer could understand. </p><p> -</p><div class="figure"><a name="id2958249"></a><p class="title"><b>Figure 19.12. Print Driver execution on the Server</b></p><div class="mediaobject"><img src="projdoc/imagefiles/12small.png" alt="Print Driver execution on the Server"></div></div><p> + </p><div class="figure"><a name="small12"></a><p class="title"><b>Figure 19.14. Print Driver execution on the Server</b></p><div class="mediaobject"><img src="projdoc/imagefiles/12small.png" width="270" alt="Print Driver execution on the Server"></div></div><p> </p><p> However, there is something similar possible with CUPS. Read on... -</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2958289"></a>Network Printing (Windows clients -- UNIX/Samba Print +</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2929936"></a>Network Printing (Windows clients -- UNIX/Samba Print Servers)</h2></div></div><div></div></div><p> Since UNIX print servers <span class="emphasis"><em>cannot</em></span> execute the Win32 program code on their platform, the picture is somewhat different. However, this doesn't limit your options all that much. In the contrary, you may have a way here to implement printing features which are not possible otherwise. -</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2958310"></a>From Windows Clients to a CUPS/Samba Print Server</h3></div></div><div></div></div><p> +</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2929956"></a>From Windows Clients to a CUPS/Samba Print Server</h3></div></div><div></div></div><p> Here is a simple recipe showing how you can take advantage of CUPS powerful features for the benefit of your Windows network printing clients: @@ -1296,12 +1207,11 @@ printer is a non-PostScript model. It also requires that you have a "driver" on the CUPS server. </p><p> Firstly, to enable CUPS based printing through Samba the -following options should be set in your <tt class="filename">smb.conf</tt> file [globals] +following options should be set in your <tt class="filename">smb.conf</tt> file [global] section: -</p><div class="itemizedlist"><ul type="disc"><li><p><i class="parameter"><tt>printing = CUPS</tt></i></p></li><li><p><i class="parameter"><tt>printcap = CUPS</tt></i></p></li></ul></div><p> +</p><div class="itemizedlist"><ul type="disc"><li><p><a class="indexterm" name="id2930017"></a><i class="parameter"><tt>printing</tt></i> = cups</p></li><li><p><a class="indexterm" name="id2930035"></a><i class="parameter"><tt>printcap</tt></i> = cups</p></li></ul></div><p> When these parameters are specified, all manually set print directives -(like <i class="parameter"><tt>print command =...</tt></i>, or <i class="parameter"><tt>lppause -command =...</tt></i>) in <tt class="filename">smb.conf</tt> (as well as +(like <a class="indexterm" name="id2930055"></a><i class="parameter"><tt>print command</tt></i>, or <a class="indexterm" name="id2930069"></a><i class="parameter"><tt>lppause command</tt></i>) in <tt class="filename">smb.conf</tt> (as well as in samba itself) will be ignored. Instead, Samba will directly interface with CUPS through it's application program interface (API) - as long as Samba has been compiled with CUPS library (libcups) @@ -1310,12 +1220,12 @@ other print commands are set up, then printing will use the <span class="emphasis"><em>System V</em></span> AT&T command set, with the -oraw option automatically passing through (if you want your own defined print commands to work with a Samba that has CUPS support compiled in, -simply use <i class="parameter"><tt>printing = sysv</tt></i>). +simply use <a class="indexterm" name="id2930107"></a><i class="parameter"><tt>printing</tt></i> = sysv). </p><p> -</p><div class="figure"><a name="id2958439"></a><p class="title"><b>Figure 19.13. Printing via CUPS/samba server</b></p><div class="mediaobject"><img src="projdoc/imagefiles/13small.png" alt="Printing via CUPS/samba server"></div></div><p> -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2958474"></a>Samba receiving Jobfiles and passing them to CUPS</h3></div></div><div></div></div><p> +</p><div class="figure"><a name="small13"></a><p class="title"><b>Figure 19.15. Printing via CUPS/samba server</b></p><div class="mediaobject"><img src="projdoc/imagefiles/13small.png" width="270" alt="Printing via CUPS/samba server"></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2930169"></a>Samba receiving Jobfiles and passing them to CUPS</h3></div></div><div></div></div><p> Samba <span class="emphasis"><em>must</em></span> use its own spool directory (it is set -by a line similar to <i class="parameter"><tt>path = /var/spool/samba</tt></i>, +by a line similar to <a class="indexterm" name="id2930184"></a><i class="parameter"><tt>path</tt></i> = /var/spool/samba, in the <i class="parameter"><tt>[printers]</tt></i> or <i class="parameter"><tt>[printername]</tt></i> section of <tt class="filename">smb.conf</tt>). Samba receives the job in its own @@ -1331,8 +1241,8 @@ A Windows user authenticates only to Samba (by whatever means is configured). If Samba runs on the same host as CUPS, you only need to allow "localhost" to print. If they run on different machines, you need to make sure the Samba host gets access to printing on CUPS. -</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2958550"></a>Network PostScript RIP: CUPS Filters on Server -- clients use -PostScript Driver with CUPS-PPDs</h2></div></div><div></div></div><p> +</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2930255"></a>Network PostScript RIP: CUPS Filters on Server -- clients use +PostScript Driver with CUPS-PPDs</h2></div></div><div></div></div><a class="indexterm" name="id2930265"></a><a class="indexterm" name="id2930273"></a><a class="indexterm" name="id2930282"></a><p> PPDs can control all print device options. They are usually provided by the manufacturer; if you own a PostScript printer, that is. PPD files (PostScript Printer Descriptions) are always a component of @@ -1351,7 +1261,7 @@ or see if you have lphelp on your system). There are also some different GUI frontends on Linux/UNIX, which can present PPD options to users. PPD options are normally meant to be evaluated by the PostScript RIP on the real PostScript printer. -</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2958605"></a>PPDs for non-PS Printers on UNIX</h3></div></div><div></div></div><p> +</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2930344"></a>PPDs for non-PS Printers on UNIX</h3></div></div><div></div></div><a class="indexterm" name="id2930352"></a><p> CUPS doesn't limit itself to "real" PostScript printers in its usage of PPDs. The CUPS developers have extended the scope of the PPD concept, to also describe available device and driver options for @@ -1368,7 +1278,7 @@ the supplied PostScript. Thus CUPS lets all its printers appear as PostScript devices to its clients, because it can act as a PostScript RIP for those printers, processing the received PostScript code into a proper raster print format. -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2958646"></a>PPDs for non-PS Printers on Windows</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2930400"></a>PPDs for non-PS Printers on Windows</h3></div></div><div></div></div><a class="indexterm" name="id2930408"></a><p> CUPS-PPDs can also be used on Windows-Clients, on top of a "core" PostScript driver (now recommended is the "CUPS PostScript Driver for WindowsNT/2K/XP"; you can also use the Adobe one, with @@ -1384,13 +1294,13 @@ which always remain unfiltered per definition;</p></li><li><p>enable clients to driver, even for many different target printers.</p></li></ul></div><p> Using CUPS PPDs on Windows clients enables these to control all print job settings just as a UNIX client can do too. -</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2958712"></a>Windows Terminal Servers (WTS) as CUPS Clients</h2></div></div><div></div></div><p> +</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2930476"></a>Windows Terminal Servers (WTS) as CUPS Clients</h2></div></div><div></div></div><p> This setup may be of special interest to people experiencing major problems in WTS environments. WTS need often a multitude of non-PostScript drivers installed to run their clients' variety of different printer models. This often imposes the price of much increased instability. -</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2958729"></a>Printer Drivers running in "Kernel Mode" cause many +</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2930493"></a>Printer Drivers running in "Kernel Mode" cause many Problems</h3></div></div><div></div></div><p> The reason is that in Win NT printer drivers run in "Kernel Mode", this introduces a high risk for the stability of the system @@ -1404,10 +1314,10 @@ of Death" on a regular basis? PostScript drivers generally are very well tested. They are not known to cause any problems, even though they run in Kernel Mode too. This might be because there have so far only been 2 different PostScript -drivers the ones from Adobe and the one from Microsoft. Both are +drivers: the ones from Adobe and the one from Microsoft. Both are very well tested and are as stable as you ever can imagine on Windows. The CUPS driver is derived from the Microsoft one. -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2958763"></a>Workarounds impose Heavy Limitations</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2930538"></a>Workarounds impose Heavy Limitations</h3></div></div><div></div></div><p> In many cases, in an attempt to work around this problem, site administrators have resorted to restrict the allowed drivers installed on their WTS to one generic PCL- and one PostScript driver. This @@ -1415,7 +1325,7 @@ however restricts the clients in the amount of printer options available for them; often they can't get out more than simplex prints from one standard paper tray, while their devices could do much better, if driven by a different driver! ) -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2958784"></a>CUPS: a "Magical Stone"?</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2930560"></a>CUPS: a "Magical Stone"?</h3></div></div><div></div></div><a class="indexterm" name="id2930569"></a><a class="indexterm" name="id2930577"></a><p> Using a PostScript driver, enabled with a CUPS-PPD, seems to be a very elegant way to overcome all these shortcomings. There are, depending on the version of Windows OS you use, up to 3 different PostScript @@ -1427,8 +1337,8 @@ is a certain price for this too: a CUPS server acting as a PostScript RIP for its clients requires more CPU and RAM than when just acting as a "raw spooling" device. Plus, this setup is not yet widely tested, although the first feedbacks look very promising. -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2958811"></a>PostScript Drivers with no major problems -- even in Kernel -Mode</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2930614"></a>PostScript Drivers with no major problems -- even in Kernel +Mode</h3></div></div><div></div></div><a class="indexterm" name="id2930623"></a><p> More recent printer drivers on W2K and XP don't run in Kernel mode (unlike Win NT) any more. However, both operating systems can still use the NT drivers, running in Kernel mode (you can roughly tell which @@ -1444,14 +1354,14 @@ development efforts. This is what the CUPS people have done. The license doesn't allow them to publish the whole of the source code. However, they have released the "diff" under the GPL, and if you are owner of an "MS DDK for Win NT", you can check the driver yourself. -</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2958865"></a> Setting up CUPS for driver Download</h2></div></div><div></div></div><p> +</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2930637"></a>Setting up CUPS for driver Download</h2></div></div><div></div></div><p> As we have said before: all previously known methods to prepare client printer drivers on the Samba server for download and "Point'n'Print" convenience of Windows workstations are working with CUPS too. These methods were described in the previous chapter. In reality, this is a pure Samba business, and only relates to the Samba/Win client relationship. -</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2958884"></a><span class="emphasis"><em>cupsaddsmb</em></span>: the unknown Utility</h3></div></div><div></div></div><p> +</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2930710"></a><span class="emphasis"><em>cupsaddsmb</em></span>: the unknown Utility</h3></div></div><div></div></div><a class="indexterm" name="id2930721"></a><p> The cupsaddsmb utility (shipped with all current CUPS versions) is an alternative method to transfer printer drivers into the Samba <i class="parameter"><tt>[print$]</tt></i> share. Remember, this share is where @@ -1476,53 +1386,26 @@ job-billing)</p></li></ul></div><p> However, currently only Windows NT, 2000, and XP are supported by the CUPS drivers. You will need to get the respective part of Adobe driver too if you need to support Windows 95, 98, and ME clients. -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2958976"></a>Prepare your <tt class="filename">smb.conf</tt> for -cupsaddsmb</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2930811"></a>Prepare your <tt class="filename">smb.conf</tt> for cupsaddsmb</h3></div></div><div></div></div><p> Prior to running cupsaddsmb, you need the following settings in <tt class="filename">smb.conf</tt>: -</p><pre class="screen"> - - [global] - load printers = yes - printing = cups - printcap name = cups - - [printers] - comment = All Printers - path = /var/spool/samba - browseable = no - public = yes - guest ok = yes # setting depends on your requirements - writable = no - printable = yes - printer admin = root - - [print$] - comment = Printer Drivers - path = /etc/samba/drivers - browseable = yes - guest ok = no - read only = yes - write list = root - -</pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2959022"></a>CUPS Package of "PostScript Driver for WinNT/2k/XP"</h3></div></div><div></div></div><p> -CUPS users may get the exactly same packages from<a href="http://www.cups.org/software.html" target="_top"><span class="emphasis"><em>http://www.cups.org/software.html</em></span></a>. +</p><div class="example"><a name="id2930838"></a><p class="title"><b>Example 19.3. smb.conf for cupsaddsmb usage</b></p><table class="simplelist" border="0" summary="Simple list"><tr><td> </td></tr><tr><td><i class="parameter"><tt>[global]</tt></i></td></tr><tr><td><i class="parameter"><tt>load printers = yes</tt></i></td></tr><tr><td><i class="parameter"><tt>printing = cups</tt></i></td></tr><tr><td><i class="parameter"><tt>printcap name = cups</tt></i></td></tr><tr><td> </td></tr><tr><td><i class="parameter"><tt>[printers]</tt></i></td></tr><tr><td><i class="parameter"><tt>comment = All Printers</tt></i></td></tr><tr><td><i class="parameter"><tt>path = /var/spool/samba</tt></i></td></tr><tr><td><i class="parameter"><tt>browseable = no</tt></i></td></tr><tr><td><i class="parameter"><tt>public = yes</tt></i></td></tr><tr><td># setting depends on your requirements</td></tr><tr><td><i class="parameter"><tt>guest ok = yes</tt></i></td></tr><tr><td><i class="parameter"><tt>writable = no</tt></i></td></tr><tr><td><i class="parameter"><tt>printable = yes</tt></i></td></tr><tr><td><i class="parameter"><tt>printer admin = root</tt></i></td></tr><tr><td> </td></tr><tr><td><i class="parameter"><tt>[print$]</tt></i></td></tr><tr><td><i class="parameter"><tt>comment = Printer Drivers</tt></i></td></tr><tr><td><i class="parameter"><tt>path = /etc/samba/drivers</tt></i></td></tr><tr><td><i class="parameter"><tt>browseable = yes</tt></i></td></tr><tr><td><i class="parameter"><tt>guest ok = no</tt></i></td></tr><tr><td><i class="parameter"><tt>read only = yes</tt></i></td></tr><tr><td><i class="parameter"><tt>write list = root</tt></i></td></tr></table></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2931030"></a>CUPS Package of "PostScript Driver for WinNT/2k/XP"</h3></div></div><div></div></div><a class="indexterm" name="id2931040"></a><p> +CUPS users may get the exactly same packages from <a href="http://www.cups.org/software.html" target="_top">http://www.cups.org/software.html</a>. It is a separate package from the CUPS base software files, tagged as -<span class="emphasis"><em>CUPS 1.1.x Windows NT/2k/XP Printer Driver for SAMBA +<span class="emphasis"><em>CUPS 1.1.x Windows NT/2k/XP Printer Driver for Samba (tar.gz, 192k)</em></span>. The filename to download is <tt class="filename">cups-samba-1.1.x.tar.gz</tt>. Upon untar-/unzip-ing, it will reveal these files: </p><pre class="screen"> - -# tar xvzf cups-samba-1.1.19.tar.gz - - cups-samba.install - cups-samba.license - cups-samba.readme - cups-samba.remove - cups-samba.ss - +<tt class="prompt">root# </tt><b class="userinput"><tt>tar xvzf cups-samba-1.1.19.tar.gz</tt></b> +cups-samba.install +cups-samba.license +cups-samba.readme +cups-samba.remove +cups-samba.ss </pre><p> +<a class="indexterm" name="id2931102"></a> +<a class="indexterm" name="id2931113"></a> These have been packaged with the ESP meta packager software "EPM". The <tt class="filename">*.install</tt> and <tt class="filename">*.remove</tt> files are simple shell scripts, which @@ -1532,26 +1415,20 @@ too). Then it puts the content into <tt class="filename">/usr/share/cups/drivers/</tt>. This content includes 3 files: </p><pre class="screen"> - -# tar tv cups-samba.ss - - cupsdrvr.dll - cupsui.dll - cups.hlp - +<tt class="prompt">root# </tt><b class="userinput"><tt>tar tv cups-samba.ss</tt></b> +cupsdrvr.dll +cupsui.dll +cups.hlp </pre><p> The <span class="emphasis"><em>cups-samba.install</em></span> shell scripts is easy to handle: </p><pre class="screen"> - -# ./cups-samba.install - - [....] - Installing software... - Updating file permissions... - Running post-install commands... - Installation is complete. - +<tt class="prompt">root# </tt><b class="userinput"><tt>./cups-samba.install</tt></b> +[....] +Installing software... +Updating file permissions... +Running post-install commands... +Installation is complete. </pre><p> The script should automatically put the driver files into the <tt class="filename">/usr/share/cups/drivers/</tt> directory. @@ -1564,10 +1441,8 @@ copy/move the file (after running the <b class="command">./cups-samba.install</b> script) manually to the right place. </p></div><pre class="screen"> - - cp /usr/share/drivers/cups.hlp /usr/share/cups/drivers/ - -</pre><p> +<tt class="prompt">root# </tt><b class="userinput"><tt>cp /usr/share/drivers/cups.hlp /usr/share/cups/drivers/</tt></b> +</pre><a class="indexterm" name="id2931290"></a><p> This new CUPS PostScript driver is currently binary-only, but free of charge. No complete source code is provided (yet). The reason is this: it has been developed with the help of the <span class="emphasis"><em>Microsoft Driver @@ -1576,42 +1451,27 @@ Studio 6. Driver developers are not allowed to distribute the whole of the source code as Free Software. However, CUPS developers released the "diff" in source code under the GPL, so anybody with a license of Visual Studio and a DDK will be able to compile for him/herself. -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2959220"></a>Recognize the different Driver Files</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2931268"></a>Recognize the different Driver Files</h3></div></div><div></div></div><p> The CUPS drivers don't support the "older" Windows 95/98/ME, but only the Windows NT/2000/XP client: -</p><pre class="screen"> - - [Windows NT, 2000, and XP are supported by:] - cups.hlp - cupsdrvr.dll - cupsui.dll - -</pre><p> +</p><p>Windows NT, 2000, and XP are supported by:</p><p> + </p><div class="itemizedlist"><ul type="disc"><li><p>cups.hlp</p></li><li><p>cupsdrvr.dll</p></li><li><p>cupsui.dll</p></li></ul></div><p> +</p><p> Adobe drivers are available for the older Windows 95/98/ME as well as the Windows NT/2000/XP clients. The set of files is different for the different platforms. -</p><pre class="screen"> - - [Windows 95, 98, and Me are supported by:] - ADFONTS.MFM - ADOBEPS4.DRV - ADOBEPS4.HLP - DEFPRTR2.PPD - ICONLIB.DLL - PSMON.DLL - - [Windows NT, 2000, and XP are supported by:] - ADOBEPS5.DLL - ADOBEPSU.DLL - ADOBEPSU.HLP +</p><p>Windows 95, 98, and Me are supported by:</p><p> + </p><div class="itemizedlist"><ul type="disc"><li><p>ADFONTS.MFM</p></li><li><p>ADOBEPS4.DRV</p></li><li><p>ADOBEPS4.HLP</p></li><li><p>DEFPRTR2.PPD</p></li><li><p>ICONLIB.DLL</p></li><li><p>PSMON.DLL</p></li></ul></div><p> +</p><p>Windows NT, 2000, and XP are supported by:</p><p> +</p><div class="itemizedlist"><ul type="disc"><li><p>ADOBEPS5.DLL</p></li><li><p>ADOBEPSU.DLL</p></li><li><p>ADOBEPSU.HLP</p></li></ul></div><p> -</pre><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> +</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> If both, the Adobe driver files and the CUPS driver files for the support of WinNT/2k/XP are present in , the Adobe ones will be ignored and the CUPS ones will be used. If you prefer -- for whatever reason -- to use Adobe-only drivers, move away the 3 CUPS driver files. The Win95/98/ME clients use the Adobe drivers in any case. -</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2959278"></a>Acquiring the Adobe Driver Files</h3></div></div><div></div></div><p> +</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2931460"></a>Acquiring the Adobe Driver Files</h3></div></div><div></div></div><p> Acquiring the Adobe driver files seems to be unexpectedly difficult for many users. They are not available on the Adobe website as single files and the self-extracting and/or self-installing Windows-exe is @@ -1624,12 +1484,12 @@ Generic PostScript printer. After this, the client's where you can get them with smbclient from the CUPS host. A more detailed description about this is in the next (the CUPS printing) chapter. -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2959310"></a>ESP Print Pro Package of "PostScript Driver for -WinNT/2k/XP"</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2931493"></a>ESP Print Pro Package of "PostScript Driver for +WinNT/2k/XP"</h3></div></div><div></div></div><a class="indexterm" name="id2931506"></a><p> Users of the ESP Print Pro software are able to install their "Samba Drivers" package for this purpose with no problem. Retrieve the driver files from the normal download area of the ESP Print Pro software -at<a href="http://www.easysw.com/software.html" target="_top">http://www.easysw.com/software.html</a>. +at <a href="http://www.easysw.com/software.html" target="_top">http://www.easysw.com/software.html</a>. You need to locate the link labelled "SAMBA" amongst the <span class="emphasis"><em>Download Printer Drivers for ESP Print Pro 4.x</em></span> area and download the package. Once installed, you can prepare any @@ -1640,7 +1500,7 @@ driver files; i.e. mainly setup the <i class="parameter"><tt>[print$]</tt></i> share, etc. The ESP Print Pro package includes the CUPS driver files as well as a (licensed) set of Adobe drivers for the Windows 95/98/ME client family. -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2959360"></a>Caveats to be considered</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2931562"></a>Caveats to be considered</h3></div></div><div></div></div><a class="indexterm" name="id2931572"></a><p> Once you have run the install script (and possibly manually moved the <tt class="filename">cups.hlp</tt> file to <tt class="filename">/usr/share/cups/drivers/</tt>), the driver is @@ -1651,6 +1511,7 @@ tree with <span class="emphasis"><em>WIN40</em></span> and "cupsaddsmb" (see also <b class="command">man cupsaddsmb</b> for CUPS since release 1.1.16). </p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><p> +<a class="indexterm" name="id2931636"></a> You may need to put root into the smbpasswd file by running <b class="command">smbpasswd</b>; this is especially important if you should run this whole procedure for the first time, and are not @@ -1672,6 +1533,7 @@ installations in the <tt class="filename">/usr/share/cups/drivers/</tt> directory. The new <span class="emphasis"><em>cupsaddsmb</em></span> (from 1.1.16) will automatically prefer "its own" drivers if it finds both. </p></li><li><p> +<a class="indexterm" name="id2931734"></a> Should your Win clients have had the old <tt class="filename">ADOBE*.*</tt> files for the Adobe PostScript driver installed, the download and installation of the new CUPS PostScript driver for Windows NT/2k/XP @@ -1679,8 +1541,7 @@ will fail at first. You need to wipe the old driver from the clients first. It is not enough to "delete" the printer, as the driver files will still be kept by the clients and re-used if you try to re-install the printer. To really get rid of the Adobe driver files on the -clients, open the "Printers" folder (possibly via <span class="emphasis"><em>Start ---> Settings --> Control Panel --> Printers</em></span>), +clients, open the "Printers" folder (possibly via <span class="emphasis"><em>Start, Settings, Control Panel, Printers</em></span>), right-click onto the folder background and select <span class="emphasis"><em>Server Properties</em></span>. When the new dialog opens, select the <span class="emphasis"><em>Drivers</em></span> tab. On the list select the driver you @@ -1690,20 +1551,23 @@ which uses that particular driver. You need to "delete" all printers using this driver in the "Printers" folder first. You will need Administrator privileges to do this. </p></li><li><p> +<a class="indexterm" name="id2931795"></a> Once you have successfully downloaded the CUPS PostScript driver to a client, you can easily switch all printers to this one by proceeding -as described elsewhere in the "Samba HOWTO Collection": either change +as described in <a href="printing.html" title="Chapter 18. Classical Printing Support">the printing chapter</a>: either change a driver for an existing printer by running the "Printer Properties" dialog, or use <b class="command">rpcclient</b> with the <b class="command">setdriver</b> sub-command. </p></li></ol></div><p> -</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2959582"></a>What are the Benefits of using the "CUPS PostScript Driver for -Windows NT/2k/XP" as compared to the Adobe Driver?</h3></div></div><div></div></div><p> +</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2931837"></a>Benefits of using "CUPS PostScript Driver for +Windows NT/2k/XP" instead of Adobe Driver</h3></div></div><div></div></div><p> You are interested in a comparison between the CUPS and the Adobe PostScript drivers? For our purposes these are the most important items which weigh in favor of the CUPS ones: </p><div class="itemizedlist"><ul type="disc"><li><p>no hassle with the Adobe EULA</p></li><li><p>no hassle with the question “<span class="quote">Where do I -get the ADOBE*.* driver files from?</span>”</p></li><li><p>the Adobe drivers (on request of the printer PPD +get the ADOBE*.* driver files from?</span>”</p></li><li><p> +<a class="indexterm" name="id2931878"></a> + the Adobe drivers (on request of the printer PPD associated with them) often put a PJL header in front of the main PostScript part of the print file. Thus the printfile starts with <i class="parameter"><tt><1B >%-12345X</tt></i> or @@ -1712,8 +1576,10 @@ of <i class="parameter"><tt>%!PS</tt></i>). This leads to the CUPS daemon auto-typing the incoming file as a print-ready file, not initiating a pass through the "pstops" filter (to speak more technically, it is not regarded as the generic MIME type +<a class="indexterm" name="id2931916"></a> <span class="emphasis"><em>application/postscript</em></span>, but as the more special MIME type +<a class="indexterm" name="id2931930"></a> <span class="emphasis"><em>application/cups.vnd-postscript</em></span>), which therefore also leads to the page accounting in <span class="emphasis"><em>/var/log/cups/page_log</em></span> not @@ -1743,7 +1609,7 @@ not disturb any other applications as they will regard it as a comment and simply ignore it).</p></li><li><p>the CUPS PostScript driver will be the heart of the fully fledged CUPS IPP client for Windows NT/2K/XP to be released soon (probably alongside the first Beta release for CUPS -1.2).</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2959764"></a>Run "cupsaddsmb" (quiet Mode)</h3></div></div><div></div></div><p> +1.2).</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2932052"></a>Run "cupsaddsmb" (quiet Mode)</h3></div></div><div></div></div><a class="indexterm" name="id2932062"></a><a class="indexterm" name="id2932070"></a><p> The cupsaddsmb command copies the needed files into your <i class="parameter"><tt>[print$]</tt></i> share. Additionally, the PPD associated with this printer is copied from @@ -1752,124 +1618,111 @@ associated with this printer is copied from Windows client installations via Point'n'Print. Before we can run the command successfully, we need to be sure that we can authenticate towards Samba. If you have a small network you are probably using user -level security (<i class="parameter"><tt>security = user</tt></i>). Probably your -root has already a Samba account. Otherwise, create it now, using -<b class="command">smbpasswd</b>: -</p><pre class="screen"> - - # smbpasswd -a root - New SMB password: [type in password 'secret'] - Retype new SMB password: [type in password 'secret'] - -</pre><p> +level security (<a class="indexterm" name="id2932107"></a><i class="parameter"><tt>security</tt></i> = user). +</p><p> Here is an example of a successfully run cupsaddsmb command. </p><pre class="screen"> - - # cupsaddsmb -U root infotec_IS2027 - Password for root required to access localhost via SAMBA: [type in password 'secret'] - +<tt class="prompt">root# </tt><b class="userinput"><tt>cupsaddsmb -U root infotec_IS2027</tt></b> +Password for root required to access localhost via Samba: <b class="userinput"><tt>['secret']</tt></b> </pre><p> To share <span class="emphasis"><em>all</em></span> printers and drivers, use the -<i class="parameter"><tt>-a</tt></i> parameter instead of a printer name. Since +<tt class="option">-a</tt> parameter instead of a printer name. Since cupsaddsmb "exports" the printer drivers to Samba, it should be obvious that it only works for queues with a CUPS driver associated. -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2959865"></a>Run "cupsaddsmb" with verbose Output</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2932180"></a>Run "cupsaddsmb" with verbose Output</h3></div></div><div></div></div><a class="indexterm" name="id2932188"></a><p> Probably you want to see what's going on. Use the -<i class="parameter"><tt>-v</tt></i> parameter to get a more verbose output. The +<tt class="option">-v</tt> parameter to get a more verbose output. The output below was edited for better readability: all "\" at the end of a line indicate that I inserted an artificial line break plus some indentation here: </p><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p> You will see the root password for the Samba account printed on -screen. If you use remote access, the password will go over the wire -unencrypted! -</p></div><pre class="screen"> - - # cupsaddsmb -U root -v infotec_2105 - Password for root required to access localhost via SAMBA: - Running command: smbclient //localhost/print\$ -N -U'root%secret' -c 'mkdir W32X86;put \ - /var/spool/cups/tmp/3e98bf2d333b5 W32X86/infotec_2105.ppd;put \ - /usr/share/cups/drivers/cupsdrvr.dll W32X86/cupsdrvr.dll;put \ - /usr/share/cups/drivers/cupsui.dll W32X86/cupsui.dll;put \ - /usr/share/cups/drivers/cups.hlp W32X86/cups.hlp' - added interface ip=10.160.51.60 bcast=10.160.51.255 nmask=255.255.252.0 - Domain=[CUPS-PRINT] OS=[Unix] Server=[Samba 2.2.7a] - NT_STATUS_OBJECT_NAME_COLLISION making remote directory \W32X86 - putting file /var/spool/cups/tmp/3e98bf2d333b5 as \W32X86/infotec_2105.ppd (2328.8 kb/s) \ - (average 2328.8 kb/s) - putting file /usr/share/cups/drivers/cupsdrvr.dll as \W32X86/cupsdrvr.dll (9374.3 kb/s) \ - (average 5206.6 kb/s) - putting file /usr/share/cups/drivers/cupsui.dll as \W32X86/cupsui.dll (8107.2 kb/s) \ - (average 5984.1 kb/s) - putting file /usr/share/cups/drivers/cups.hlp as \W32X86/cups.hlp (3475.0 kb/s) \ - (average 5884.7 kb/s) +screen. +</p></div><a class="indexterm" name="id2932223"></a><a class="indexterm" name="id2932234"></a><pre class="screen"> +<tt class="prompt">root# </tt><b class="userinput"><tt>cupsaddsmb -U root -v infotec_2105</tt></b> +Password for root required to access localhost via GANDALF: +Running command: smbclient //localhost/print\$ -N -U'root%secret' \ + -c 'mkdir W32X86; \ + put /var/spool/cups/tmp/3e98bf2d333b5 W32X86/infotec_2105.ppd; \ + put /usr/share/cups/drivers/cupsdrvr.dll W32X86/cupsdrvr.dll; \ + put /usr/share/cups/drivers/cupsui.dll W32X86/cupsui.dll; \ + put /usr/share/cups/drivers/cups.hlp W32X86/cups.hlp' +added interface ip=10.160.51.60 bcast=10.160.51.255 nmask=255.255.252.0 +Domain=[CUPS-PRINT] OS=[UNIX] Server=[Samba 2.2.7a] +NT_STATUS_OBJECT_NAME_COLLISION making remote directory \W32X86 +putting file /var/spool/cups/tmp/3e98bf2d333b5 as \W32X86/infotec_2105.ppd +putting file /usr/share/cups/drivers/cupsdrvr.dll as \W32X86/cupsdrvr.dll +putting file /usr/share/cups/drivers/cupsui.dll as \W32X86/cupsui.dll +putting file /usr/share/cups/drivers/cups.hlp as \W32X86/cups.hlp - Running command: rpcclient localhost -N -U'root%secret' -c 'adddriver "Windows NT x86" \ - "infotec_2105:cupsdrvr.dll:infotec_2105.ppd:cupsui.dll:cups.hlp:NULL: \ - RAW:NULL"' - cmd = adddriver "Windows NT x86" "infotec_2105:cupsdrvr.dll:infotec_2105.ppd:cupsui.dll: \ - cups.hlp:NULL:RAW:NULL" - Printer Driver infotec_2105 successfully installed. +Running command: rpcclient localhost -N -U'root%secret' + -c 'adddriver "Windows NT x86" \ + "infotec_2105:cupsdrvr.dll:infotec_2105.ppd:cupsui.dll:cups.hlp:NULL: \ + RAW:NULL"' +cmd = adddriver "Windows NT x86" \ + "infotec_2105:cupsdrvr.dll:infotec_2105.ppd:cupsui.dll:cups.hlp:NULL:RAW:NULL" +Printer Driver infotec_2105 successfully installed. - Running command: smbclient //localhost/print\$ -N -U'root%secret' -c 'mkdir WIN40;put \ - /var/spool/cups/tmp/3e98bf2d333b5 WIN40/infotec_2105.PPD; put \ - /usr/share/cups/drivers/ADFONTS.MFM WIN40/ADFONTS.MFM;put \ - /usr/share/cups/drivers/ADOBEPS4.DRV WIN40/ADOBEPS4.DRV;put \ - /usr/share/cups/drivers/ADOBEPS4.HLP WIN40/ADOBEPS4.HLP;put \ - /usr/share/cups/drivers/DEFPRTR2.PPD WIN40/DEFPRTR2.PPD;put \ - /usr/share/cups/drivers/ICONLIB.DLL - WIN40/ICONLIB.DLL;put /usr/share/cups/drivers/PSMON.DLL WIN40/PSMON.DLL;' +Running command: smbclient //localhost/print\$ -N -U'root%secret' \ +-c 'mkdir WIN40; \ + put /var/spool/cups/tmp/3e98bf2d333b5 WIN40/infotec_2105.PPD; \ + put /usr/share/cups/drivers/ADFONTS.MFM WIN40/ADFONTS.MFM; \ + put /usr/share/cups/drivers/ADOBEPS4.DRV WIN40/ADOBEPS4.DRV; \ + put /usr/share/cups/drivers/ADOBEPS4.HLP WIN40/ADOBEPS4.HLP; \ + put /usr/share/cups/drivers/DEFPRTR2.PPD WIN40/DEFPRTR2.PPD; \ + put /usr/share/cups/drivers/ICONLIB.DLL WIN40/ICONLIB.DLL; \ + put /usr/share/cups/drivers/PSMON.DLL WIN40/PSMON.DLL;' added interface ip=10.160.51.60 bcast=10.160.51.255 nmask=255.255.252.0 - Domain=[CUPS-PRINT] OS=[Unix] Server=[Samba 2.2.7a] + Domain=[CUPS-PRINT] OS=[UNIX] Server=[Samba 2.2.7a] NT_STATUS_OBJECT_NAME_COLLISION making remote directory \WIN40 - putting file /var/spool/cups/tmp/3e98bf2d333b5 as \WIN40/infotec_2105.PPD (2328.8 kb/s) \ - (average 2328.8 kb/s) - putting file /usr/share/cups/drivers/ADFONTS.MFM as \WIN40/ADFONTS.MFM (9368.0 kb/s) \ - (average 6469.6 kb/s) - putting file /usr/share/cups/drivers/ADOBEPS4.DRV as \WIN40/ADOBEPS4.DRV (9958.2 kb/s) \ - (average 8404.3 kb/s) - putting file /usr/share/cups/drivers/ADOBEPS4.HLP as \WIN40/ADOBEPS4.HLP (8341.5 kb/s) \ - (average 8398.6 kb/s) - putting file /usr/share/cups/drivers/DEFPRTR2.PPD as \WIN40/DEFPRTR2.PPD (2195.9 kb/s) \ - (average 8254.3 kb/s) - putting file /usr/share/cups/drivers/ICONLIB.DLL as \WIN40/ICONLIB.DLL (8239.9 kb/s) \ - (average 8253.6 kb/s) - putting file /usr/share/cups/drivers/PSMON.DLL as \WIN40/PSMON.DLL (6222.2 kb/s) \ - (average 8188.5 kb/s) + putting file /var/spool/cups/tmp/3e98bf2d333b5 as \WIN40/infotec_2105.PPD + putting file /usr/share/cups/drivers/ADFONTS.MFM as \WIN40/ADFONTS.MFM + putting file /usr/share/cups/drivers/ADOBEPS4.DRV as \WIN40/ADOBEPS4.DRV + putting file /usr/share/cups/drivers/ADOBEPS4.HLP as \WIN40/ADOBEPS4.HLP + putting file /usr/share/cups/drivers/DEFPRTR2.PPD as \WIN40/DEFPRTR2.PPD + putting file /usr/share/cups/drivers/ICONLIB.DLL as \WIN40/ICONLIB.DLL + putting file /usr/share/cups/drivers/PSMON.DLL as \WIN40/PSMON.DLL - Running command: rpcclient localhost -N -U'root%secret' -c 'adddriver "Windows 4.0" \ - "infotec_2105:ADOBEPS4.DRV:infotec_2105.PPD:NULL:ADOBEPS4.HLP: \ - PSMON.DLL:RAW:ADOBEPS4.DRV,infotec_2105.PPD,ADOBEPS4.HLP,PSMON.DLL, \ - ADFONTS.MFM,DEFPRTR2.PPD,ICONLIB.DLL"' + Running command: rpcclient localhost -N -U'root%secret' \ + -c 'adddriver "Windows 4.0" \ + "infotec_2105:ADOBEPS4.DRV:infotec_2105.PPD:NULL:ADOBEPS4.HLP: \ + PSMON.DLL:RAW:ADOBEPS4.DRV,infotec_2105.PPD,ADOBEPS4.HLP,PSMON.DLL, \ + ADFONTS.MFM,DEFPRTR2.PPD,ICONLIB.DLL"' cmd = adddriver "Windows 4.0" "infotec_2105:ADOBEPS4.DRV:infotec_2105.PPD:NULL: \ - ADOBEPS4.HLP:PSMON.DLL:RAW:ADOBEPS4.DRV,infotec_2105.PPD,ADOBEPS4.HLP, \ + ADOBEPS4.HLP:PSMON.DLL:RAW:ADOBEPS4.DRV,infotec_2105.PPD,ADOBEPS4.HLP, \ PSMON.DLL,ADFONTS.MFM,DEFPRTR2.PPD,ICONLIB.DLL" Printer Driver infotec_2105 successfully installed. - Running command: rpcclient localhost -N -U'root%secret' \ - -c 'setdriver infotec_2105 infotec_2105' + Running command: rpcclient localhost -N -U'root%secret' \ + -c 'setdriver infotec_2105 infotec_2105' cmd = setdriver infotec_2105 infotec_2105 Successfully set infotec_2105 to driver infotec_2105. </pre><p> -If you look closely, you'll discover your root password was transfered +If you look closely, you'll discover your root password was transferred unencrypted over the wire, so beware! Also, if you look further her, you'll discover error messages like NT_STATUS_OBJECT_NAME_COLLISION in between. They occur, because the directories WIN40 and W32X86 already existed in the <i class="parameter"><tt>[print$]</tt></i> driver download share (from a previous driver installation). They are harmless here. -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2960092"></a>Understanding cupsaddsmb</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2932401"></a>Understanding cupsaddsmb</h3></div></div><div></div></div><a class="indexterm" name="id2932410"></a><p> What has happened? What did cupsaddsmb do? There are five stages of the procedure -</p><div class="orderedlist"><ol type="1"><li><p>call the CUPS server via IPP and request the +</p><div class="orderedlist"><ol type="1"><li><p> + <a class="indexterm" name="id2932438"></a> + call the CUPS server via IPP and request the driver files and the PPD file for the named printer;</p></li><li><p>store the files temporarily in the local TEMPDIR (as defined in <tt class="filename">cupsd.conf</tt>);</p></li><li><p>connect via smbclient to the Samba server's <i class="parameter"><tt>[print$]</tt></i> share and put the files into the share's WIN40 (for Win95/98/ME) and W32X86/ (for WinNT/2k/XP) sub - directories;</p></li><li><p>connect via rpcclient to the Samba server and + directories;</p></li><li><p> +<a class="indexterm" name="id2932482"></a> + connect via rpcclient to the Samba server and execute the "adddriver" command with the correct -parameters;</p></li><li><p>connect via rpcclient to the Samba server a second +parameters;</p></li><li><p> +<a class="indexterm" name="id2932501"></a> + connect via rpcclient to the Samba server a second time and execute the "setdriver" command.</p></li></ol></div><p> Note, that you can run the cupsaddsmb utility with parameters to specify one remote host as Samba host and a second remote host as CUPS @@ -1878,10 +1731,8 @@ good idea try it and see more clearly what is going on (though in real life most people will have their CUPS and Samba servers run on the same host): </p><pre class="screen"> - - # cupsaddsmb -H sambaserver -h cupsserver -v printername - -</pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2960186"></a>How to recognize if cupsaddsm completed successfully</h3></div></div><div></div></div><p> +<tt class="prompt">root# </tt><b class="userinput"><tt>cupsaddsmb -H sambaserver -h cupsserver -v printername</tt></b> +</pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2932551"></a>How to recognize if cupsaddsmb completed successfully</h3></div></div><div></div></div><p> You <span class="emphasis"><em>must</em></span> always check if the utility completed successfully in all fields. You need as a minimum these 3 messages amongst the output: @@ -1892,7 +1743,7 @@ installed.</em></span> # (for the WIN40 == Win9x/ME architecture...)</p></li><li><p><span class="emphasis"><em>Successfully set [printerXPZ] to driver [printerXYZ].</em></span></p></li></ol></div><p> These messages probably not easily recognized in the general -output. If you run cupsaddsmb with the <i class="parameter"><tt>-a</tt></i> +output. If you run cupsaddsmb with the <tt class="option">-a</tt> parameter (which tries to prepare <span class="emphasis"><em>all</em></span> active CUPS printer drivers for download), you might miss if individual printers drivers had problems to install properly. Here a redirection of the @@ -1902,32 +1753,30 @@ It is impossible to see any diagnostic output if you don't run cupsaddsmb in verbose mode. Therefore we strongly recommend to not use the default quiet mode. It will hide any problems from you which might occur. -</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2960273"></a>cupsaddsmb with a Samba PDC</h3></div></div><div></div></div><p> +</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2932633"></a>cupsaddsmb with a Samba PDC</h3></div></div><div></div></div><a class="indexterm" name="id2932642"></a><p> You can't get the standard cupsaddsmb command to run on a Samba PDC? You are asked for the password credential all over again and again and the command just will not take off at all? Try one of these variations: </p><pre class="screen"> - - # cupsaddsmb -U DOMAINNAME\\root -v printername - # cupsaddsmb -H SAMBA-PDC -U DOMAINNAME\\root -v printername - # cupsaddsmb -H SAMBA-PDC -U DOMAINNAME\\root -h cups-server -v printername - +<tt class="prompt">root# </tt><b class="userinput"><tt>cupsaddsmb -U MIDEARTH\\root -v printername</tt></b> +<tt class="prompt">root# </tt><b class="userinput"><tt>cupsaddsmb -H SAURON -U MIDEARTH\\root -v printername</tt></b> +<tt class="prompt">root# </tt><b class="userinput"><tt>cupsaddsmb -H SAURON -U MIDEARTH\\root -h cups-server -v printername</tt></b> </pre><p> (Note the two backslashes: the first one is required to "escape" the second one). -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2960308"></a>cupsaddsmb Flowchart</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2932714"></a>cupsaddsmb Flowchart</h3></div></div><div></div></div><a class="indexterm" name="id2932722"></a><p> Here is a chart about the procedures, commandflows and dataflows of the "cupaddsmb" command. Note again: cupsaddsmb is not intended to, and does not work with, "raw" queues! </p><p> -</p><div class="figure"><a name="id2960326"></a><p class="title"><b>Figure 19.14. cupsaddsmb flowchart</b></p><div class="mediaobject"><img src="projdoc/imagefiles/1small.png" alt="cupsaddsmb flowchart"></div></div><p> -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2960361"></a>Installing the PostScript Driver on a Client</h3></div></div><div></div></div><p> + </p><div class="figure"><a name="small14"></a><p class="title"><b>Figure 19.16. cupsaddsmb flowchart</b></p><div class="mediaobject"><img src="projdoc/imagefiles/14small.png" width="270" alt="cupsaddsmb flowchart"></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2932789"></a>Installing the PostScript Driver on a Client</h3></div></div><div></div></div><a class="indexterm" name="id2932796"></a><p> After cupsaddsmb completed, your driver is prepared for the clients to use. Here are the steps you must perform to download and install it via "Point'n'Print". From a Windows client, browse to the CUPS/Samba server; -</p><div class="itemizedlist"><ul type="disc"><li><p>open the <span class="emphasis"><em>Printers</em></span> +</p><div class="itemizedlist"><a class="indexterm" name="id2932816"></a><ul type="disc"><li><p>open the <span class="emphasis"><em>Printers</em></span> share of Samba in Network Neighbourhood;</p></li><li><p>right-click on the printer in question;</p></li><li><p>from the opening context-menu select <span class="emphasis"><em>Install...</em></span> or @@ -1942,6 +1791,7 @@ an application like Winword, the new printer will appears in a <tt class="filename">\\SambaServer\PrinterName</tt> entry in the dropdown list of available printers. </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> +<a class="indexterm" name="id2932893"></a> cupsaddsmb will only reliably work with CUPS version 1.1.15 or higher and Samba from 2.2.4. If it doesn't work, or if the automatic printer driver download to the clients doesn't succeed, you can still manually @@ -1949,16 +1799,14 @@ install the CUPS printer PPD on top of the Adobe PostScript driver on clients. Then point the client's printer queue to the Samba printer share for a UNC type of connection: </p></div><pre class="screen"> - - net use lpt1: \\sambaserver\printershare /user:ntadmin - +<tt class="prompt">C:\> </tt><b class="userinput"><tt>net use lpt1: \\sambaserver\printershare /user:ntadmin</tt></b> </pre><p> should you desire to use the CUPS networked PostScript RIP functions. (Note that user "ntadmin" needs to be a valid Samba user with the required privileges to access the printershare) This would set up the printer connection in the traditional <span class="emphasis"><em>LanMan</em></span> way (not using MS-RPC). -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2960474"></a>Avoiding critical PostScript Driver Settings on the +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2932953"></a>Avoiding critical PostScript Driver Settings on the Client</h3></div></div><div></div></div><p> Soooo: printing works, but there are still problems. Most jobs print well, some don't print at all. Some jobs have problems with fonts, @@ -1984,7 +1832,7 @@ get a printout at all) (Adobe)</p></li><li><p>Sometimes you can choose <span cla Level</em></span>: in case of problems try <span class="emphasis"><em>2</em></span> instead of <span class="emphasis"><em>3</em></span> (the latest ESP Ghostscript package handles Level 3 PostScript very well) (Adobe).</p></li><li><p>Say <span class="emphasis"><em>Yes</em></span> to <span class="emphasis"><em>PostScript -Error Handler</em></span> (Adobe)</p></li></ul></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2960608"></a>Installing PostScript Driver Files manually (using +Error Handler</em></span> (Adobe)</p></li></ul></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2933086"></a>Installing PostScript Driver Files manually (using rpcclient)</h2></div></div><div></div></div><p> Of course you can run all the commands which are embedded into the cupsaddsmb convenience utility yourself, one by one, and hereby upload @@ -1992,9 +1840,18 @@ and prepare the driver files for future client downloads. </p><div class="orderedlist"><ol type="1"><li><p>prepare Samba (a CUPS printqueue with the name of the printer should be there. We are providing the driver now);</p></li><li><p>copy all files to -<i class="parameter"><tt>[print$]:</tt></i></p></li><li><p>run <b class="command">rpcclient adddriver</b> -(for each client architecture you want to support):</p></li><li><p>run <b class="command">rpcclient + <i class="parameter"><tt>[print$]</tt></i></p></li><li><p> +<a class="indexterm" name="id2933136"></a> + run <b class="command">rpcclient adddriver</b> +(for each client architecture you want to support):</p></li><li><p> +<a class="indexterm" name="id2933160"></a> + run <b class="command">rpcclient setdriver.</b></p></li></ol></div><p> +<a class="indexterm" name="id2933182"></a> +<a class="indexterm" name="id2933193"></a> +<a class="indexterm" name="id2933204"></a> +<a class="indexterm" name="id2933215"></a> +<a class="indexterm" name="id2933226"></a> We are going to do this now. First, read the man page on "rpcclient" to get a first idea. Look at all the printing related sub-commands. <b class="command">enumprinters</b>, @@ -2005,7 +1862,7 @@ the MS-RPC protocol. You can use it to query (and command) a Win NT (or 2K/XP) PC too. MS-RPC is used by Windows clients, amongst other things, to benefit from the "Point'n'Print" features. Samba can now mimic this too. -</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2960723"></a>A Check of the rpcclient man Page</h3></div></div><div></div></div><p> +</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2933288"></a>A Check of the rpcclient man Page</h3></div></div><div></div></div><p> First let's have a little check of the rpcclient man page. Here are two relevant passages: </p><p> @@ -2038,18 +1895,16 @@ printer driver associated with an installed printer. The printer driver must already be correctly installed on the print server. </p><p> See also the enumprinters and enumdrivers commands for obtaining a list of installed printers and drivers. -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2960836"></a>Understanding the rpcclient man Page</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2933403"></a>Understanding the rpcclient man page</h3></div></div><div></div></div><p> The <span class="emphasis"><em>exact</em></span> format isn't made too clear by the man page, since you have to deal with some parameters containing spaces. Here is a better description for it. We have line-broken the command and indicated the breaks with "\". Usually you would type the command in one line without the linebreaks: -</p><pre class="screen"> - +</p><a class="indexterm" name="id2933427"></a><pre class="screen"> adddriver "Architecture" \ "LongPrinterName:DriverFile:DataFile:ConfigFile:HelpFile:\ LanguageMonitorFile:DataType:ListOfFiles,Comma-separated" - </pre><p> What the man pages denotes as a simple <config> keyword, does in reality consist of 8 colon-separated fields. The @@ -2074,22 +1929,22 @@ box now, and access it from a UNIX workstation. We will query it with <b class="command">rpcclient</b> to see what it tells us and try to understand the man page more clearly which we've read just now. -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2960925"></a>Producing an Example by querying a Windows Box</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2933506"></a>Producing an Example by querying a Windows Box</h3></div></div><div></div></div><p> + <a class="indexterm" name="id2933518"></a> + <a class="indexterm" name="id2933528"></a> We could run <b class="command">rpcclient</b> with a <b class="command">getdriver</b> or a <b class="command">getprinter</b> subcommand (in level 3 verbosity) against it. Just sit down at UNIX or Linux workstation with the Samba utilities installed. Then type the following command: </p><pre class="screen"> - - rpcclient -U'USERNAME%PASSWORD' NT-SERVER-NAME -c 'getdriver printername 3' - +<tt class="prompt">root# </tt><b class="userinput"><tt>rpcclient -U'USERNAME%PASSWORD' NT-SERVER-NAME -c 'getdriver printername 3'</tt></b> </pre><p> From the result it should become clear which is which. Here is an example from my installation: -</p><pre class="screen"> - -# rpcclient -U'Danka%xxxx' W2KSERVER -c'getdriver "DANKA InfoStream Virtual Printer" 3' +</p><a class="indexterm" name="id2933591"></a><pre class="screen"> +<tt class="prompt">root# </tt><b class="userinput"><tt>rpcclient -U'Danka%xxxx' W2KSERVER \ + -c'getdriver "DANKA InfoStream Virtual Printer" 3'</tt></b> cmd = getdriver "DANKA InfoStream Virtual Printer" 3 [Windows NT x86] @@ -2119,15 +1974,16 @@ Some printer drivers list additional files under the label <span class="emphasis"><em>ListOfFiles,Comma-separated</em></span>. For the CUPS PostScript drivers we don't need any (nor would we for the Adobe PostScript driver): therefore the field will get a "NULL" entry. -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2961015"></a>What is required for adddriver and setdriver to succeed</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2933674"></a>What is required for adddriver and setdriver to succeed</h3></div></div><div></div></div><p> From the manpage (and from the quoted output of <span class="emphasis"><em>cupsaddsmb</em></span>, above) it becomes clear that you need to have certain conditions in order to make the manual uploading and initializing of the driver files succeed. The two rpcclient +<a class="indexterm" name="id2933693"></a> subcommands (<b class="command">adddriver</b> and <b class="command">setdriver</b>) need to encounter the following pre-conditions to complete successfully: -</p><div class="itemizedlist"><ul type="disc"><li><p>you are connected as "printer admin", or root (note, +</p><div class="itemizedlist"><ul type="disc"><li><p>you are connected as <a class="indexterm" name="id2933728"></a><i class="parameter"><tt>printer admin</tt></i>, or root (note, that this is <span class="emphasis"><em>not</em></span> the "Printer Operators" group in NT, but the <span class="emphasis"><em>printer admin</em></span> group, as defined in the <i class="parameter"><tt>[global]</tt></i> section of @@ -2142,7 +1998,10 @@ to escape the "$": <b class="command">smbclient //sambaserver/print\$ root</b>);</p></li><li><p>the user you're connecting as must be able to write to the <i class="parameter"><tt>[print$]</tt></i> share and create subdirectories;</p></li><li><p>the printer you are going to setup for the Windows -clients, needs to be installed in CUPS already;</p></li><li><p>the CUPS printer must be known to Samba, otherwise the +clients, needs to be installed in CUPS already;</p></li><li><p> + <a class="indexterm" name="id2933842"></a> + <a class="indexterm" name="id2933853"></a> + the CUPS printer must be known to Samba, otherwise the <b class="command">setdriver</b> subcommand fails with an NT_STATUS_UNSUCCESSFUL error. To check if the printer is known by Samba you may use the <b class="command">enumprinters</b> subcommand to @@ -2150,30 +2009,25 @@ rpcclient. A long-standing bug prevented a proper update of the printer list until every smbd process had received a SIGHUP or was restarted. Remember this in case you've created the CUPS printer just shortly ago and encounter problems: try restarting -Samba.</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2961177"></a>Manual Commandline Driver Installation in 15 little Steps</h3></div></div><div></div></div><p> +Samba.</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2933889"></a>Manual Driver Installation in 15 Steps</h3></div></div><div></div></div><p> We are going to install a printer driver now by manually executing all required commands. As this may seem a rather complicated process at first, we go through the procedure step by step, explaining every single action item as it comes up. -</p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2961194"></a>First Step: Install the Printer on CUPS</h4></div></div><div></div></div><pre class="screen"> - -# lpadmin -p mysmbtstprn -v socket://10.160.51.131:9100 -E -P /home/kurt/canonIR85.ppd - +</p><div class="procedure"><p class="title"><b>Procedure 19.1. Manual Driver Installation installation</b></p><ol type="1"><li><p class="title"><b>Install the Printer on CUPS</b></p><pre class="screen"> +<tt class="prompt">root# </tt><b class="userinput"><tt>lpadmin -p mysmbtstprn -v socket://10.160.51.131:9100 -E -P canonIR85.ppd</tt></b> </pre><p> This installs printer with the name <span class="emphasis"><em>mysmbtstprn</em></span> to the CUPS system. The printer is accessed via a socket (a.k.a. JetDirect or Direct TCP/IP) connection. You need to be root for this step -</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2961224"></a>Second Step (optional): Check if the Printer is recognized by -Samba</h4></div></div><div></div></div><pre class="screen"> - - # rpcclient -Uroot%xxxx -c 'enumprinters' localhost | grep -C2 mysmbtstprn - - flags:[0x800000] - name:[\\kde-bitshop\mysmbtstprn] - description:[\\kde-bitshop\mysmbtstprn,,mysmbtstprn] - comment:[mysmbtstprn] - +</p></li><li><p class="title"><b>(optional) Check if the Printer is recognized by +Samba</b></p><a class="indexterm" name="id2933968"></a><pre class="screen"> +<tt class="prompt">root# </tt><b class="userinput"><tt>rpcclient -Uroot%xxxx -c 'enumprinters' localhost | grep -C2 mysmbtstprn</tt></b> +flags:[0x800000] +name:[\\kde-bitshop\mysmbtstprn] +description:[\\kde-bitshop\mysmbtstprn,,mysmbtstprn] +comment:[mysmbtstprn] </pre><p> This should show the printer in the list. If not, stop and re-start the Samba daemon (smbd), or send a HUP signal: <b class="command">kill -HUP @@ -2185,24 +2039,25 @@ already. You need to know root's Samba password (as set by the following steps. Alternatively you can authenticate as one of the users from the "write list" as defined in <tt class="filename">smb.conf</tt> for <i class="parameter"><tt>[print$]</tt></i>. -</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2961288"></a>Third Step (optional): Check if Samba knows a Driver for the -Printer</h4></div></div><div></div></div><pre class="screen"> - -# rpcclient -Uroot%xxxx -c 'getprinter mysmbtstprn 2' localhost | grep driver - drivername:[] +</p></li><li><p class="title"><b>(optional) Check if Samba knows a Driver for the +Printer</b></p><a class="indexterm" name="id2934063"></a><a class="indexterm" name="id2934074"></a><pre class="screen"> +<tt class="prompt">root# </tt><b class="userinput"><tt>rpcclient -Uroot%xxxx -c 'getprinter mysmbtstprn 2' localhost \ + | grep driver </tt></b> +drivername:[] + +<tt class="prompt">root# </tt><b class="userinput"><tt>rpcclient -Uroot%xxxx -c 'getprinter mysmbtstprn 2' localhost \ + | grep -C4 driv</tt></b> +servername:[\\kde-bitshop] +printername:[\\kde-bitshop\mysmbtstprn] +sharename:[mysmbtstprn] +portname:[Samba Printer Port] +drivername:[] +comment:[mysmbtstprn] +location:[] +sepfile:[] +printprocessor:[winprint] -# rpcclient -Uroot%xxxx -c 'getprinter mysmbtstprn 2' localhost | grep -C4 driv - servername:[\\kde-bitshop] - printername:[\\kde-bitshop\mysmbtstprn] - sharename:[mysmbtstprn] - portname:[Samba Printer Port] - drivername:[] - comment:[mysmbtstprn] - location:[] - sepfile:[] - printprocessor:[winprint] - -# rpcclient -U root%xxxx -c 'getdriver mysmbtstprn' localhost +<tt class="prompt">root# </tt><b class="userinput"><tt>rpcclient -U root%xxxx -c 'getdriver mysmbtstprn' localhost</tt></b> result was WERR_UNKNOWN_PRINTER_DRIVER </pre><p> @@ -2211,16 +2066,14 @@ This step was done for the purpose of demonstrating this condition. An attempt to connect to the printer at this stage will prompt the message along the lines: "The server has not the required printer driver installed". -</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2961326"></a>Fourth Step: Put all required Driver Files into Samba's -[print$]</h4></div></div><div></div></div><pre class="screen"> - -# smbclient //localhost/print\$ -U 'root%xxxx' \ - -c 'cd W32X86; \ - put /etc/cups/ppd/mysmbtstprn.ppd mysmbtstprn.PPD; \ - put /usr/share/cups/drivers/cupsui.dll cupsui.dll; \ - put /usr/share/cups/drivers/cupsdrvr.dll cupsdrvr.dll; \ - put /usr/share/cups/drivers/cups.hlp cups.hlp' - +</p></li><li><p class="title"><b>Put all required Driver Files into Samba's +[print$]</b></p><pre class="screen"> +<tt class="prompt">root# </tt><b class="userinput"><tt>smbclient //localhost/print\$ -U 'root%xxxx' \ + -c 'cd W32X86; \ + put /etc/cups/ppd/mysmbtstprn.ppd mysmbtstprn.PPD; \ + put /usr/share/cups/drivers/cupsui.dll cupsui.dll; \ + put /usr/share/cups/drivers/cupsdrvr.dll cupsdrvr.dll; \ + put /usr/share/cups/drivers/cups.hlp cups.hlp'</tt></b> </pre><p> (Note that this command should be entered in one long single line. Line-breaks and the line-end indicating "\" has been inserted @@ -2230,31 +2083,26 @@ present in the <i class="parameter"><tt>[print$]</tt></i> share. However, client would still not be able to install them, because Samba does not yet treat them as driver files. A client asking for the driver would still be presented with a "not installed here" message. -</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2961377"></a>Fifth Step: Verify where the Driver Files are now</h4></div></div><div></div></div><pre class="screen"> - -# ls -l /etc/samba/drivers/W32X86/ - total 669 - drwxr-sr-x 2 root ntadmin 532 May 25 23:08 2 - drwxr-sr-x 2 root ntadmin 670 May 16 03:15 3 - -rwxr--r-- 1 root ntadmin 14234 May 25 23:21 cups.hlp - -rwxr--r-- 1 root ntadmin 278380 May 25 23:21 cupsdrvr.dll - -rwxr--r-- 1 root ntadmin 215848 May 25 23:21 cupsui.dll - -rwxr--r-- 1 root ntadmin 169458 May 25 23:21 mysmbtstprn.PPD - +</p></li><li><p class="title"><b>Verify where the Driver Files are now</b></p><pre class="screen"> +<tt class="prompt">root# </tt><b class="userinput"><tt>ls -l /etc/samba/drivers/W32X86/</tt></b> +total 669 +drwxr-sr-x 2 root ntadmin 532 May 25 23:08 2 +drwxr-sr-x 2 root ntadmin 670 May 16 03:15 3 +-rwxr--r-- 1 root ntadmin 14234 May 25 23:21 cups.hlp +-rwxr--r-- 1 root ntadmin 278380 May 25 23:21 cupsdrvr.dll +-rwxr--r-- 1 root ntadmin 215848 May 25 23:21 cupsui.dll +-rwxr--r-- 1 root ntadmin 169458 May 25 23:21 mysmbtstprn.PPD </pre><p> The driver files now are in the W32X86 architecture "root" of <i class="parameter"><tt>[print$]</tt></i>. -</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2961415"></a>Sixth Step: Tell Samba that these are +</p></li><li><p class="title"><b>Tell Samba that these are <span class="emphasis"><em>Driver</em></span> Files -(<b class="command">adddriver</b>)</h4></div></div><div></div></div><pre class="screen"> - -# rpcclient -Uroot%xxxx -c `adddriver "Windows NT x86" "mydrivername: \ - cupsdrvr.dll:mysmbtstprn.PPD: \ - cupsui.dll:cups.hlp:NULL:RAW[<span class="citation">:</span>]NULL" \ - localhost - - Printer Driver mydrivername successfully installed. - +(<b class="command">adddriver</b>)</b></p><a class="indexterm" name="id2934292"></a><pre class="screen"> +<tt class="prompt">root# </tt><b class="userinput"><tt>rpcclient -Uroot%xxxx -c `adddriver "Windows NT x86" "mydrivername: \ + cupsdrvr.dll:mysmbtstprn.PPD: \ + cupsui.dll:cups.hlp:NULL:RAW:NULL" \ + localhost</tt></b> +Printer Driver mydrivername successfully installed. </pre><p> Note that your cannot repeat this step if it fails. It could fail even as a result of a simple typo. It will most likely have moved a part of @@ -2265,49 +2113,41 @@ driver. It is normally a good idea to use the same name as is used for the printername; however, in big installations you may use this driver for a number of printers which have obviously different names. So the name of the driver is not fixed. -</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2961469"></a>Seventh Step: Verify where the Driver Files are now</h4></div></div><div></div></div><pre class="screen"> - -# ls -l /etc/samba/drivers/W32X86/ - total 1 - drwxr-sr-x 2 root ntadmin 532 May 25 23:22 2 - drwxr-sr-x 2 root ntadmin 670 May 16 03:15 3 - - -# ls -l /etc/samba/drivers/W32X86/2 - total 5039 - [....] - -rwxr--r-- 1 root ntadmin 14234 May 25 23:21 cups.hlp - -rwxr--r-- 1 root ntadmin 278380 May 13 13:53 cupsdrvr.dll - -rwxr--r-- 1 root ntadmin 215848 May 13 13:53 cupsui.dll - -rwxr--r-- 1 root ntadmin 169458 May 25 23:21 mysmbtstprn.PPD - +</p></li><li><p class="title"><b>Verify where the Driver Files are now</b></p><pre class="screen"> +<tt class="prompt">root# </tt><b class="userinput"><tt>ls -l /etc/samba/drivers/W32X86/</tt></b> +total 1 +drwxr-sr-x 2 root ntadmin 532 May 25 23:22 2 +drwxr-sr-x 2 root ntadmin 670 May 16 03:15 3 + +<tt class="prompt">root# </tt><b class="userinput"><tt>ls -l /etc/samba/drivers/W32X86/2</tt></b> +total 5039 +[....] +-rwxr--r-- 1 root ntadmin 14234 May 25 23:21 cups.hlp +-rwxr--r-- 1 root ntadmin 278380 May 13 13:53 cupsdrvr.dll +-rwxr--r-- 1 root ntadmin 215848 May 13 13:53 cupsui.dll +-rwxr--r-- 1 root ntadmin 169458 May 25 23:21 mysmbtstprn.PPD </pre><p> Notice how step 6 did also move the driver files to the appropriate subdirectory. Compare with the situation after step 5. -</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2961503"></a>Eighth Step (optional): Verify if Samba now recognizes the -Driver</h4></div></div><div></div></div><pre class="screen"> - -# rpcclient -Uroot%xxxx -c 'enumdrivers 3' localhost | grep -B2 -A5 mydrivername - - Printer Driver Info 3: - Version: [2] - Driver Name: [mydrivername] - Architecture: [Windows NT x86] - Driver Path: [\\kde-bitshop\print$\W32X86\2\cupsdrvr.dll] - Datafile: [\\kde-bitshop\print$\W32X86\2\mysmbtstprn.PPD] - Configfile: [\\kde-bitshop\print$\W32X86\2\cupsui.dll] - Helpfile: [\\kde-bitshop\print$\W32X86\2\cups.hlp] - +</p></li><li><p class="title"><b>(optional) Verify if Samba now recognizes the +Driver</b></p><a class="indexterm" name="id2934435"></a><pre class="screen"> +<tt class="prompt">root# </tt><b class="userinput"><tt>rpcclient -Uroot%xxxx -c 'enumdrivers 3' localhost \ + | grep -B2 -A5 mydrivername</tt></b> +Printer Driver Info 3: +Version: [2] +Driver Name: [mydrivername] +Architecture: [Windows NT x86] +Driver Path: [\\kde-bitshop\print$\W32X86\2\cupsdrvr.dll] +Datafile: [\\kde-bitshop\print$\W32X86\2\mysmbtstprn.PPD] +Configfile: [\\kde-bitshop\print$\W32X86\2\cupsui.dll] +Helpfile: [\\kde-bitshop\print$\W32X86\2\cups.hlp] </pre><p> Remember, this command greps for the name you did choose for the driver in step Six. This command must succeed before you can proceed. -</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2961536"></a>Ninth Step: Tell Samba which Printer should use these Driver -Files (<b class="command">setdriver</b>)</h4></div></div><div></div></div><pre class="screen"> - -# rpcclient -Uroot%xxxx -c 'setdriver mysmbtstprn mydrivername' localhost - - Successfully set mysmbtstprn to driver mydrivername - +</p></li><li><p class="title"><b>Tell Samba which Printer should use these Driver +Files (<b class="command">setdriver</b>)</b></p><a class="indexterm" name="id2934499"></a><pre class="screen"> +<tt class="prompt">root# </tt><b class="userinput"><tt>rpcclient -Uroot%xxxx -c 'setdriver mysmbtstprn mydrivername' localhost</tt></b> +Successfully set mysmbtstprn to driver mydrivername </pre><p> Since you can bind any printername (=printqueue) to any driver, this is a very convenient way to setup many queues which use the same @@ -2315,50 +2155,53 @@ driver. You don't need to repeat all the previous steps for the setdriver command to succeed. The only pre-conditions are: <b class="command">enumdrivers</b> must find the driver and <b class="command">enumprinters</b> must find the printer. -</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2961586"></a>Tenth Step (optional): Verify if Samba has this Association -recognized</h4></div></div><div></div></div><pre class="screen"> - -# rpcclient -Uroot%xxxx -c 'getprinter mysmbtstprn 2' localhost | grep driver - drivername:[mydrivername] +</p></li><li><p class="title"><b>(optional) Verify if Samba has this Association +recognized</b></p><a class="indexterm" name="id2934568"></a><a class="indexterm" name="id2934579"></a><a class="indexterm" name="id2934590"></a><pre class="screen"> +<tt class="prompt">root# </tt><b class="userinput"><tt>rpcclient -Uroot%xxxx -c 'getprinter mysmbtstprn 2' localhost \ + | grep driver</tt></b> +drivername:[mydrivername] -# rpcclient -Uroot%xxxx -c 'getprinter mysmbtstprn 2' localhost | grep -C4 driv - servername:[\\kde-bitshop] - printername:[\\kde-bitshop\mysmbtstprn] - sharename:[mysmbtstprn] - portname:[Done] - drivername:[mydrivername] - comment:[mysmbtstprn] - location:[] - sepfile:[] - printprocessor:[winprint] +<tt class="prompt">root# </tt><b class="userinput"><tt>rpcclient -Uroot%xxxx -c 'getprinter mysmbtstprn 2' localhost \ + | grep -C4 driv</tt></b> +servername:[\\kde-bitshop] +printername:[\\kde-bitshop\mysmbtstprn] +sharename:[mysmbtstprn] +portname:[Done] +drivername:[mydrivername] +comment:[mysmbtstprn] +location:[] +sepfile:[] +printprocessor:[winprint] -# rpcclient -U root%xxxx -c 'getdriver mysmbtstprn' localhost - [Windows NT x86] - Printer Driver Info 3: - Version: [2] - Driver Name: [mydrivername] - Architecture: [Windows NT x86] - Driver Path: [\\kde-bitshop\print$\W32X86\2\cupsdrvr.dll] - Datafile: [\\kde-bitshop\print$\W32X86\2\mysmbtstprn.PPD] - Configfile: [\\kde-bitshop\print$\W32X86\2\cupsui.dll] - Helpfile: [\\kde-bitshop\print$\W32X86\2\cups.hlp] - Monitorname: [] - Defaultdatatype: [RAW] - Monitorname: [] - Defaultdatatype: [RAW] +<tt class="prompt">root# </tt><b class="userinput"><tt>rpcclient -U root%xxxx -c 'getdriver mysmbtstprn' localhost</tt></b> +[Windows NT x86] +Printer Driver Info 3: + Version: [2] + Driver Name: [mydrivername] + Architecture: [Windows NT x86] + Driver Path: [\\kde-bitshop\print$\W32X86\2\cupsdrvr.dll] + Datafile: [\\kde-bitshop\print$\W32X86\2\mysmbtstprn.PPD] + Configfile: [\\kde-bitshop\print$\W32X86\2\cupsui.dll] + Helpfile: [\\kde-bitshop\print$\W32X86\2\cups.hlp] + Monitorname: [] + Defaultdatatype: [RAW] + Monitorname: [] + Defaultdatatype: [RAW] -# rpcclient -Uroot%xxxx -c 'enumprinters' localhost | grep mysmbtstprn - name:[\\kde-bitshop\mysmbtstprn] - description:[\\kde-bitshop\mysmbtstprn,mydrivername,mysmbtstprn] - comment:[mysmbtstprn] +<tt class="prompt">root# </tt><b class="userinput"><tt>rpcclient -Uroot%xxxx -c 'enumprinters' localhost | grep mysmbtstprn</tt></b> + name:[\\kde-bitshop\mysmbtstprn] + description:[\\kde-bitshop\mysmbtstprn,mydrivername,mysmbtstprn] + comment:[mysmbtstprn] </pre><p> +<a class="indexterm" name="id2934682"></a> Compare these results with the ones from steps 2 and 3. Note that every single of these commands show the driver is installed. Even the <b class="command">enumprinters</b> command now lists the driver on the "description" line. -</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2961666"></a>Eleventh Step (optional): Tickle the Driver into a correct -Device Mode</h4></div></div><div></div></div><p> +</p></li><li><p class="title"><b>(optional) Tickle the Driver into a correct +Device Mode</b></p><p> +<a class="indexterm" name="id2934720"></a> You certainly know how to install the driver on the client. In case you are not particularly familiar with Windows, here is a short recipe: browse the Network Neighbourhood, go to the Samba server, look @@ -2375,39 +2218,32 @@ It is important that you execute this step as a Samba printer admin to do this on Windows XP. It uses a commandline, which you may type into the "DOS box" (type root's smbpassword when prompted): </p><pre class="screen"> - - C:\> runas /netonly /user:root "rundll32 printui.dll,PrintUIEntry /in /n \\sambacupsserver\mysmbtstprn" - +<tt class="prompt">C:\> </tt><b class="userinput"><tt>runas /netonly /user:root "rundll32 printui.dll,PrintUIEntry /in /n\ + \\sambacupsserver\mysmbtstprn"</tt></b> </pre><p> -Change any printer setting once (like <span class="emphasis"><em>"portrait" ---> "landscape"</em></span>), click "Apply"; change the setting +Change any printer setting once (like changing <span class="emphasis"><em>"portrait" to + "landscape"</em></span>), click <span class="guibutton">Apply</span>; change the setting back. -</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2961731"></a>Twelfth Step: Install the Printer on a Client -("Point'n'Print")</h4></div></div><div></div></div><pre class="screen"> - - C:\> rundll32 printui.dll,PrintUIEntry /in /n "\\sambacupsserver\mysmbtstprn" - +</p></li><li><p class="title"><b>Install the Printer on a Client +("Point'n'Print")</b></p><a class="indexterm" name="id2934817"></a><pre class="screen"> +<tt class="prompt">C:\> </tt><b class="userinput"><tt>rundll32 printui.dll,PrintUIEntry /in /n "\\sambacupsserver\mysmbtstprn"</tt></b> </pre><p> If it doesn't work it could be a permission problem with the <i class="parameter"><tt>[print$]</tt></i> share. -</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2961764"></a>Thirteenth Step (optional): Print a Test Page</h4></div></div><div></div></div><pre class="screen"> - - C:\> rundll32 printui.dll,PrintUIEntry /p /n "\\sambacupsserver\mysmbtstprn" - +</p></li><li><p class="title"><b>Thirteenth Step (optional): Print a Test Page</b></p><pre class="screen"> +<tt class="prompt">C:\> </tt><b class="userinput"><tt>rundll32 printui.dll,PrintUIEntry /p /n "\\sambacupsserver\mysmbtstprn"</tt></b> </pre><p> Then hit [TAB] 5 times, [ENTER] twice, [TAB] once and [ENTER] again and march to the printer. -</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2961790"></a>Fourteenth Step (recommended): Study the Test Page</h4></div></div><div></div></div><p> +</p></li><li><p class="title"><b>Fourteenth Step (recommended): Study the Test Page</b></p><p> Hmmm.... just kidding! By now you know everything about printer installations and you don't need to read a word. Just put it in a frame and bolt it to the wall with the heading "MY FIRST RPCCLIENT-INSTALLED PRINTER" - why not just throw it away! -</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2961808"></a>Fifteenth Step (obligatory): Enjoy. Jump. Celebrate your -Success</h4></div></div><div></div></div><pre class="screen"> - -# echo "Cheeeeerioooooo! Success..." >> /var/log/samba/log.smbd - -</pre></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2961830"></a>Troubleshooting revisited</h3></div></div><div></div></div><p> +</p></li><li><p class="title"><b>Fifteenth Step (obligatory): Enjoy. Jump. Celebrate your +Success</b></p><pre class="screen"> +<tt class="prompt">root# </tt><b class="userinput"><tt>echo "Cheeeeerioooooo! Success..." >> /var/log/samba/log.smbd</tt></b> +</pre></li></ol></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2934958"></a>Troubleshooting revisited</h3></div></div><div></div></div><p> The setdriver command will fail, if in Samba's mind the queue is not already there. You had promising messages about the: </p><pre class="screen"> @@ -2422,7 +2258,8 @@ a disappointing message like this one beneath? result was NT_STATUS_UNSUCCESSFUL </pre><p> -It is not good enough that <span class="emphasis"><em>you</em></span> +<a class="indexterm" name="id2935002"></a> +It is not good enough that you can see the queue <span class="emphasis"><em>in CUPS</em></span>, using the <b class="command">lpstat -p ir85wm</b> command. A bug in most recent versions of Samba prevents the proper update of @@ -2431,26 +2268,35 @@ fails unless you re-start Samba or send a HUP to all smbd processes. To verify if this is the reason why Samba doesn't execute the setdriver command successfully, check if Samba "sees" the printer: -</p><pre class="screen"> - -# rpcclient transmeta -N -U'root%secret' -c 'enumprinters 0'| grep ir85wm +</p><a class="indexterm" name="id2935035"></a><pre class="screen"> +<tt class="prompt">root# </tt><b class="userinput"><tt>rpcclient transmeta -N -U'root%secret' -c 'enumprinters 0'| grep ir85wm</tt></b> printername:[ir85wm] - </pre><p> An alternative command could be this: -</p><pre class="screen"> - -# rpcclient transmeta -N -U'root%secret' -c 'getprinter ir85wm' +</p><a class="indexterm" name="id2935074"></a><pre class="screen"> +<tt class="prompt">root# </tt><b class="userinput"><tt>rpcclient transmeta -N -U'root%secret' -c 'getprinter ir85wm' </tt></b> cmd = getprinter ir85wm flags:[0x800000] name:[\\transmeta\ir85wm] description:[\\transmeta\ir85wm,ir85wm,DPD] comment:[CUPS PostScript-Treiber for WinNT/2K/XP] - </pre><p> BTW, you can use these commands, plus a few more, of course, to install drivers on remote Windows NT print servers too! -</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2961930"></a>The printing <tt class="filename">*.tdb</tt> Files</h2></div></div><div></div></div><p> +</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2935118"></a>The printing <tt class="filename">*.tdb</tt> Files</h2></div></div><div></div></div><p> +<a class="indexterm" name="id2935136"></a> +<a class="indexterm" name="id2935144"></a> +<a class="indexterm" name="id2935155"></a> +<a class="indexterm" name="id2935166"></a> +<a class="indexterm" name="id2935178"></a> +<a class="indexterm" name="id2935189"></a> +<a class="indexterm" name="id2935200"></a> +<a class="indexterm" name="id2935211"></a> +<a class="indexterm" name="id2935222"></a> +<a class="indexterm" name="id2935233"></a> +<a class="indexterm" name="id2935245"></a> +<a class="indexterm" name="id2935256"></a> +<a class="indexterm" name="id2935267"></a> Some mystery is associated with the series of files with a tdb-suffix appearing in every Samba installation. They are <tt class="filename">connections.tdb</tt>, @@ -2465,12 +2311,12 @@ tdb-suffix appearing in every Samba installation. They are <tt class="filename">ntprinters.tdb</tt>, <tt class="filename">sessionid.tdb</tt> and <tt class="filename">secrets.tdb</tt>. What is their purpose? -</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2962033"></a>Trivial DataBase Files</h3></div></div><div></div></div><p> +</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2935364"></a>Trivial DataBase Files</h3></div></div><div></div></div><a class="indexterm" name="id2935372"></a><p> A Windows NT (Print) Server keeps track of all information needed to serve its duty toward its clients by storing entries in the Windows "Registry". Client queries are answered by reading from the registry, Administrator or user configuration settings are saved by writing into -the Registry. Samba and Unix obviously don't have such a kind of +the Registry. Samba and UNIX obviously don't have such a kind of Registry. Samba instead keeps track of all client related information in a series of <tt class="filename">*.tdb</tt> files. (TDB = Trivial Data Base). These are often located in <tt class="filename">/var/lib/samba/</tt> @@ -2478,7 +2324,7 @@ or <tt class="filename">/var/lock/samba/</tt> . The printing related files are <tt class="filename">ntprinters.tdb</tt>, <tt class="filename">printing.tdb</tt>,<tt class="filename">ntforms.tdb</tt> and <tt class="filename">ntdrivers.tdb</tt>. -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2962103"></a>Binary Format</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2935456"></a>Binary Format</h3></div></div><div></div></div><p> <tt class="filename">*.tdb</tt> files are not human readable. They are written in a binary format. "Why not ASCII?", you may ask. "After all, ASCII configuration files are a good and proofed tradition on UNIX." @@ -2491,7 +2337,7 @@ same time</em></span>. The file format of Samba's <tt class="filename">*.tdb</tt> files allows for this provision. Many smbd processes may write to the same <tt class="filename">*.tdb</tt> file at the same time. This wouldn't be possible with pure ASCII files. -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2962165"></a>Losing <tt class="filename">*.tdb</tt> Files</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2935520"></a>Losing <tt class="filename">*.tdb</tt> Files</h3></div></div><div></div></div><p> It is very important that all <tt class="filename">*.tdb</tt> files remain consistent over all write and read accesses. However, it may happen that these files <span class="emphasis"><em>do</em></span> get corrupted. (A @@ -2501,13 +2347,12 @@ etc.). In cases of trouble, a deletion of the old printing-related <tt class="filename">*.tdb</tt> files may be the only option. You need to re-create all print related setup after that. Or you have made a backup of the <tt class="filename">*.tdb</tt> files in time. -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2962224"></a>Using <span class="emphasis"><em>tdbbackup</em></span></h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2935579"></a>Using <span class="emphasis"><em>tdbbackup</em></span></h3></div></div><div></div></div><a class="indexterm" name="id2935589"></a><a class="indexterm" name="id2935603"></a><p> Samba ships with a little utility which helps the root user of your system to back up your <tt class="filename">*.tdb</tt> files. If you run it with no argument, it prints a little usage message: </p><pre class="screen"> - -# tdbbackup +<tt class="prompt">root# </tt><b class="userinput"><tt>tdbbackup</tt></b> Usage: tdbbackup [options] <fname...> Version:3.0a @@ -2518,32 +2363,30 @@ with no argument, it prints a little usage message: </pre><p> Here is how I backed up my printing.tdb file: </p><pre class="screen"> - -# ls - . browse.dat locking.tdb ntdrivers.tdb printing.tdb share_info.tdb - .. connections.tdb messages.tdb ntforms.tdb printing.tdbkp unexpected.tdb - brlock.tdb gmon.out namelist.debug ntprinters.tdb sessionid.tdb +<tt class="prompt">root# </tt><b class="userinput"><tt>ls</tt></b> +. browse.dat locking.tdb ntdrivers.tdb printing.tdb +.. share_info.tdb connections.tdb messages.tdb ntforms.tdb +printing.tdbkp unexpected.tdb brlock.tdb gmon.out namelist.debug +ntprinters.tdb sessionid.tdb - kde-bitshop:/var/lock/samba # tdbbackup -s .bak printing.tdb +<tt class="prompt">root# </tt><b class="userinput"><tt>tdbbackup -s .bak printing.tdb</tt></b> printing.tdb : 135 records - kde-bitshop:/var/lock/samba # ls -l printing.tdb* +<tt class="prompt">root# </tt><b class="userinput"><tt>ls -l printing.tdb*</tt></b> -rw------- 1 root root 40960 May 2 03:44 printing.tdb -rw------- 1 root root 40960 May 2 03:44 printing.tdb.bak -</pre></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2962290"></a>CUPS Print Drivers from Linuxprinting.org</h2></div></div><div></div></div><p> +</pre></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2935716"></a>CUPS Print Drivers from Linuxprinting.org</h2></div></div><div></div></div><a class="indexterm" name="id2935724"></a><p> CUPS ships with good support for HP LaserJet type printers. You can install the generic driver as follows: -</p><pre class="screen"> - -lpadmin -p laserjet4plus -v parallel:/dev/lp0 -E -m laserjet.ppd - +</p><a class="indexterm" name="id2935737"></a><pre class="screen"> +<tt class="prompt">root# </tt><b class="userinput"><tt>lpadmin -p laserjet4plus -v parallel:/dev/lp0 -E -m laserjet.ppd</tt></b> </pre><p> -The <i class="parameter"><tt>-m</tt></i> switch will retrieve the +The <tt class="option">-m</tt> switch will retrieve the <tt class="filename">laserjet.ppd</tt> from the standard repository for not-yet-installed-PPDs, which CUPS typically stores in <tt class="filename">/usr/share/cups/model</tt>. Alternatively, you may use -<i class="parameter"><tt>-P /path/to/your.ppd</tt></i>. +<tt class="option">-P /path/to/your.ppd</tt>. </p><p> The generic laserjet.ppd however does not support every special option for every LaserJet-compatible model. It constitutes a sort of "least @@ -2555,6 +2398,7 @@ best used for each printer. Its database is kept current by the tireless work of Till Kamppeter from MandrakeSoft, who is also the principal author of the foomatic-rip utility. </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> +<a class="indexterm" name="id2935835"></a> The former "cupsomatic" concept is now be replaced by the new, much more powerful "foomatic-rip". foomatic-rip is the successor of cupsomatic. cupsomatic is no longer maintained. Here is the new URL @@ -2565,7 +2409,7 @@ not work with PPDs generated for the old cupsomatic. The new-style PPDs are 100% compliant to the Adobe PPD specification. They are intended to be used by Samba and the cupsaddsmb utility also, to provide the driver files for the Windows clients also! -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2962398"></a>foomatic-rip and Foomatic explained</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2935871"></a>foomatic-rip and Foomatic explained</h3></div></div><div></div></div><a class="indexterm" name="id2935879"></a><a class="indexterm" name="id2935887"></a><p> Nowadays most Linux distros rely on the utilities of Linuxprinting.org to create their printing related software (which, BTW, works on all UNIXes and on Mac OS X or Darwin too). It is not known as well as it @@ -2582,7 +2426,7 @@ its <a href="http://www.linuxprinting.org/foomatic.html" target="_top">Foomatic< database. Currently there are <a href="http://www.linuxprinting.org/driver_list.cgi" target="_top">245 drivers</a> in the database: many drivers support various models, and many models may be driven by different drivers; it's your choice! -</p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2962453"></a>690 "perfect" Printers</h4></div></div><div></div></div><p> +</p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2935943"></a>690 "perfect" Printers</h4></div></div><div></div></div><p> At present there are 690 devices dubbed as working "perfectly", 181 "mostly", 96 "partially" and 46 are "Paperweights". Keeping in mind that most of these are non-PostScript models (PostScript printers are @@ -2593,7 +2437,7 @@ doesn't also scan and copy and fax under GNU/Linux: then this is a truly astonishing achievement. Three years ago the number was not more than 500, and Linux or UNIX "printing" at the time wasn't anywhere near the quality it is today! -</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2962477"></a>How the "Printing HOWTO" started it all</h4></div></div><div></div></div><p> +</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2935974"></a>How the "Printing HOWTO" started it all</h4></div></div><div></div></div><p> A few years ago <a href="http://www2.picante.com:81/~gtaylor/" target="_top">Grant Taylor</a> started it all. The roots of today's Linuxprinting.org are in the first <a href="http://www.linuxprinting.org/foomatic2.9/howto/" target="_top">Linux Printing @@ -2607,7 +2451,7 @@ hardware and driver zoo that made up Linux printing of the time. This database became the core component of today's Foomatic collection of tools and data. In the meantime it has moved to an XML representation of the data. -</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2962522"></a>Foomatic's strange Name</h4></div></div><div></div></div><p> +</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2936022"></a>Foomatic's strange Name</h4></div></div><div></div></div><a class="indexterm" name="id2936030"></a><p> "Why the funny name?", you ask. When it really took off, around spring 2000, CUPS was far less popular than today, and most systems used LPD, LPRng or even PDQ to print. CUPS shipped with a few generic "drivers" @@ -2630,7 +2474,7 @@ developments available for CUPS;</p></li><li><p>It made available a lot of addit to CUPS users (because often the "traditional" Ghostscript way of printing was the only one available);</p></li><li><p>It gave all the advanced CUPS options (web interface, GUI driver configurations) to users wanting (or needing) to use -Ghostscript filters.</p></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2962589"></a>cupsomatic, pdqomatic, lpdomatic, directomatic</h4></div></div><div></div></div><p> +Ghostscript filters.</p></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2936123"></a>cupsomatic, pdqomatic, lpdomatic, directomatic</h4></div></div><div></div></div><a class="indexterm" name="id2936133"></a><a class="indexterm" name="id2936141"></a><a class="indexterm" name="id2936149"></a><p> CUPS worked through a quickly-hacked up filter script named <a href="http://www.linuxprinting.org/download.cgi?filename=cupsomatic&show=0" target="_top">cupsomatic</a>. cupsomatic ran the printfile through Ghostscript, constructing automatically the rather complicated command line needed. It just @@ -2664,8 +2508,8 @@ Foomatic up to versions 2.0.x required (ugly) Perl data structures attached the Linuxprinting.org PPDs for CUPS. It had a different "*omatic" script for every spooler, as well as different printer configuration files.. -</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2962725"></a>7.13.1.5.The <span class="emphasis"><em>Grand Unification</em></span> -achieved...</h4></div></div><div></div></div><p> +</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2936304"></a>The <span class="emphasis"><em>Grand Unification</em></span> +achieved...</h4></div></div><div></div></div><a class="indexterm" name="id2936316"></a><p> This all has changed in Foomatic versions 2.9 (Beta) and released as "stable" 3.0. This has now achieved the convergence of all *omatic scripts: it is called the <a href="http://www.linuxprinting.org/foomatic2.9/download.cgi?filename=foomatic-rip&show=0" target="_top">foomatic-rip</a>. @@ -2700,7 +2544,7 @@ sizes for many printers; and it will support printing on media drawn from different paper trays within the same job (in both cases: even where there is no support for this from Windows-based vendor printer drivers). -</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2962810"></a>Driver Development outside</h4></div></div><div></div></div><p> +</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2936409"></a>Driver Development outside</h4></div></div><div></div></div><p> Most driver development itself does not happen within Linuxprinting.org. Drivers are written by independent maintainers. Linuxprinting.org just pools all the information, and stores it in its @@ -2713,7 +2557,7 @@ the work is currently done in three projects. These are: </p><div class="itemizedlist"><ul type="disc"><li><p><a href="http://www-124.ibm.com/developerworks/oss/linux/projects/omni/" target="_top">Omni</a> -- a Free Software project by IBM which tries to convert their printer driver knowledge from good-ol' OS/2 times into a modern, modular, -universal driver architecture for Linux/Unix (still Beta). This +universal driver architecture for Linux/UNIX (still Beta). This currently supports 437 models.</p></li><li><p><a href="http://hpinkjet.sf.net/" target="_top">HPIJS</a> -- a Free Software project by HP to provide the support for their own range of models (very mature, printing in most cases is perfect and @@ -2723,8 +2567,8 @@ effort, started by Michael Sweet (also lead developer for CUPS), now directed by Robert Krawitz, which has achieved an amazing level of photo print quality (many Epson users swear that its quality is better than the vendor drivers provided by Epson for the Microsoft -platforms). This currently supports 522 models.</p></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2962892"></a>Forums, Downloads, Tutorials, Howtos -- also for Mac OS X and -commercial Unix</h4></div></div><div></div></div><p> +platforms). This currently supports 522 models.</p></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2936490"></a>Forums, Downloads, Tutorials, Howtos -- also for Mac OS X and +commercial UNIX</h4></div></div><div></div></div><p> Linuxprinting.org today is the one-stop "shop" to download printer drivers. Look for printer information and <a href="http://www.linuxprinting.org//kpfeifle/LinuxKongress2002/Tutorial/" target="_top">tutorials</a> or solve printing problems in its popular <a href="http://www.linuxprinting.org/newsportal/" target="_top">forums</a>. But @@ -2744,7 +2588,7 @@ of the Foomatic project. Till Kamppeter from MandrakeSoft is doing an excellent job in his spare time to maintain Linuxprinting.org and Foomatic. So if you use it often, please send him a note showing your appreciation. -</p></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2962963"></a>Foomatic Database generated PPDs</h4></div></div><div></div></div><p> +</p></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2936564"></a>Foomatic Database generated PPDs</h4></div></div><div></div></div><p> The Foomatic database is an amazing piece of ingenuity in itself. Not only does it keep the printer and driver information, but it is organized in a way that it can generate "PPD" files "on the fly" from @@ -2769,7 +2613,7 @@ GUI tools (like KDE's marvellous <a href="http://printing.kde.org/overview/kprin or the GNOME <a href="http://gtklp.sourceforge.net/" target="_top">"gtklp"</a>, "xpp" and the CUPS web interface) read the PPD too and use this information to present the available settings to the user as an intuitive menu selection. -</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2963027"></a>foomatic-rip and Foomatic-PPD Download and Installation</h3></div></div><div></div></div><p> +</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2936640"></a>foomatic-rip and Foomatic-PPD Download and Installation</h3></div></div><div></div></div><p> Here are the steps to install a foomatic-rip driven "LaserJet 4 Plus" compatible printer in CUPS (note that recent distributions of SuSE, UnitedLinux and Mandrake may ship with a complete package of @@ -2783,11 +2627,11 @@ link.</p></li><li><p>You'll arrive at a page listing all drivers working with this model (for all printers, there will always be <span class="emphasis"><em>one</em></span> recommended driver. Try this one first).</p></li><li><p>In our case ("HP LaserJet 4 Plus"), we'll arrive here: -<a href="http://www.linuxprinting.org/show_printer.cgi?recnum=HP-LaserJet_4_Plus" target="_top">http://www.linuxprinting.org/show_printer.cgi?recnum=HP-LaserJet_4_Plus</a> + <a href="http://www.linuxprinting.org/show_printer.cgi?recnum=HP-LaserJet_4_Plus" target="_top">http://www.linuxprinting.org/show_printer.cgi?recnum=HP-LaserJet_4_Plus</a> </p></li><li><p>The recommended driver is "ljet4".</p></li><li><p>There are several links provided here. You should visit them all, if you are not familiar with the Linuxprinting.org database.</p></li><li><p>There is a link to the database page for the "ljet4": -<a href="http://www.linuxprinting.org/show_driver.cgi?driver=ljet4" target="_top">http://www.linuxprinting.org/show_driver.cgi?driver=ljet4</a> + <a href="http://www.linuxprinting.org/show_driver.cgi?driver=ljet4" target="_top">http://www.linuxprinting.org/show_driver.cgi?driver=ljet4</a> On the driver's page, you'll find important and detailed information about how to use that driver within the various available spoolers.</p></li><li><p>Another link may lead you to the homepage of the @@ -2828,9 +2672,7 @@ the <tt class="filename">/usr/share/cups/model/</tt> path and re-start cupsd).</p></li><li><p>Then install the printer with a suitable commandline, e.g.: </p><pre class="screen"> - -lpadmin -p laserjet4plus -v parallel:/dev/lp0 -E -P path/to/my-printer.ppd - +<tt class="prompt">root# </tt><b class="userinput"><tt>lpadmin -p laserjet4plus -v parallel:/dev/lp0 -E -P path/to/my-printer.ppd</tt></b> </pre></li><li><p>Note again this: for all the new-style "Foomatic-PPDs" from Linuxprinting.org, you also need a special "CUPS filter" named "foomatic-rip".Get the latest version of "foomatic-rip" from: <a href="http://www.linuxprinting.org/foomatic2.9/download.cgi?filename=foomatic-rip&show=0" target="_top">http://www.linuxprinting.org/foomatic2.9/download.cgi?filename=foomatic-rip&show=0</a> @@ -2868,7 +2710,7 @@ the driver/model) contain support for a certain "device", representing the selected "driver" for your model (as shown by "gs -h")</p></li><li><p>foomatic-rip needs a new version of PPDs (PPD versions produced for cupsomatic don't work with -foomatic-rip).</p></li></ul></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2963488"></a>Page Accounting with CUPS</h2></div></div><div></div></div><p> +foomatic-rip).</p></li></ul></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2937141"></a>Page Accounting with CUPS</h2></div></div><div></div></div><a class="indexterm" name="id2937150"></a><p> Often there are questions regarding "print quotas" wherein Samba users (that is, Windows clients) should not be able to print beyond a certain amount of pages or data volume per day, week or month. This @@ -2881,18 +2723,17 @@ Of course one could "hack" things with one's own scripts. But then there is CUPS. CUPS supports "quotas" which can be based on sizes of jobs or on the number of pages or both, and are spanning any time period you want. -</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2963519"></a>Setting up Quotas</h3></div></div><div></div></div><p> +</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2937193"></a>Setting up Quotas</h3></div></div><div></div></div><a class="indexterm" name="id2937200"></a><p> This is an example command how root would set a print quota in CUPS, assuming an existing printer named "quotaprinter": -</p><pre class="screen"> - - lpadmin -p quotaprinter -o job-quota-period=604800 -o job-k-limit=1024 -o job-page-limit=100 - +</p><a class="indexterm" name="id2937220"></a><pre class="screen"> +<tt class="prompt">root# </tt><b class="userinput"><tt>lpadmin -p quotaprinter -o job-quota-period=604800 \ + -o job-k-limit=1024 -o job-page-limit=100</tt></b> </pre><p> This would limit every single user to print 100 pages or 1024 KB of data (whichever comes first) within the last 604,800 seconds ( = 1 week). -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2963551"></a>Correct and incorrect Accounting</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2937258"></a>Correct and incorrect Accounting</h3></div></div><div></div></div><p> For CUPS to count correctly, the printfile needs to pass the CUPS "pstops" filter, otherwise it uses a "dummy" count of "1". Some printfiles don't pass it (eg: image files) but then those are mostly 1 @@ -2906,8 +2747,8 @@ driver there) to have the chance to get accounting done. If the printer is a non-PostScript model, you need to let CUPS do the job to convert the file to a print-ready format for the target printer. This will be working for currently about 1,000 different printer models, -see <a href="http://www.linuxprinting.org/printer_list.cgi" target="_top">http://www.linuxprinting.org/printer_list.cgi</a>). -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2963592"></a>Adobe and CUPS PostScript Drivers for Windows Clients</h3></div></div><div></div></div><p> +see <a href="http://www.linuxprinting.org/printer_list.cgi" target="_top">the driver list at linuxprinting.org/</a>. +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2937303"></a>Adobe and CUPS PostScript Drivers for Windows Clients</h3></div></div><div></div></div><p> Before CUPS-1.1.16 your only option was to use the Adobe PostScript Driver on the Windows clients. The output of this driver was not always passed through the "pstops" filter on the CUPS/Samba side, and @@ -2920,14 +2761,14 @@ From CUPS-1.1.16 onward you can use the "CUPS PostScript Driver for Windows NT/2K/XP clients" (which is tagged in the download area of http://www.cups.org/ as the "cups-samba-1.1.16.tar.gz" package). It does <span class="emphasis"><em>not</em></span> work for Win9x/ME clients. But it guarantees: -</p><div class="itemizedlist"><ul type="disc"><li><p>to not write an PJL-header</p></li><li><p>to still read and support all PJL-options named in the +</p><div class="itemizedlist"><a class="indexterm" name="id2937350"></a><ul type="disc"><li><p>to not write an PJL-header</p></li><li><p>to still read and support all PJL-options named in the driver PPD with its own means</p></li><li><p> that the file will pass through the "pstops" filter on the CUPS/Samba server</p></li><li><p>to page-count correctly the printfile</p></li></ul></div><p> You can read more about the setup of this combination in the manpage for "cupsaddsmb" (which is only present with CUPS installed, and only current from CUPS 1.1.16). -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2963663"></a>The page_log File Syntax</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2937398"></a>The page_log File Syntax</h3></div></div><div></div></div><a class="indexterm" name="id2937407"></a><p> These are the items CUPS logs in the "page_log" for every single <span class="emphasis"><em>page</em></span> of a job: </p><div class="itemizedlist"><ul type="disc"><li><p>Printer name</p></li><li><p>User name</p></li><li><p>Job ID</p></li><li><p>Time of printing</p></li><li><p>the page number</p></li><li><p>the number of copies</p></li><li><p>a billing information string @@ -2936,20 +2777,18 @@ single <span class="emphasis"><em>page</em></span> of a job: Here is an extract of my CUPS server's page_log file to illustrate the format and included items: </p><pre class="screen"> - - infotec_IS2027 kurt 401 [22/Apr/2003:10:28:43 +0100] 1 3 #marketing 10.160.50.13 - infotec_IS2027 kurt 401 [22/Apr/2003:10:28:43 +0100] 2 3 #marketing 10.160.50.13 - infotec_IS2027 kurt 401 [22/Apr/2003:10:28:43 +0100] 3 3 #marketing 10.160.50.13 - infotec_IS2027 kurt 401 [22/Apr/2003:10:28:43 +0100] 4 3 #marketing 10.160.50.13 - DigiMaster9110 boss 402 [22/Apr/2003:10:33:22 +0100] 1 440 finance-dep 10.160.51.33 - +infotec_IS2027 kurt 401 [22/Apr/2003:10:28:43 +0100] 1 3 #marketing 10.160.50.13 +infotec_IS2027 kurt 401 [22/Apr/2003:10:28:43 +0100] 2 3 #marketing 10.160.50.13 +infotec_IS2027 kurt 401 [22/Apr/2003:10:28:43 +0100] 3 3 #marketing 10.160.50.13 +infotec_IS2027 kurt 401 [22/Apr/2003:10:28:43 +0100] 4 3 #marketing 10.160.50.13 +DigiMaster9110 boss 402 [22/Apr/2003:10:33:22 +0100] 1 440 finance-dep 10.160.51.33 </pre><p> This was job ID "401", printed on "infotec_IS2027" by user "kurt", a 64-page job printed in 3 copies and billed to "#marketing", sent from IP address 10.160.50.13. The next job had ID "402", was sent by user "boss" from IP address 10.160.51.33,printed from one page 440 copies and is set to be billed to "finance-dep". -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2963765"></a>Possible Shortcomings</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2937516"></a>Possible Shortcomings</h3></div></div><div></div></div><p> What flaws or shortcomings are there with this quota system? </p><div class="itemizedlist"><ul type="disc"><li><p>the ones named above (wrongly logged job in case of printer hardware failure, etc.)</p></li><li><p>in reality, CUPS counts the job pages that are being @@ -2958,12 +2797,12 @@ processed in <span class="emphasis"><em>software</em></span> (that is, going thr printing device. Thus if there is a jam while printing the 5th sheet out of 1000 and the job is aborted by the printer, the "page count" will still show the figure of 1000 for that job</p></li><li><p>all quotas are the same for all users (no flexibility -to give the boss a higher quota than the clerk) no support for +to give the boss a higher quota than the clerk), no support for groups</p></li><li><p>no means to read out the current balance or the "used-up" number of current quota</p></li><li><p>a user having used up 99 sheets of 100 quota will still be able to send and print a 1,000 sheet job</p></li><li><p>a user being denied a job because of a filled-up quota doesn't get a meaningful error message from CUPS other than -"client-error-not-possible".</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2963836"></a>Future Developments</h3></div></div><div></div></div><p> +"client-error-not-possible".</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2937592"></a>Future Developments</h3></div></div><div></div></div><p> This is the best system currently available, and there are huge improvements under development for CUPS 1.2: </p><div class="itemizedlist"><ul type="disc"><li><p>page counting will go into the "backends" (these talk @@ -2971,9 +2810,9 @@ directly to the printer and will increase the count in sync with the actual printing process: thus a jam at the 5th sheet will lead to a stop in the counting)</p></li><li><p>quotas will be handled more flexibly</p></li><li><p>probably there will be support for users to inquire their "accounts" in advance</p></li><li><p>probably there will be support for some other tools -around this topic</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2963884"></a>Other Accounting Tools</h3></div></div><div></div></div><p> +around this topic</p></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2937648"></a>Other Accounting Tools</h3></div></div><div></div></div><p> PrintAnalyzer, pyKota, printbill, LogReport. -</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2963899"></a>Additional Material</h2></div></div><div></div></div><p> +</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2937662"></a>Additional Material</h2></div></div><div></div></div><p> A printer queue with <span class="emphasis"><em>no</em></span> PPD associated to it is a "raw" printer and all files will go directly there as received by the spooler. The exceptions are file types "application/octet-stream" @@ -2994,10 +2833,8 @@ where "normally" the native CUPS "pstoraster" filter would k in. cupsomatic by-passes pstoraster, "kidnaps" the printfile from CUPS away and re-directs it to go through Ghostscript. CUPS accepts this, because the associated CUPS-O-Matic-/Foomatic-PPD specifies: -</p><pre class="screen"> - - *cupsFilter: "application/vnd.cups-postscript 0 cupsomatic" - +</p><pre class="programlisting"> + *cupsFilter: "application/vnd.cups-postscript 0 cupsomatic" </pre><p> This line persuades CUPS to hand the file to cupsomatic, once it has successfully converted it to the MIME type @@ -3009,30 +2846,24 @@ Jobs arriving from Windows which are auto-typed CUPS is widely configurable and flexible, even regarding its filtering mechanism. Another workaround in some situations would be to have in <tt class="filename">/etc/cups/mime.types</tt> entries as follows: -</p><pre class="screen"> - - application/postscript application/vnd.cups-raw 0 - - application/vnd.cups-postscript application/vnd.cups-raw 0 - - +</p><pre class="programlisting"> + application/postscript application/vnd.cups-raw 0 - + application/vnd.cups-postscript application/vnd.cups-raw 0 - </pre><p> This would prevent all Postscript files from being filtered (rather, they will through the virtual <span class="emphasis"><em>nullfilter</em></span> denoted with "-"). This could only be useful for PS printers. If you want to print PS code on non-PS printers (provided they support ASCII text printing) an entry as follows could be useful: -</p><pre class="screen"> - - */* application/vnd.cups-raw 0 - - +</p><pre class="programlisting"> + */* application/vnd.cups-raw 0 - </pre><p> and would effectively send <span class="emphasis"><em>all</em></span> files to the backend without further processing. </p><p> Lastly, you could have the following entry: -</p><pre class="screen"> - - application/vnd.cups-postscript application/vnd.cups-raw 0 my_PJL_stripping_filter - +</p><pre class="programlisting"> +application/vnd.cups-postscript application/vnd.cups-raw 0 my_PJL_stripping_filter </pre><p> You will need to write a <span class="emphasis"><em>my_PJL_stripping_filter</em></span> (could be a shellscript) that parses the PostScript and removes the @@ -3051,16 +2882,15 @@ the jobs of hundreds of users on some big machine, where no user is allowed to have direct access (such as when the operators often need to load the proper paper type before running the 10,000 page job requested by marketing for the mailing, etc.). -</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2964092"></a>Auto-Deletion or Preservation of CUPS Spool Files</h2></div></div><div></div></div><p> +</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2937912"></a>Auto-Deletion or Preservation of CUPS Spool Files</h2></div></div><div></div></div><p> Samba print files pass through two "spool" directories. One is the -incoming directory managed by Samba, (set in the <span class="emphasis"><em>path = -/var/spool/samba</em></span> directive in the -<span class="emphasis"><em>[printers]</em></span> section of +incoming directory managed by Samba, (set in the <a class="indexterm" name="id2937929"></a><i class="parameter"><tt>path</tt></i> = /var/spool/samba directive in the +<i class="parameter"><tt>[printers]</tt></i> section of <tt class="filename">smb.conf</tt>). The other is the spool directory of your UNIX print subsystem. For CUPS it is normally <tt class="filename">/var/spool/cups/</tt>, as set by the cupsd.conf directive <tt class="filename">RequestRoot /var/spool/cups</tt>. -</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2964138"></a>CUPS Configuration Settings explained</h3></div></div><div></div></div><p> +</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2937974"></a>CUPS Configuration Settings explained</h3></div></div><div></div></div><p> Some important parameter settings in the CUPS configuration file <tt class="filename">cupsd.conf</tt> are: </p><div class="variablelist"><dl><dt><span class="term">PreserveJobHistory Yes</span></dt><dd><p> @@ -3084,34 +2914,32 @@ maximum to 0 disables this functionality. The default setting is </p></dd></dl></div><p> (There are also additional settings for "MaxJobsPerUser" and "MaxJobsPerPrinter"...) -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2964221"></a>Pre-conditions</h3></div></div><div></div></div><p> +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2938069"></a>Pre-conditions</h3></div></div><div></div></div><p> For everything to work as announced, you need to have three things: </p><div class="itemizedlist"><ul type="disc"><li><p>a Samba-smbd which is compiled against "libcups" (Check on Linux by running "ldd `which smbd`")</p></li><li><p>a Samba-<tt class="filename">smb.conf</tt> setting of -"printing = cups"</p></li><li><p>another Samba-<tt class="filename">smb.conf</tt> setting of -"printcap = cups"</p></li></ul></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> + <a class="indexterm" name="id2938105"></a><i class="parameter"><tt>printing</tt></i> = cups</p></li><li><p>another Samba-<tt class="filename">smb.conf</tt> setting of + <a class="indexterm" name="id2938131"></a><i class="parameter"><tt>printcap</tt></i> = cups</p></li></ul></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> In this case all other manually set printing-related commands (like -"print command", "lpq command", "lprm command", "lppause command" or -"lpresume command") are ignored and they should normally have no +<a class="indexterm" name="id2938153"></a><i class="parameter"><tt>print command</tt></i>, +<a class="indexterm" name="id2938167"></a><i class="parameter"><tt>lpq command</tt></i>, +<a class="indexterm" name="id2938180"></a><i class="parameter"><tt>lprm command</tt></i>, +<a class="indexterm" name="id2938194"></a><i class="parameter"><tt>lppause command</tt></i> or +<a class="indexterm" name="id2938208"></a><i class="parameter"><tt>lpresume command</tt></i>) are ignored and they should normally have no influence what-so-ever on your printing. -</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2964281"></a>Manual Configuration</h3></div></div><div></div></div><p> -If you want to do things manually, replace the "printing = -cups" by "printing = bsd". Then your manually set commands may work -(haven't tested this), and a "print command = lp -d %P %s; rm %s" +</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2938226"></a>Manual Configuration</h3></div></div><div></div></div><p> +If you want to do things manually, replace the <a class="indexterm" name="id2938237"></a><i class="parameter"><tt>printing</tt></i> = cups +by <a class="indexterm" name="id2938250"></a><i class="parameter"><tt>printing</tt></i> = bsd. Then your manually set commands may work +(haven't tested this), and a <a class="indexterm" name="id2938266"></a><i class="parameter"><tt>print command</tt></i> = lp -d %P %s; rm %s" may do what you need. -</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2964299"></a>When <span class="emphasis"><em>not</em></span> to use Samba to print to -CUPS</h2></div></div><div></div></div><p> -[TO BE DONE] -</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2964316"></a>In Case of Trouble.....</h2></div></div><div></div></div><p> +</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2938284"></a>In Case of Trouble.....</h2></div></div><div></div></div><p> If you have more problems, post the output of these commands to the CUPS or Samba mailing lists (choose the one which seems more relevant to your problem): </p><pre class="screen"> - - grep -v ^# /etc/cups/cupsd.conf | grep -v ^$ - grep -v ^# /etc/samba/smb.conf | grep -v ^$ | grep -v "^;" - +<tt class="prompt">$ </tt><b class="userinput"><tt>grep -v ^# /etc/cups/cupsd.conf | grep -v ^$</tt></b> +<tt class="prompt">$ </tt><b class="userinput"><tt>grep -v ^# /etc/samba/smb.conf | grep -v ^$ | grep -v "^;"</tt></b> </pre><p> (adapt paths as needed). These commands leave out the empty lines and lines with comments, providing the "naked settings" in a @@ -3119,18 +2947,12 @@ compact way. Don't forget to name the CUPS and Samba versions you are using! This saves bandwidth and makes for easier readability for experts (and you are expecting experts to read them, right? ;-) -</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2964352"></a>Where to find Documentation</h3></div></div><div></div></div><p> -[TO BE DONE] -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2964364"></a>How to ask for Help</h3></div></div><div></div></div><p> -[TO BE DONE] -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2964377"></a>Where to find Help</h3></div></div><div></div></div><p> -[TO BE DONE] -</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2964391"></a>Appendix</h2></div></div><div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2964398"></a>Printing <span class="emphasis"><em>from</em></span> CUPS to Windows attached -Printers</h3></div></div><div></div></div><p> +</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2938356"></a>Printing <span class="emphasis"><em>from</em></span> CUPS to Windows attached +Printers</h2></div></div><div></div></div><p> From time to time the question arises, how you can print <span class="emphasis"><em>to</em></span> a Windows attached printer <span class="emphasis"><em>from</em></span> Samba. Normally the local connection -"Windows host <--> printer" would be done by USB or parallel +from Windows host to printer would be done by USB or parallel cable, but this doesn't matter to Samba. From here only an SMB connection needs to be opened to the Windows host. Of course, this printer must be "shared" first. As you have learned by now, CUPS uses @@ -3142,33 +2964,29 @@ is in the CUPS backend directory. This resides usually in file there. It should be a symlink to <tt class="filename">smbspool</tt> which file must exist and be executable: </p><pre class="screen"> - - # ls -l /usr/lib/cups/backend/ - total 253 - drwxr-xr-x 3 root root 720 Apr 30 19:04 . - drwxr-xr-x 6 root root 125 Dec 19 17:13 .. - -rwxr-xr-x 1 root root 10692 Feb 16 21:29 canon - -rwxr-xr-x 1 root root 10692 Feb 16 21:29 epson - lrwxrwxrwx 1 root root 3 Apr 17 22:50 http -> ipp - -rwxr-xr-x 1 root root 17316 Apr 17 22:50 ipp - -rwxr-xr-x 1 root root 15420 Apr 20 17:01 lpd - -rwxr-xr-x 1 root root 8656 Apr 20 17:01 parallel - -rwxr-xr-x 1 root root 2162 Mar 31 23:15 pdfdistiller - lrwxrwxrwx 1 root root 25 Apr 30 19:04 ptal -> /usr/local/sbin/ptal-cups - -rwxr-xr-x 1 root root 6284 Apr 20 17:01 scsi - lrwxrwxrwx 1 root root 17 Apr 2 03:11 smb -> /usr/bin/smbspool - -rwxr-xr-x 1 root root 7912 Apr 20 17:01 socket - -rwxr-xr-x 1 root root 9012 Apr 20 17:01 usb - -# ls -l `which smbspool` - -rwxr-xr-x 1 root root 563245 Dec 28 14:49 /usr/bin/smbspool - +<tt class="prompt">root# </tt><b class="userinput"><tt>ls -l /usr/lib/cups/backend/</tt></b> +total 253 +drwxr-xr-x 3 root root 720 Apr 30 19:04 . +drwxr-xr-x 6 root root 125 Dec 19 17:13 .. +-rwxr-xr-x 1 root root 10692 Feb 16 21:29 canon +-rwxr-xr-x 1 root root 10692 Feb 16 21:29 epson +lrwxrwxrwx 1 root root 3 Apr 17 22:50 http -> ipp +-rwxr-xr-x 1 root root 17316 Apr 17 22:50 ipp +-rwxr-xr-x 1 root root 15420 Apr 20 17:01 lpd +-rwxr-xr-x 1 root root 8656 Apr 20 17:01 parallel +-rwxr-xr-x 1 root root 2162 Mar 31 23:15 pdfdistiller +lrwxrwxrwx 1 root root 25 Apr 30 19:04 ptal -> /usr/sbin/ptal-cups +-rwxr-xr-x 1 root root 6284 Apr 20 17:01 scsi +lrwxrwxrwx 1 root root 17 Apr 2 03:11 smb -> /usr/bin/smbspool +-rwxr-xr-x 1 root root 7912 Apr 20 17:01 socket +-rwxr-xr-x 1 root root 9012 Apr 20 17:01 usb + +<tt class="prompt">root# </tt><b class="userinput"><tt>ls -l `which smbspool`</tt></b> +-rwxr-xr-x 1 root root 563245 Dec 28 14:49 /usr/bin/smbspool </pre><p> If this symlink doesn't exist, create it: </p><pre class="screen"> - -# ln -s `which smbspool` /usr/lib/cups/backend/smb - +<tt class="prompt">root# </tt><b class="userinput"><tt>ln -s `which smbspool` /usr/lib/cups/backend/smb</tt></b> </pre><p> smbspool has been written by Mike Sweet from the CUPS folks. It is included and ships with Samba. It may also be used with print @@ -3185,9 +3003,8 @@ the Windows host, etc. </p><p> To install a printer with the smb backend on CUPS, use this command: </p><pre class="screen"> - -# lpadmin -p winprinter -v smb://WINDOWSNETBIOSNAME/printersharename -P /path/to/PPD - +<tt class="prompt">root# </tt><b class="userinput"><tt>lpadmin -p winprinter -v smb://WINDOWSNETBIOSNAME/printersharename \ + -P /path/to/PPD</tt></b> </pre><p> The <span class="emphasis"><em>PPD</em></span> must be able to direct CUPS to generate the print data for the target model. For PostScript printers just use @@ -3196,13 +3013,7 @@ what can you do if the printer is only accessible with a password? Or if the printer's host is part of another workgroup? This is provided for: you can include the required parameters as part of the <tt class="filename">smb://</tt> device-URI. Like this: -</p><pre class="screen"> - - smb://WORKGROUP/WINDOWSNETBIOSNAME/printersharename - smb://username:password@WORKGROUP/WINDOWSNETBIOSNAME/printersharename - smb://username:password@WINDOWSNETBIOSNAME/printersharename - -</pre><p> +</p><div class="itemizedlist"><ul type="disc"><li><p>smb://WORKGROUP/WINDOWSNETBIOSNAME/printersharename </p></li><li><p>smb://username:password@WORKGROUP/WINDOWSNETBIOSNAME/printersharename</p></li><li><p>smb://username:password@WINDOWSNETBIOSNAME/printersharename</p></li></ul></div><p> Note that the device-URI will be visible in the process list of the Samba server (e.g. when someone uses the <b class="command">ps -aux</b> command on Linux), even if the username and passwords are sanitized @@ -3213,337 +3024,41 @@ doesn't require a password! Printing will only work if you have a working netbios name resolution up and running. Note that this is a feature of CUPS and you don't necessarily need to have smbd running (but who wants that? :-). -</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2964612"></a>More CUPS filtering Chains</h3></div></div><div></div></div><p> +</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2938656"></a>More CUPS filtering Chains</h2></div></div><div></div></div><p> The following diagrams reveal how CUPS handles print jobs. -</p><pre class="screen"> -######################################################################### -# -# CUPS in and of itself has this (general) filter chain (CAPITAL -# letters are FILE-FORMATS or MIME types, other are filters (this is -# true for pre-1.1.15 of pre-4.3 versions of CUPS and ESP PrintPro): -# -# SOMETHNG-FILEFORMAT -# | -# V -# somethingtops -# | -# V -# APPLICATION/POSTSCRIPT -# | -# V -# pstops -# | -# V -# APPLICATION/VND.CUPS-POSTSCRIPT -# | -# V -# pstoraster # as shipped with CUPS, independent from any Ghostscipt -# | # installation on the system -# | (= "postscipt interpreter") -# V -# APPLICATION/VND.CUPS-RASTER -# | -# V -# rastertosomething (e.g. Gimp-Print filters may be plugged in here) -# | (= "raster driver") -# V -# SOMETHING-DEVICE-SPECIFIC -# | -# V -# backend -# -# -# ESP PrintPro has some enhanced "rastertosomething" filters as compared to -# CUPS, and also a somewhat improved "pstoraster" filter. -# -# NOTE: Gimp-Print and some other 3rd-Party-Filters (like TurboPrint) to -# CUPS and ESP PrintPro plug-in where rastertosomething is noted. -# -######################################################################### -</pre><pre class="screen"> -######################################################################### -# -# This is how "cupsomatic" comes into play: -# ========================================= -# -# SOMETHNG-FILEFORMAT -# | -# V -# somethingtops -# | -# V -# APPLICATION/POSTSCRIPT -# | -# V -# pstops -# | -# V -# APPLICATION/VND.CUPS-POSTSCRIPT ----------------+ -# | V -# V cupsomatic -# pstoraster (constructs complicated -# | (= "postscipt interpreter") Ghostscript commandline -# | to let the file be -# V processed by a -# APPLICATION/VND.CUPS-RASTER "-sDEVICE=s.th." -# | call...) -# V | -# rastertosomething V -# | (= "raster driver") +-------------------------+ -# | | Ghostscript at work.... | -# V | | -# SOMETHING-DEVICE-SPECIFIC *-------------------------+ -# | | -# V | -# backend <------------------------------------+ -# | -# V -# THE PRINTER -# -# -# Note, that cupsomatic "kidnaps" the printfile after the -# "APPLICATION/VND.CUPS-POSTSCRPT" stage and deviates it gh -# the CUPS-external, systemwide Ghostscript installation, bypassing the -# "pstoraster" filter (therefore also bypassing the CUPS-raster-drivers -# "rastertosomething", and hands the rasterized file directly to the CUPS -# backend... -# -# cupsomatic is not made by the CUPS developers. It is an independent -# contribution to printing development, made by people from -# Linuxprinting.org. (see also http://www.cups.org/cups-help.html) -# -# NOTE: Gimp-Print and some other 3rd-Party-Filters (like TurboPrint) to -# CUPS and ESP PrintPro plug-in where rastertosomething is noted. -# -######################################################################### -</pre><pre class="screen"> -######################################################################### -# -# And this is how it works for ESP PrintPro from 4.3: -# =================================================== -# -# SOMETHNG-FILEFORMAT -# | -# V -# somethingtops -# | -# V -# APPLICATION/POSTSCRIPT -# | -# V -# pstops -# | -# V -# APPLICATION/VND.CUPS-POSTSCRIPT -# | -# V -# gsrip -# | (= "postscipt interpreter") -# V -# APPLICATION/VND.CUPS-RASTER -# | -# V -# rastertosomething (e.g. Gimp-Print filters may be plugged in here) -# | (= "raster driver") -# V -# SOMETHING-DEVICE-SPECIFIC -# | -# V -# backend -# -# NOTE: Gimp-Print and some other 3rd-Party-Filters (like TurboPrint) to -# CUPS and ESP PrintPro plug-in where rastertosomething is noted. -# -######################################################################### -</pre><pre class="screen"> -######################################################################### -# -# This is how "cupsomatic" would come into play with ESP PrintPro: -# ================================================================ -# -# -# SOMETHNG-FILEFORMAT -# | -# V -# somethingtops -# | -# V -# APPLICATION/POSTSCRIPT -# | -# V -# pstops -# | -# V -# APPLICATION/VND.CUPS-POSTSCRIPT ----------------+ -# | V -# V cupsomatic -# gsrip (constructs complicated -# | (= "postscipt interpreter") Ghostscript commandline -# | to let the file be -# V processed by a -# APPLICATION/VND.CUPS-RASTER "-sDEVICE=s.th." -# | call...) -# V | -# rastertosomething V -# | (= "raster driver") +-------------------------+ -# | | Ghostscript at work.... | -# V | | -# SOMETHING-DEVICE-SPECIFIC *-------------------------+ -# | | -# V | -# backend <------------------------------------+ -# | -# V -# THE PRINTER -# -# NOTE: Gimp-Print and some other 3rd-Party-Filters (like TurboPrint) to -# CUPS and ESP PrintPro plug-in where rastertosomething is noted. -# -######################################################################### -</pre><pre class="screen"> -######################################################################### -# -# And this is how it works for CUPS from 1.1.15: -# ============================================== -# -# SOMETHNG-FILEFORMAT -# | -# V -# somethingtops -# | -# V -# APPLICATION/POSTSCRIPT -# | -# V -# pstops -# | -# V -# APPLICATION/VND.CUPS-POSTSCRIPT-----+ -# +------------------v------------------------------+ -# | Ghostscript | -# | at work... | -# | (with | -# | "-sDEVICE=cups") | -# | | -# | (= "postscipt interpreter") | -# | | -# +------------------v------------------------------+ -# | -# APPLICATION/VND.CUPS-RASTER >-------+ -# | -# V -# rastertosomething -# | (= "raster driver") -# V -# SOMETHING-DEVICE-SPECIFIC -# | -# V -# backend -# -# -# NOTE: since version 1.1.15 CUPS "outsourced" the pstoraster process to -# Ghostscript. GNU Ghostscript needs to be patched to handle the -# CUPS requirement; ESP Ghostscript has this builtin. In any case, -# "gs -h" needs to show up a "cups" device. pstoraster is now a -# calling an appropriate "gs -sDEVICE=cups..." commandline to do -# the job. It will output "application/vnd.cup-raster", which will -# be finally processed by a CUPS raster driver "rastertosomething" -# Note the difference to "cupsomatic", which will <span class="emphasis"><em>not</em></span> output -# CUPS-raster, but a final version of the printfile, ready to be -# sent to the printer. cupsomatic also doesn't use the "cups" -# devicemode in Ghostscript, but one of the classical devicemodes.... -# -# NOTE: Gimp-Print and some other 3rd-Party-Filters (like TurboPrint) to -# CUPS and ESP PrintPro plug-in where rastertosomething is noted. -# -######################################################################### -</pre><pre class="screen"> -######################################################################### -# -# And this is how it works for CUPS from 1.1.15, with cupsomatic included: -# ======================================================================== -# -# SOMETHNG-FILEFORMAT -# | -# V -# somethingtops -# | -# V -# APPLICATION/POSTSCRIPT -# | -# V -# pstops -# | -# V -# APPLICATION/VND.CUPS-POSTSCRIPT-----+ -# +------------------v------------------------------+ -# | Ghostscript . Ghostscript at work.... | -# | at work... . (with "-sDEVICE= | -# | (with . s.th." | -# | "-sDEVICE=cups") . | -# | . | -# | (CUPS standard) . (cupsomatic) | -# | . | -# | (= "postscript interpreter") | -# | . | -# +------------------v--------------v---------------+ -# | | -# APPLICATION/VND.CUPS-RASTER >-------+ | -# | | -# V | -# rastertosomething | -# | (= "raster driver") | -# V | -# SOMETHING-DEVICE-SPECIFIC >------------------------+ -# | -# V -# backend -# -# -# NOTE: Gimp-Print and some other 3rd-Party-Filters (like TurboPrint) to -# CUPS and ESP PrintPro plug-in where rastertosomething is noted. -# -########################################################################## -</pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2964919"></a>Trouble Shooting Guidelines to fix typical Samba printing -Problems</h3></div></div><div></div></div><p> -This is a short description of how to debug printing problems -with Samba. This describes how to debug problems with printing from -a SMB client to a Samba server, not the other way around. -</p><div class="variablelist"><dl><dt><span class="term">Win9x client can't install driver</span></dt><dd><p>For Win9x clients require the printer names to be 8 +</p><div class="figure"><a name="cups1"></a><p class="title"><b>Figure 19.17. Filtering chain 1</b></p><div class="mediaobject"><img src="projdoc/imagefiles/cups1.png" width="270" alt="Filtering chain 1"></div></div><div class="figure"><a name="cups2"></a><p class="title"><b>Figure 19.18. Filtering chain with cupsomatic</b></p><div class="mediaobject"><img src="projdoc/imagefiles/cups2.png" width="270" alt="Filtering chain with cupsomatic"></div></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p> +Gimp-Print and some other 3rd-Party-Filters (like TurboPrint) to +CUPS and ESP PrintPro plug-in where rastertosomething is noted. +</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2938758"></a>Common Errors</h2></div></div><div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2938765"></a>Win9x client can't install driver</h3></div></div><div></div></div><p>For Win9x clients require the printer names to be 8 chars (or "8 plus 3 chars suffix") max; otherwise the driver files won't get transferred when you want to download them from -Samba.</p></dd><dt><span class="term">testparm</span></dt><dd><p>Run <b class="command">testparm</b>: It will tell you if -<tt class="filename">smb.conf</tt> parameters are in the wrong -section. Many people have had the "printer admin" parameter in the -<i class="parameter"><tt>[printers]</tt></i> section and experienced -problems. "testparm" will tell you if it sees -this.</p></dd><dt><span class="term">"cupsaddsmb" keeps asking for a root password in a -neverending loop</span></dt><dd><p>Have you <i class="parameter"><tt>security = user</tt></i>? Have +Samba.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2938787"></a>"cupsaddsmb" keeps asking for root password in + neverending loop</h3></div></div><div></div></div><p>Have you <a class="indexterm" name="id2938800"></a><i class="parameter"><tt>security</tt></i> = user? Have you used <b class="command">smbpasswd</b> to give root a Samba account? You can do 2 things: open another terminal and execute <b class="command">smbpasswd -a root</b> to create the account, and continue with entering the password into the first terminal. Or break out of the loop by hitting ENTER twice (without trying to type a -password).</p></dd><dt><span class="term">"cupsaddsmb" gives "No PPD file for printer..." -message (but I swear there is one!)</span></dt><dd><div class="itemizedlist"><ul type="disc"><li><p>Have you enabled printer sharing on CUPS? This means: +password).</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2938835"></a>"cupsaddsmb" gives "No PPD file for printer..." + message while PPD file is present</h3></div></div><div></div></div><p>Have you enabled printer sharing on CUPS? This means: do you have a <i class="parameter"><tt><Location /printers>....</Location></tt></i> section in CUPS server's <tt class="filename">cupsd.conf</tt> which doesn't deny access to the host you run "cupsaddsmb" from? It <span class="emphasis"><em>could</em></span> be an issue if you use cupsaddsmb remotely, or if you use it with a -<i class="parameter"><tt>-h</tt></i> parameter: <b class="command">cupsaddsmb -H -sambaserver -h cupsserver -v printername</b>. -</p></li><li><p>Is your +<tt class="option">-h</tt> parameter: <b class="userinput"><tt>cupsaddsmb -H + sambaserver -h cupsserver -v printername</tt></b>. +</p><p>Is your "TempDir" directive in <span class="emphasis"><em>cupsd.conf</em></span> set to a valid value and is it writeable? -</p></li></ul></div></dd><dt><span class="term">I can't connect client to Samba printer.</span></dt><dd><p>Use <b class="command">smbstatus</b> to check which user +</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2938893"></a>Client can't connect to Samba printer</h3></div></div><div></div></div><p>Use <b class="command">smbstatus</b> to check which user you are from Samba's point of view. Do you have the privileges to write into the <i class="parameter"><tt>[print$]</tt></i> -share?</p></dd><dt><span class="term">I can't reconnect to Samba under a new account -from Win2K/XP</span></dt><dd><p>Once you are connected as the "wrong" user (for -example as "nobody", which often occurs if you have <i class="parameter"><tt>map to -guest = bad user</tt></i>), Windows Explorer will not accept an +share?</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2938921"></a>Can't reconnect to Samba under new account + from Win2K/XP</h3></div></div><div></div></div><p>Once you are connected as the "wrong" user (for +example as "nobody", which often occurs if you have +<a class="indexterm" name="id2938935"></a><i class="parameter"><tt>map to guest</tt></i> = bad user), Windows Explorer will not accept an attempt to connect again as a different user. There won't be any byte transfered on the wire to Samba, but still you'll see a stupid error message which makes you think that Samba has denied access. Use @@ -3556,61 +3071,59 @@ indicating a renewed connection attempt? Shut all Explorer Windows. This makes Windows forget what it has cached in its memory as established connections. Then re-connect as the right user. Best method is to use a DOS terminal window and <span class="emphasis"><em>first</em></span> -do <b class="command">net use z: \\SAMBAHOST\print$ /user:root</b>. Check +do <b class="userinput"><tt>net use z: \\GANDALF\print$ /user:root</tt></b>. Check with <b class="command">smbstatus</b> that you are connected under a different account. Now open the "Printers" folder (on the Samba server in the <span class="emphasis"><em>Network Neighbourhood</em></span>), right-click the printer in question and select -<span class="emphasis"><em>Connect...</em></span></p></dd><dt><span class="term">Avoid being connected to the Samba server as the -"wrong" user</span></dt><dd><p>You see per <b class="command">smbstatus</b> that you are +<span class="emphasis"><em>Connect...</em></span></p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2939149"></a>Avoid being connected to the Samba server as the + "wrong" user</h3></div></div><div></div></div><p>You see per <b class="command">smbstatus</b> that you are connected as user "nobody"; while you wanted to be "root" or -"printeradmin"? This is probably due to <i class="parameter"><tt>map to guest = bad -user</tt></i>, which silently connects you under the guest account, +"printeradmin"? This is probably due to +<a class="indexterm" name="id2939171"></a><i class="parameter"><tt>map to guest</tt></i> = bad user, which silently connects you under the guest account, when you gave (maybe by accident) an incorrect username. Remove -<i class="parameter"><tt>map to guest</tt></i>, if you want to prevent -this.</p></dd><dt><span class="term">Upgrading to CUPS drivers from Adobe drivers on -NT/2K/XP clients gives problems</span></dt><dd><p>First delete all "old" Adobe-using printers. Then +<a class="indexterm" name="id2939187"></a><i class="parameter"><tt>map to guest</tt></i>, if you want to prevent +this.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2939202"></a>Upgrading to CUPS drivers from Adobe drivers on + NT/2K/XP clients gives problems</h3></div></div><div></div></div><p>First delete all "old" Adobe-using printers. Then delete all "old" Adobe drivers. (On Win2K/XP, right-click in background of "Printers" folder, select "Server Properties...", select -tab "Drivers" and delete here).</p></dd><dt><span class="term">I can't use "cupsaddsmb"on a Samba server which is -a PDC</span></dt><dd><p>Do you use the "naked" root user name? Try to do it -this way: <span class="emphasis"><em>cupsaddsmb -U DOMAINNAME\\root -v -printername</em></span> (note the two backslashes: the first one is -required to "escape" the second one).</p></dd><dt><span class="term">I deleted a printer on Win2K; but I still see -its driver</span></dt><dd><p>Deleting a printer on the client won't delete the +tab "Drivers" and delete here).</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2939219"></a>Can't use "cupsaddsmb" on Samba server which is + a PDC</h3></div></div><div></div></div><p>Do you use the "naked" root user name? Try to do it +this way: <b class="userinput"><tt>cupsaddsmb -U <i class="replaceable"><tt>DOMAINNAME</tt></i>\\root -v +<i class="replaceable"><tt>printername</tt></i></tt></b>> (note the two backslashes: the first one is +required to "escape" the second one).</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2939249"></a>Deleted Win2K printer driver is still shown</h3></div></div><div></div></div><p>Deleting a printer on the client won't delete the driver too (to verify, right-click on the white background of the "Printers" folder, select "Server Properties" and click on the "Drivers" tab). These same old drivers will be re-used when you try to install a printer with the same name. If you want to update to a new driver, delete the old ones first. Deletion is only possible if no -other printer uses the same driver.</p></dd><dt><span class="term">Win2K/XP "Local Security -Policies"</span></dt><dd><p><span class="emphasis"><em>Local Security Policies</em></span> may not +other printer uses the same driver.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2939258"></a>Win2K/XP "Local Security + Policies"</h3></div></div><div></div></div><p><span class="emphasis"><em>Local Security Policies</em></span> may not allow the installation of unsigned drivers. "Local Security Policies" may not allow the installation of printer drivers at -all.</p></dd><dt><span class="term">WinXP clients: "Administrator can not install -printers for all local users"</span></dt><dd><p>Windows XP handles SMB printers on a "per-user" basis. +all.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2939297"></a>WinXP clients: "Administrator can not install + printers for all local users"</h3></div></div><div></div></div><p>Windows XP handles SMB printers on a "per-user" basis. This means every user needs to install the printer himself. To have a printer available for everybody, you might want to use the built-in IPP client capabilities of WinXP. Add a printer with the print path of <span class="emphasis"><em>http://cupsserver:631/printers/printername</em></span>. Still looking into this one: maybe a "logon script" could automatically install printers for all -users.</p></dd><dt><span class="term">"Print Change Notify" functions on -NT-clients</span></dt><dd><p>For "print change notify" functions on NT++ clients, +users.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2939331"></a>"Print Change Notify" functions on + NT-clients</h3></div></div><div></div></div><p>For "print change notify" functions on NT++ clients, these need to run the "Server" service first (re-named to <span class="emphasis"><em>File & Print Sharing for MS Networks</em></span> in -XP).</p></dd><dt><span class="term">WinXP-SP1</span></dt><dd><p>WinXP-SP1 introduced a <span class="emphasis"><em>Point and Print +XP).</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2939354"></a>WinXP-SP1</h3></div></div><div></div></div><p>WinXP-SP1 introduced a <span class="emphasis"><em>Point and Print Restriction Policy</em></span> (this restriction doesn't apply to "Administrator" or "Power User" groups of users). In Group Policy -Object Editor: go to <span class="emphasis"><em>User Configuration --> -Administrative Templates --> Control Panel --> +Object Editor: go to <span class="emphasis"><em>User Configuration, + Administrative Templates, Control Panel, Printers</em></span>. The policy is automatically set to <span class="emphasis"><em>Enabled</em></span> and the <span class="emphasis"><em>Users can only Point and Print to machines in their Forest</em></span> . You probably need to change it to <span class="emphasis"><em>Disabled</em></span> or <span class="emphasis"><em>Users can only Point and Print to these servers</em></span> in order to make -driver downloads from Samba possible.</p></dd><dt><span class="term">I can't set and save default print options for all -users on Win2K/XP</span></dt><dd><p>How are you doing it? I bet the wrong way (it is not +driver downloads from Samba possible.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2939398"></a>Print options for all users can't be set on Win2K/XP</h3></div></div><div></div></div><p>How are you doing it? I bet the wrong way (it is not very easy to find out, though). There are 3 different ways to bring you to a dialog that <span class="emphasis"><em>seems</em></span> to set everything. All three dialogs <span class="emphasis"><em>look</em></span> the same. Only one of them @@ -3650,13 +3163,13 @@ Do you see any difference? I don't either... However, only the last one, which you arrived at with steps "C.1.-6." will save any settings permanently and be the defaults for new users. If you want all clients to get the same defaults, you need to conduct these steps <span class="emphasis"><em>as -Administrator</em></span> (<i class="parameter"><tt>printer admin</tt></i> in +Administrator</em></span> (<a class="indexterm" name="id2939650"></a><i class="parameter"><tt>printer admin</tt></i> in <tt class="filename">smb.conf</tt>) <span class="emphasis"><em>before</em></span> a client downloads the driver (the clients can later set their own <span class="emphasis"><em>per-user defaults</em></span> by following the procedures <span class="emphasis"><em>A.</em></span> or <span class="emphasis"><em>B.</em></span> -above).</p></dd><dt><span class="term">What are the most common blunders in driver -settings on Windows clients?</span></dt><dd><p>Don't use <span class="emphasis"><em>Optimize for +above).</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2939689"></a>Most common blunders in driver + settings on Windows clients</h3></div></div><div></div></div><p>Don't use <span class="emphasis"><em>Optimize for Speed</em></span>: use <span class="emphasis"><em>Optimize for Portability</em></span> instead (Adobe PS Driver) Don't use <span class="emphasis"><em>Page Independence: No</em></span>: always @@ -3668,8 +3181,8 @@ printer</em></span> (Adobe PS Driver). For <span class="emphasis"><em>TrueType Download Options</em></span> choose <span class="emphasis"><em>Outline</em></span>. Use PostScript Level 2, if you are having trouble with a non-PS printer, and if -there is a choice.</p></dd><dt><span class="term">I can't make <b class="command">cupsaddsmb</b> work -with newly installed printer</span></dt><dd><p>Symptom: the last command of +there is a choice.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2939734"></a><b class="command">cupsaddsmb</b> does not work + with newly installed printer</h3></div></div><div></div></div><p>Symptom: the last command of <b class="command">cupsaddsmb</b> doesn't complete successfully: <b class="command">cmd = setdriver printername printername</b> result was NT_STATUS_UNSUCCESSFUL then possibly the printer was not yet @@ -3678,23 +3191,23 @@ Neighbourhood</em></span>? Did it show up in <b class="command">rpcclient hostname -c 'enumprinters'</b>? Restart smbd (or send a <b class="command">kill -HUP</b> to all processes listed by <b class="command">smbstatus</b> and try -again.</p></dd><dt><span class="term">My permissions on +again.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2939796"></a>Permissions on <tt class="filename">/var/spool/samba/</tt> get reset after each -reboot</span></dt><dd><p>Have you by accident set the CUPS spool directory to +reboot</h3></div></div><div></div></div><p>Have you by accident set the CUPS spool directory to the same location? (<i class="parameter"><tt>RequestRoot /var/spool/samba/</tt></i> in <tt class="filename">cupsd.conf</tt> or the other way round: <tt class="filename">/var/spool/cups/</tt> is set as -<i class="parameter"><tt>path</tt></i> in the <i class="parameter"><tt>[printers]</tt></i> +<a class="indexterm" name="id2939835"></a><i class="parameter"><tt>path</tt></i>> in the <i class="parameter"><tt>[printers]</tt></i> section). These <span class="emphasis"><em>must</em></span> be different. Set <i class="parameter"><tt>RequestRoot /var/spool/cups/</tt></i> in -<tt class="filename">cupsd.conf</tt> and <i class="parameter"><tt>path = -/var/spool/samba</tt></i> in the <i class="parameter"><tt>[printers]</tt></i> +<tt class="filename">cupsd.conf</tt> and <a class="indexterm" name="id2939874"></a><i class="parameter"><tt>path</tt></i> = +/var/spool/samba in the <i class="parameter"><tt>[printers]</tt></i> section of <tt class="filename">smb.conf</tt>. Otherwise cupsd will sanitize permissions to its spool directory with each restart, and -printing will not work reliably.</p></dd><dt><span class="term">My printers work fine: just the printer named "lp" +printing will not work reliably.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2939905"></a>Printer named "lp" intermittently swallows jobs and spits out completely different -ones</span></dt><dd><p>It is a very bad idea to name any printer "lp". This -is the traditional Unix name for the default printer. CUPS may be set +ones</h3></div></div><div></div></div><p>It is a very bad idea to name any printer "lp". This +is the traditional UNIX name for the default printer. CUPS may be set up to do an automatic creation of "Implicit Classes". This means, to group all printers with the same name to a pool of devices, and loadbalancing the jobs across them in a round-robin fashion. Chances @@ -3703,31 +3216,10 @@ receive his jobs and send your own to his device unwittingly. To have tight control over the printer names, set <i class="parameter"><tt>BrowseShortNames No</tt></i>. It will present any printer as "printername@cupshost" then, giving you a better control over what may happen in a large -networked environment.</p></dd><dt><span class="term">How do I "watch" my Samba server?</span></dt><dd><p>You can use <b class="command">tail -f -/var/log/samba/log.smbd</b> (you may need a different path) to -see a live scrolling of all log messages. <b class="command">smbcontrol smbd -debuglevel</b> tells you which verbosity goes into the -logs. <b class="command">smbcontrol smbd debug 3</b> sets the verbosity to -a quite high level (you can choose from 0 to 10 or 100). This works -"on the fly", without the need to restart the smbd daemon. Don't use -more than 3 initially; or you'll drown in an ocean of -messages.</p></dd><dt><span class="term">I can't use Samba from my WinXP Home box, while -access from WinXP Prof works flawlessly</span></dt><dd><p>You have our condolences! WinXP home has been -completely neutered by Microsoft as compared to WinXP Prof: you can -not log into a WinNT domain. It cannot join a Win NT domain as a -member server. While it is possible to access domain resources, users -don't have "single sign-on". They need to supply username and password -each time they connect to a resource. Logon scripts and roaming -profiles are not supported. It can serve file and print shares; but -only in "share-mode security" level. It can not use "user-mode -security" (what Windows 95/98/ME still can -do).</p></dd><dt><span class="term">Where do I find the Adobe PostScript driver files -I need for "cupsaddsmb"?</span></dt><dd><p>Use <b class="command">smbclient</b> to connect to any +networked environment.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2939953"></a>Location of Adobe PostScript driver files necessary for "cupsaddsmb"</h3></div></div><div></div></div><p>Use <b class="command">smbclient</b> to connect to any Windows box with a shared PostScript printer: <b class="command">smbclient //windowsbox/print\$ -U guest</b>. You can navigate to the <tt class="filename">W32X86/2</tt> subdir to <b class="command">mget ADOBE*</b> and other files or to <tt class="filename">WIN40/0</tt> to do the same. -- Another option is to download the <tt class="filename">*.exe</tt> packaged -files from the Adobe website.</p></dd></dl></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2966041"></a>An Overview of the CUPS Printing Processes</h3></div></div><div></div></div><p> -</p><div class="figure"><a name="id2966052"></a><p class="title"><b>Figure 19.15. CUPS Printing Overview</b></p><div class="mediaobject"><img src="projdoc/imagefiles/a_small.png" alt="CUPS Printing Overview"></div></div><p> -</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="printing.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="optional.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="VFS.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 18. Classical Printing Support </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 20. Stackable VFS modules</td></tr></table></div></body></html> +files from the Adobe website.</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2940008"></a>An Overview of the CUPS Printing Processes</h2></div></div><div></div></div><div class="figure"><a name="a_small"></a><p class="title"><b>Figure 19.19. CUPS Printing Overview</b></p><div class="mediaobject"><img src="projdoc/imagefiles/a_small.png" width="270" alt="CUPS Printing Overview"></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="printing.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="optional.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="VFS.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 18. Classical Printing Support </td><td width="20%" align="center"><a accesskey="h" href="samba-doc.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 20. Stackable VFS modules</td></tr></table></div></body></html> |