Solaris Printing - Oracle Help Center

Solaris Printing - Oracle Help Center
System Administration Guide:
Solaris Printing
Sun Microsystems, Inc.
4150 Network Circle
Santa Clara, CA 95054
U.S.A.
Part No: 819–7761–05
January 2009
Copyright 2009 Sun Microsystems, Inc.
4150 Network Circle, Santa Clara, CA 95054 U.S.A.
All rights reserved.
Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product that is described in this document. In particular, and without
limitation, these intellectual property rights may include one or more U.S. patents or pending patent applications in the U.S. and in other countries.
U.S. Government Rights – Commercial software. Government users are subject to the Sun Microsystems, Inc. standard license agreement and applicable provisions
of the FAR and its supplements.
This distribution may include materials developed by third parties.
Parts of the product may be derived from Berkeley BSD systems, licensed from the University of California. UNIX is a registered trademark in the U.S. and other
countries, exclusively licensed through X/Open Company, Ltd.
Sun, Sun Microsystems, the Sun logo, the Solaris logo, the Java Coffee Cup logo, docs.sun.com, Java, OpenSolaris, and Solaris are trademarks or registered
trademarks of Sun Microsystems, Inc. or its subsidiaries in the U.S. and other countries. All SPARC trademarks are used under license and are trademarks or
registered trademarks of SPARC International, Inc. in the U.S. and other countries. Products bearing SPARC trademarks are based upon an architecture developed
by Sun Microsystems, Inc. Adobe is a registered trademark of Adobe Systems, Incorporated. PostScript is a trademark or registered trademark of Adobe Systems,
Incorporated, which may be registered in certain jurisdictions.
The OPEN LOOK and SunTM Graphical User Interface was developed by Sun Microsystems, Inc. for its users and licensees. Sun acknowledges the pioneering efforts
of Xerox in researching and developing the concept of visual or graphical user interfaces for the computer industry. Sun holds a non-exclusive license from Xerox to
the Xerox Graphical User Interface, which license also covers Sun's licensees who implement OPEN LOOK GUIs and otherwise comply with Sun's written license
agreements.
Products covered by and information contained in this publication are controlled by U.S. Export Control laws and may be subject to the export or import laws in
other countries. Nuclear, missile, chemical or biological weapons or nuclear maritime end uses or end users, whether direct or indirect, are strictly prohibited. Export
or reexport to countries subject to U.S. embargo or to entities identified on U.S. export exclusion lists, including, but not limited to, the denied persons and specially
designated nationals lists is strictly prohibited.
DOCUMENTATION IS PROVIDED “AS IS” AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO
THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.
Copyright 2009 Sun Microsystems, Inc.
4150 Network Circle, Santa Clara, CA 95054 U.S.A.
Tous droits réservés.
Sun Microsystems, Inc. détient les droits de propriété intellectuelle relatifs à la technologie incorporée dans le produit qui est décrit dans ce document. En particulier,
et ce sans limitation, ces droits de propriété intellectuelle peuvent inclure un ou plusieurs brevets américains ou des applications de brevet en attente aux Etats-Unis
et dans d'autres pays.
Cette distribution peut comprendre des composants développés par des tierces personnes.
Certaines composants de ce produit peuvent être dérivées du logiciel Berkeley BSD, licenciés par l'Université de Californie. UNIX est une marque déposée aux
Etats-Unis et dans d'autres pays; elle est licenciée exclusivement par X/Open Company, Ltd.
Sun, Sun Microsystems, le logo Sun, le logo Solaris, le logo Java Coffee Cup, docs.sun.com, Java, OpenSolaris, et Solaris sont des marques de fabrique ou des marques
déposées de Sun Microsystems, Inc., ou ses filiales, aux Etats-Unis et dans d'autres pays. Toutes les marques SPARC sont utilisées sous licence et sont des marques de
fabrique ou des marques déposées de SPARC International, Inc. aux Etats-Unis et dans d'autres pays. Les produits portant les marques SPARC sont basés sur une
architecture développée par Sun Microsystems, Inc. Adobe est une marque enregistree de Adobe Systems, Incorporated. PostScript est une marque de fabrique
d'Adobe Systems, Incorporated, laquelle pourrait ?‘tre d?pos?e dans certaines juridictions.
L'interface d'utilisation graphique OPEN LOOK et Sun a été développée par Sun Microsystems, Inc. pour ses utilisateurs et licenciés. Sun reconnaît les efforts de
pionniers de Xerox pour la recherche et le développement du concept des interfaces d'utilisation visuelle ou graphique pour l'industrie de l'informatique. Sun détient
une licence non exclusive de Xerox sur l'interface d'utilisation graphique Xerox, cette licence couvrant également les licenciés de Sun qui mettent en place l'interface
d'utilisation graphique OPEN LOOK et qui, en outre, se conforment aux licences écrites de Sun.
Les produits qui font l'objet de cette publication et les informations qu'il contient sont régis par la legislation américaine en matière de contrôle des exportations et
peuvent être soumis au droit d'autres pays dans le domaine des exportations et importations. Les utilisations finales, ou utilisateurs finaux, pour des armes nucléaires,
des missiles, des armes chimiques ou biologiques ou pour le nucléaire maritime, directement ou indirectement, sont strictement interdites. Les exportations ou
réexportations vers des pays sous embargo des Etats-Unis, ou vers des entités figurant sur les listes d'exclusion d'exportation américaines, y compris, mais de manière
non exclusive, la liste de personnes qui font objet d'un ordre de ne pas participer, d'une façon directe ou indirecte, aux exportations des produits ou des services qui
sont régis par la legislation américaine en matière de contrôle des exportations et la liste de ressortissants spécifiquement designés, sont rigoureusement interdites.
LA DOCUMENTATION EST FOURNIE "EN L'ETAT" ET TOUTES AUTRES CONDITIONS, DECLARATIONS ET GARANTIES EXPRESSES OU TACITES
SONT FORMELLEMENT EXCLUES, DANS LA MESURE AUTORISEE PAR LA LOI APPLICABLE, Y COMPRIS NOTAMMENT TOUTE GARANTIE
IMPLICITE RELATIVE A LA QUALITE MARCHANDE, A L'APTITUDE A UNE UTILISATION PARTICULIERE OU A L'ABSENCE DE CONTREFACON.
090206@21990
Contents
Preface ...................................................................................................................................................15
1
Introduction to Printing in the Solaris Operating System ........................................................... 21
What's New in Printing? ..................................................................................................................... 21
Common UNIX Printing System ............................................................................................... 22
OpenSolaris Print Manager ........................................................................................................ 22
Automatic Printer Discovery and Configuration in the Desktop Environment .................. 23
Privilege Requirements for Using Solaris Print Commands .................................................. 23
PPD File Management Utility ..................................................................................................... 25
Fundamentals of Printing in the Solaris Operating System ........................................................... 25
Overview of the Solaris Printing Architecture ................................................................................. 26
Implementation of the Open Standard Print API ........................................................................... 27
PAPI Print Client Commands .................................................................................................... 27
Using Printing Protocols in the Solaris Release ............................................................................... 28
Selecting the Client-To-Server Network Printing Protocol .................................................... 28
Printer URI Formats .................................................................................................................... 29
Selecting the Server-To-Printer Network Printing Protocol .................................................. 30
What is a Device URI? ................................................................................................................. 31
What Is the Internet Printing Protocol? .................................................................................... 32
Overview of the RFC-1179 Printing Protocol .......................................................................... 32
RFC-1179 Protocol Compared to the Internet Printing Protocol ......................................... 33
Using the SMB Protocol .............................................................................................................. 33
Overview of Solaris Print Manager ................................................................................................... 34
Overview of the LP Print Service ....................................................................................................... 34
Functions of the LP Print Service ............................................................................................... 35
Customizing the LP Print Service .............................................................................................. 35
The Solaris Print Client-Server Process ............................................................................................ 35
Using Print Servers ...................................................................................................................... 35
3
Contents
Using Print Clients ....................................................................................................................... 36
The Print Client Process .............................................................................................................. 36
How Local Printing Works ......................................................................................................... 37
How LP Administers Files and Schedules Local Print Requests ............................................. 38
How Remote Printing Works ..................................................................................................... 40
Where to Find Printing Tasks ............................................................................................................ 42
4
2
Planning for Printing in the Solaris Operating System (Tasks) ....................................................45
Determining a Method to Use for Printer Setup and Administration .......................................... 45
Selecting Printing Tools and Services ........................................................................................ 46
Determining Which Printing Protocol to Use ......................................................................... 47
Planning for Printer Setup and Administration .............................................................................. 48
Setting Printer Definitions .......................................................................................................... 48
Distributing Printers on the Network ............................................................................................... 56
Printer Configuration Resources ....................................................................................................... 57
Printing Support in the naming service Switch ........................................................................ 57
LDAP Print Support Guidelines ................................................................................................. 59
How the Solaris Printing Software Locates Printers ................................................................ 59
Assigning Print Servers and Print Clients ........................................................................................ 61
Print Server Requirements and Recommendations ........................................................................ 62
Spooling Space .............................................................................................................................. 62
Disk Space ..................................................................................................................................... 62
Memory Requirements ............................................................................................................... 62
Swap Space .................................................................................................................................... 63
Hard Disk ...................................................................................................................................... 63
3
Setting Up Printing Services (Tasks) ................................................................................................ 65
Setting Up Solaris Printing Services (Task Map) ............................................................................. 65
Using Solaris Print Manager .............................................................................................................. 66
Solaris Print Manager Options and Selectable Attributes ....................................................... 67
Solaris Print Manager and Special Characters .......................................................................... 67
Starting Solaris Print Manager ................................................................................................... 67
▼ How to Start Solaris Print Manager ........................................................................................... 67
Setting Up the Internet Printing Protocol ........................................................................................ 69
Configuring IPP Server and Client Data ................................................................................... 70
System Administration Guide: Solaris Printing • January 2009
Contents
IPP Keywords for Apache Web Server Configuration ............................................................ 71
▼ How to Configure IPP Server Data ............................................................................................ 71
▼ How to Configure IPP Client Data ............................................................................................ 72
Enabling and Disabling Printing Services (Task Map) ................................................................... 72
Administering Network Printing Services ....................................................................................... 73
▼ How to Enable the IPP Network Listening Service .................................................................. 73
▼ How to Disable the IPP Network Listening Service ................................................................. 74
▼ How to Restart the IPP Network Listening Service .................................................................. 74
▼ How to Enable the RFC-1179 Network Listening Service ....................................................... 74
▼ How to Disable the RFC-1179 Network Listening Service ..................................................... 74
▼ How to Restart the RFC-1179 Network Listening Service ...................................................... 75
▼ How to Enable the SMB Network Service ................................................................................. 75
▼ How to Disable the SMB Network Service ................................................................................ 75
▼ How to Restart the SMB Network Service ................................................................................. 75
4
Setting Up Printers (Tasks) ................................................................................................................. 77
Introduction to Setting Up Printers .................................................................................................. 77
Setting Up Printers on a Print Server (Task Map) ........................................................................... 78
Setting Up Directly Attached Printers by Using Solaris Print Manager ....................................... 79
Setting Printer Definitions by Using Solaris Print Manager ................................................... 81
▼ How to Add a New Directly Attached Printer by Using Solaris Print Manager ................... 82
▼ How to Use Solaris Print Manager to Add a Print Queue With the Local Host Specified as
the Host Name .............................................................................................................................. 84
Setting Up Directly Attached Printers by Using LP Print Service Commands ............................ 85
▼ How to Add a New Directly Attached Printer by Using LP Print Service Commands ........ 86
▼ How to Use LP Print Commands to Add a Print Queue With localhost Specified as the
Host Name .................................................................................................................................... 89
Setting Up Network Printers .............................................................................................................. 91
Sun Support for Network Printers ............................................................................................. 92
Invoking Network Printer Support ............................................................................................ 92
Selecting the Printer Node Name ............................................................................................... 92
Selecting the Destination Name (Also Called the Network Printer Access Name) .............. 93
Selecting the Printing Protocol ................................................................................................... 94
Setting the Timeout Value .......................................................................................................... 95
Managing Network Printer Access ............................................................................................ 95
Setting Up Network‐Attached Printers by Using Solaris Print Manager ...................... 96
5
Contents
▼ How to Add a New Network‐Attached Printer by Using Solaris Print Manager . 97
Setting Up Network‐Attached Printers by Using LP Print Commands ....................... 99
▼ How to Add a New Network‐Attached Printer by Using LP Print Service
Commands ................................................................................................................................. 100
▼ How to Set Up a Remote Printer That is Connected to a Solaris Print Server by Using
IPP ................................................................................................................................................ 105
Adding a New Network‐Attached Printer by Using Printer Vendor-Supplied
Software .............................................................................................................................................. 106
▼ How to Add a Attached Network Printer by Using Printer Vendor-Supplied Tools ........ 106
Setting Up Printers That are Associated With PPD Files ............................................................. 107
Using PPD Files When Setting Up a Printer in Solaris Print Manager ................................ 107
Specifying a PPD File When Setting Up a Printer by Using LP Print Commands ............. 108
▼ How to Specify a PPD File When Adding a New Printer by using LP Print Commands .. 108
Setting Up Printers on a Print Client (Task Map) ......................................................................... 109
Setting Up a Print Client ................................................................................................................... 109
▼ How to Add Printer Access by Using Solaris Print Manager ................................................ 110
▼ How to Add Printer Access by Using LP Print Commands .................................................. 110
Setting Up a .printers File ............................................................................................................. 111
▼ How to Set Up a .printers File ............................................................................................... 112
5
6
Administering Printers by Using Solaris Print Manager and LP Print Commands (Tasks) ....113
Introduction to Administering Printers ......................................................................................... 114
Administering Local Printers ................................................................................................... 114
Administering Network Printers ............................................................................................. 114
Setting Definitions for Printers ................................................................................................ 115
Administering Printers That Use PPD Files ........................................................................... 115
Administering Character Sets, Filters, Forms, and Fonts ..................................................... 115
Administering Printers by Using Solaris Print Manager (Task Map) ......................................... 116
▼ How to Delete a Printer by Using Solaris Print Manager ...................................................... 116
Administering Printers and the Print Scheduler by Using LP Print Commands (Task Map) . 117
▼ How to Delete a Printer and Remove Printer Access by Using LP Print Commands ........ 118
Checking Printer Status ............................................................................................................. 119
▼ How to Check the Status of Printers ........................................................................................ 120
Stopping and Restarting the Print Scheduler .......................................................................... 121
▼ How to Stop the Print Scheduler .............................................................................................. 122
▼ How to Restart the Print Scheduler .......................................................................................... 122
System Administration Guide: Solaris Printing • January 2009
Contents
Starting the Print Scheduler With Options ............................................................................. 123
▼ How to Set Print Option Values Only for the Duration of a Call ......................................... 123
▼ How to Set Printer Option Values That Remain Over a System Reboot ............................. 124
Setting Printer Definitions by Using LP Print Commands (Task Map) ..................................... 126
Setting Printer Definitions by Using LP Print Commands ................................................... 127
Setting Up a Default Printer Destination by Using LP Print Commands ........................... 128
▼ How to Set a System's Default Printer Destination by Using LP Print Commands ........... 128
Printing Banner Pages by Using LP Print Commands .......................................................... 129
▼ How to Make Banner Pages Optional by Using LP Print Commands ................................. 130
▼ How to Turn Off Banner Pages by Using LP Print Commands ........................................... 131
Setting Up Printer Classes by Using LP Print Commands .................................................... 131
▼ How to Define a Class of Printers by Using LP Print Commands ........................................ 132
Setting Up Printer Fault Alerts by Using LP Print Commands ............................................ 133
▼ How to Set Fault Alerts for a Printer by Using LP Print Commands ................................... 134
Setting Up Printer Fault Recovery by Using LP Print Commands ...................................... 135
▼ How to Set Printer Fault Recovery by Using LP Print Commands ...................................... 136
Limiting User Access to a Printer by Using LP Print Commands ........................................ 136
▼ How to Limit User Access to a Printer by Using LP Print Commands ............................... 138
Administering Print Requests by Using the LP Print Commands (Task Map) ......................... 139
▼ How to Check the Status of Print Requests ............................................................................. 140
Enabling or Disabling a Printer From Printing ...................................................................... 142
▼ How to Enable or Disable a Printer .......................................................................................... 142
Accepting or Rejecting Print Requests .................................................................................... 143
▼ How to Accept or Reject Print Requests for a Printer ............................................................ 144
Canceling a Print Request ......................................................................................................... 145
▼ How to Cancel a Print Request ................................................................................................. 146
▼ How to Cancel a Print Request From a Specific User ............................................................ 147
Moving a Print Request ............................................................................................................. 148
▼ How to Move Print Requests to Another Printer ................................................................... 148
Changing the Priority of Print Requests ................................................................................. 149
▼ How to Change the Priority of a Print Request ...................................................................... 149
Administering Printers That Are Associated With PPD Files (Task Map) ................................ 150
▼ How to Set Default Values for Print Queues That Are Associated With PPD Files ........... 151
Determining Whether a PPD File Is Associated With a Print Queue .................................. 154
7
Contents
8
6
Administering Printers That Use Network Printing Protocols (Tasks) ..................................... 157
Administering Printers by Using the Internet Printing Protocol (Task Map) ........................... 158
▼ How to Obtain Information About Printers When Using IPP ............................................. 158
▼ How to Move Remote Print Requests Between Print Queues on a Print Server When Using
IPP ................................................................................................................................................ 160
▼ How to Modify Remote Print Requests When Using IPP ..................................................... 160
Sharing Printers When Using IPP ........................................................................................... 161
IPP Authentication Mechanisms ............................................................................................. 162
Turning On IPP Authentication Mechanisms ....................................................................... 162
How to Set Authorizations That Enable You to Accept Print Queues When Using IPP? . 163
▼ How to Add a User to the IPP AuthUser File ......................................................................... 163
Administering Printers by Using the RFC-1179 Printing Protocol (Task Map) ....................... 164
▼ How to Use the RFC-1179 Protocol Listener to Cascade Print Requests ............................ 164
Administering Printers by Using the SMB Protocol ..................................................................... 165
7
Customizing Printing Services and Printers (Tasks) .................................................................... 167
Customizing Printing Services (Task Map) ................................................................................... 167
Adjusting Printer Port Characteristics .................................................................................... 167
Adding a terminfo Entry for an Unsupported Printer ......................................................... 169
Customizing the Printer Interface Program ........................................................................... 172
8
Administering Character Sets, Filters, Forms, and Fonts (Tasks) .............................................. 177
Administering Character Sets (Task Map) ..................................................................................... 177
Administering Character Sets .......................................................................................................... 178
Selectable Character Sets ........................................................................................................... 178
Hardware Character Sets ........................................................................................................... 179
Tracking Print Wheels .............................................................................................................. 180
Alerts for Mounting Print Wheels or Font Cartridges .......................................................... 180
▼ How to Define a Print Wheel or Font Cartridge ..................................................................... 180
▼ How to Unmount and Mount a Print Wheel or Font Cartridge .......................................... 181
▼ How to Set an Alert to Mount a Print Wheel or Font Cartridge ........................................... 182
▼ How to Set Up an Alias for a Selectable Character Set ........................................................... 184
Administering Print Filters (Task Map) ......................................................................................... 185
Creating a New Print Filter ............................................................................................................... 186
Writing a Print Filter Program ................................................................................................. 186
System Administration Guide: Solaris Printing • January 2009
Contents
Creating a Print Filter Definition ............................................................................................. 189
▼ How to Create a New Print Filter ............................................................................................. 195
Administering Print Filters .............................................................................................................. 196
Creating Print Filters ................................................................................................................. 197
Adding, Changing, Deleting, and Restoring Print Filters ..................................................... 197
▼ How to Add a Print Filter .......................................................................................................... 198
▼ How to Delete a Print Filter ...................................................................................................... 199
▼ How to View Information About a Print Filter ...................................................................... 200
Administering Forms (Task Map) ................................................................................................... 201
Creating a New Printer Form ........................................................................................................... 202
▼ How to Create a New Printer Form Definition ....................................................................... 204
Administering Forms ........................................................................................................................ 205
Adding, Changing, or Deleting Forms .................................................................................... 205
▼ How to Add a Form .................................................................................................................... 205
▼ How to Delete a Form ................................................................................................................ 206
Mounting Forms ........................................................................................................................ 207
▼ How to Unmount and Mount a Form ..................................................................................... 207
Tracking Forms .......................................................................................................................... 209
Defining Alerts for Mounting Forms ....................................................................................... 209
▼ How to Set an Alert to Mount a Form ...................................................................................... 209
Checking Forms ......................................................................................................................... 210
▼ How to View Information About a Form ................................................................................ 211
▼ How to View the Current Status of a Form ............................................................................. 211
Limiting Access to Forms .......................................................................................................... 212
▼ How to Limit User Access to a Form ....................................................................................... 212
▼ How to Limit Printer Access to a Form ................................................................................... 213
Administering Fonts (Task Map) .................................................................................................... 214
Administering Fonts ......................................................................................................................... 214
Managing Printer-Resident Fonts ........................................................................................... 215
Downloading Host-Resident Fonts ......................................................................................... 216
Installing and Maintaining Host-Resident Fonts ................................................................... 216
▼ How to Install Downloaded PostScript Fonts ......................................................................... 217
▼ How to Install Host-Resident PostScript Fonts ...................................................................... 217
9
Contents
9
Administering Printers by Using the PPD File Management Utility (Tasks) ............................219
Administering PPD Files by Using the PPD File Management Utility (Task Map) .................. 219
Overview of the PPD File Management Utility .............................................................................. 220
Adding PPD Files to a System ................................................................................................... 221
Specifying a PPD File Label ....................................................................................................... 221
Specifying a PPD File Repository ............................................................................................. 222
Locating PPD File Label and Repository Information in Solaris Print Manager ............... 222
Using the PPD File Manager (ppdmgr) Utility ............................................................................... 223
▼ How to Add a PPD File to a System by Using the ppdmgr Utility ......................................... 223
▼ How to Add a PPD File to a System by Using the lpadmin -n Command ......................... 226
Updating the PPD Cache File ................................................................................................... 227
Rebuilding the PPD Cache File ................................................................................................ 228
▼ How to Update or Rebuild the PPD Cache File by Using the ppdmgr Utility ...................... 228
Managing the ppd-cache-update Service .............................................................................. 230
▼ How to Enable or Disable the ppd-cache-update Service .................................................... 230
10
Setting Up and Administering Printers From the Desktop (Tasks) ............................................233
Introduction to the OpenSolaris Print Manager ........................................................................... 234
Common Tasks That You Can Perform With OpenSolaris Print Manager ....................... 234
Managing Network Device Discovery Services (Task Map) ........................................................ 235
How Auto‐Discovery of Devices Works ................................................................. 235
Adding Newly Discovered Printers From the Desktop ......................................................... 236
Notification of Printing Events in the Desktop ...................................................................... 237
Panel Notification Icon Context Menu ................................................................................... 238
▼ How to Enable the Network Device Discovery Service ......................................................... 238
▼ How to Initiate the Network Device Discovery Services by Using SMF .............................. 239
▼ How to Determine Which Printers Are Known to the System ............................................. 240
Managing Printers and Printer Queues (Task Map) ..................................................................... 241
Getting Started With the OpenSolaris Print Manager .................................................................. 242
About the Print Manager Window .......................................................................................... 243
Setting Up Printers by Using the OpenSolaris Print Manager ..................................................... 243
▼ How To Set Up Auto-Discovered Printers by Using the OpenSolaris Print Manager ...... 244
▼ How to Manually Add a Printer by Using the OpenSolaris Print Manager ........................ 246
Managing Printer Queues ......................................................................................................... 247
▼ How to View or Change Printer Queue Properties ................................................................ 247
10
System Administration Guide: Solaris Printing • January 2009
Contents
▼ How to Delete a Printer Queue ................................................................................................. 249
▼ How to Pause or Resume a Printer Queue .............................................................................. 249
Managing Printer Groups and Print Jobs (Task Map) .................................................................. 250
Managing Printer Groups ................................................................................................................ 251
▼ How to Create a New Printer Group ........................................................................................ 252
▼ How to Create a New Search Group ........................................................................................ 252
▼ How to Create a New Search Group by Using a Queue Pane Filter ..................................... 253
▼ How to View or Change an Existing Search Group's Properties .......................................... 253
▼ How to Delete a Printer Group ................................................................................................. 253
Managing Print Jobs .......................................................................................................................... 254
▼ How to Delete a Print Job .......................................................................................................... 254
Managing Print Manager and Printer Preferences (Task Map) ................................................... 255
Managing Print Manager and Printer Preferences ........................................................................ 256
Setting Print Manager Preferences .......................................................................................... 256
Setting Preferences for Local USB Printer Discovery ............................................................ 257
Settings Preferences for Network‐Attached Printer Discovery ............................ 258
Configuring Auto-Discovery Settings for Network‐Attached Printers ............... 259
11
Printing in the Solaris Operating System (Reference) ................................................................ 261
Solaris Print Manager ....................................................................................................................... 261
Printer Definitions You Can Set With Solaris Print Manager .............................................. 261
LP Print Service .................................................................................................................................. 264
LP Print Service Commands ..................................................................................................... 264
Daemons and LP Internal Files ................................................................................................ 265
LP Print Service Directories ...................................................................................................... 265
LP Print Service Configuration Files ....................................................................................... 266
The terminfo Database ............................................................................................................. 268
Printer Names in the terminfo Database ............................................................................... 268
LP Print Service Log Files .......................................................................................................... 269
Print Queue Logs ....................................................................................................................... 269
History Log Files ........................................................................................................................ 270
Spooling Directories .................................................................................................................. 273
Filtering Print Files .................................................................................................................... 274
How the Printer Interface Program Works ............................................................................ 274
Using PPD Files To Set Up Printers ................................................................................................ 275
11
Contents
Raster Image Processor Support .............................................................................................. 275
Support for PostScript Printer Description Files ................................................................... 275
Where to Find Information About Supported Printers and Available PPD Files .............. 276
PPD File Management Utility .......................................................................................................... 277
PPD File Repositories ................................................................................................................ 278
PPD File Labels ........................................................................................................................... 279
Description of the Printer Driver Field in Solaris Print Manager ........................................ 280
Manufacturer Aliases File ......................................................................................................... 281
PPD File Caches ......................................................................................................................... 281
Description of the Command-Line Options for the ppdmgr Utility .................................... 282
How PAPI Is Implemented in the Solaris OS ................................................................................. 284
Modified Solaris Print Commands .......................................................................................... 285
12
Troubleshooting Printing Problems (Tasks) .................................................................................287
Tips on Troubleshooting Printer Setup Problems ........................................................................ 287
Locating Information About Parallel and USB-Connected Print Devices ......................... 287
Tips on Troubleshooting Printing Problems ................................................................................. 288
Troubleshooting No Output (Nothing Prints) ....................................................................... 288
Troubleshooting Printing Problems ........................................................................................ 290
Troubleshooting Incorrect Output .......................................................................................... 290
Troubleshooting Hung lp Commands ................................................................................... 292
Troubleshooting Idle (Hung) Printers .................................................................................... 292
Troubleshooting Conflicting Status Messages ....................................................................... 293
Troubleshooting Printing Problems ............................................................................................... 293
Troubleshooting No Printer Output ....................................................................................... 294
▼ How to Check the Printer Hardware ....................................................................................... 294
▼ How To Check the Printer Network Connections ................................................................. 295
▼ How to Debug Printing Problems ............................................................................................ 295
▼ How to Check the Basic Functions of the LP Print Service ................................................... 296
▼ How to Check Printing From a Solaris Print Client to a Solaris Print Server ..................... 300
▼ How to Troubleshoot Incorrect Output .................................................................................. 301
▼ How to Unhang the LP Print Service ....................................................................................... 305
Troubleshooting an Idle (Hung) Printer ................................................................................. 305
▼ How to Check That the Printer is Ready to Print ................................................................... 305
Checking for Print Filtering ...................................................................................................... 306
12
System Administration Guide: Solaris Printing • January 2009
Contents
▼ How to Resume Printing After a Printer Fault ....................................................................... 306
▼ How to Send Print Requests to a Remote Printer When Requests in the Local Queue Are
Backed Up ................................................................................................................................... 306
▼ How to ReleasePrint Requests That Are Backed Up onthe Print Server ............................. 307
▼ How to Resolve Conflicting Printer Status Messages ............................................................ 307
A
Using the Internet Printing Protocol .............................................................................................. 309
Overview of Solaris IPP Support ..................................................................................................... 309
Overview of the IPP Listening Service ............................................................................................ 310
How the IPP Listening Service Works ..................................................................................... 311
IPP Components ............................................................................................................................... 311
IPP Libraries ............................................................................................................................... 312
IPP Support Model ............................................................................................................................ 313
IPP Object Model ....................................................................................................................... 313
IPP Printer Object ...................................................................................................................... 313
IPP Job Object ............................................................................................................................ 314
IPP Server-Side Support ................................................................................................................... 314
Configuration of IPP Server-Side Data ................................................................................... 315
IPP Operation Keywords .......................................................................................................... 316
IPP Client-Side Support ................................................................................................................... 318
lpsched Support ........................................................................................................................ 319
IPP Attributes ..................................................................................................................................... 319
Glossary .............................................................................................................................................. 321
Index ................................................................................................................................................... 325
13
14
Preface
System Administration Guide: Solaris Printing is part of a set that covers a significant part of the
SolarisTM system administration information. This guide includes information for both SPARC®
and x86 based systems.
This book assumes that you have installed the SunOSTM Solaris Operating System. It also
assumes that you have set up any networking software that you plan to use.
For the Solaris release, new features that are interesting to system administrators are covered in
sections called What's New in ... ? in the appropriate chapters.
Note – This Solaris release supports systems that use the SPARC and x86 families of processor
architectures: UltraSPARC®, SPARC64, AMD64, Pentium, and Xeon EM64T. The supported
systems appear in the Solaris 10 Hardware Compatibility Lists at
http://www.sun.com/bigadmin/hcl. This document cites any implementation differences
between the platform types.
In this document these x86 related terms mean the following:
■
“x86” refers to the larger family of 64-bit and 32-bit x86 compatible products.
■
“x64” points out specific 64-bit information about AMD64 or EM64T systems.
■
“32-bit x86” points out specific 32-bit information about x86 based systems.
For supported systems, see the Solaris 10 Hardware Compatibility Lists.
Who Should Use This Book
This book is intended for anyone responsible for administering one or more systems that are
running the Solaris release. To use this book, you should have 1-2 years of UNIX® system
administration experience. Attending UNIX system administration training courses might be
helpful.
15
Preface
How the System Administration Guides Are Organized
Here is a list of the topics that are covered by the System Administration Guides.
Book Title
Topics
System Administration Guide: Basic Administration
User accounts and groups, server and client support, shutting
down and booting a system, managing services, and managing
software (packages and patches)
System Administration Guide: Advanced Administration
Terminals and modems, system resources (disk quotas,
accounting, and crontabs), system processes, and troubleshooting
Solaris software problems
System Administration Guide: Devices and File Systems
Removable media, disks and devices, file systems, and backing up
and restoring data
System Administration Guide: IP Services
TCP/IP network administration, IPv4 and IPv6 address
administration, DHCP, IPsec, IKE, Solaris IP filter, Mobile IP, IP
network multipathing (IPMP), and IPQoS
System Administration Guide: Naming and Directory Services
(DNS, NIS, and LDAP)
DNS, NIS, and LDAP naming and directory services, including
transitioning from NIS to LDAP and transitioning from NIS+ to
LDAP
System Administration Guide: Naming and Directory Services
(NIS+)
NIS+ naming and directory services
System Administration Guide: Network Interfaces and Network
Virtualization
Networking stack, NIC driver property configuration, network
interface configuration, administration of VLANs and link
aggregations, configuring WiFi wireless networking.
System Administration Guide: Network Services
Web cache servers, time-related services, network file systems
(NFS and Autofs), mail, SLP, and PPP
System Administration Guide: Solaris Printing
Solaris printing topics and tasks, using services, tools, protocols,
and technologies to set up and administer printing services and
printers
System Administration Guide: Security Services
Auditing, device management, file security, BART, Kerberos
services, PAM, Solaris Cryptographic Framework, privileges,
RBAC, SASL, and Solaris Secure Shell
System Administration Guide: Virtualization Using the Solaris
Operating System
Resource management features, which enable you to control how
applications use available system resources; zones software
partitioning technology, which virtualizes operating system
services to create an isolated environment for running
applications; and virtualization using SunTM xVM hypervisor
technology, which supports multiple operating system instances
simultaneously
16
System Administration Guide: Solaris Printing • January 2009
Preface
Book Title
Topics
Solaris CIFS Administration Guide
Solaris CIFS service, which enables you to configure a Solaris
system to make CIFS shares available to CIFS clients; and native
identity mapping services, which enables you to map user and
group identities between Solaris systems and Windows systems
Solaris Trusted Extensions Administrator’s Procedures
System installation, configuration, and administration that is
specific to Solaris Trusted Extensions
Solaris ZFS Administration Guide
ZFS storage pool and file system creation and management,
snapshots, clones, backups, using access control lists (ACLs) to
protect ZFS files, using ZFS on a Solaris system with zones
installed, emulated volumes, and troubleshooting and data
recovery
Related Third-Party Web Site References
Note – Sun is not responsible for the availability of third-party web sites mentioned in this
document. Sun does not endorse and is not responsible or liable for any content, advertising,
products, or other materials that are available on or through such sites or resources. Sun will not
be responsible or liable for any actual or alleged damage or loss caused by or in connection with
the use of or reliance on any such content, goods, or services that are available on or through
such sites or resources.
Documentation, Support, and Training
The Sun web site provides information about the following additional resources:
■
■
■
Documentation (http://www.sun.com/documentation/)
Support (http://www.sun.com/support/)
Training (http://www.sun.com/training/)
Typographic Conventions
The following table describes the typographic conventions that are used in this book.
17
Preface
TABLE P–1
Typographic Conventions
Typeface
Meaning
Example
AaBbCc123
The names of commands, files, and directories,
and onscreen computer output
Edit your .login file.
Use ls -a to list all files.
machine_name% you have mail.
What you type, contrasted with onscreen
computer output
machine_name% su
aabbcc123
Placeholder: replace with a real name or value
The command to remove a file is rm
filename.
AaBbCc123
Book titles, new terms, and terms to be
emphasized
Read Chapter 6 in the User's Guide.
AaBbCc123
Password:
A cache is a copy that is stored
locally.
Do not save the file.
Note: Some emphasized items
appear bold online.
Shell Prompts in Command Examples
The following table shows the default UNIX system prompt and superuser prompt for the C
shell, Bourne shell, and Korn shell.
TABLE P–2
Shell Prompts
Shell
Prompt
C shell
machine_name%
C shell for superuser
machine_name#
Bourne shell and Korn shell
$
Bourne shell and Korn shell for superuser
#
General Conventions
Be aware of the following conventions that are used in this book.
18
■
When following steps or using examples, be sure to type double-quotes ("), left
single-quotes (‘), and right single-quotes (’) exactly as shown.
■
The key referred to as Return is labeled Enter on some keyboards.
System Administration Guide: Solaris Printing • January 2009
Preface
■
It is assumed that the root path includes the /sbin, /usr/sbin, /usr/bin, and /etc
directories, so the steps in this book show the commands in these directories without
absolute path names. Steps that use commands in other, less common, directories show the
absolute path in the example.
■
The examples in this book are for a basic SunOS software installation without the Binary
Compatibility Package installed and without /usr/ucb in the path.
Caution – If /usr/ucb is included in a search path, it should always be at the end of the search
path. Commands like ps or df are duplicated in /usr/ucb with different formats and
different options from the SunOS commands.
19
20
1
C H A P T E R
1
Introduction to Printing in the Solaris
Operating System
This chapter provides an introduction to printing in the Solaris Operating System ( Solaris OS).
Conceptual information about Solaris printing services, tools, and protocols is described. Each
of the subsequent chapters in this book describe how to use these tools, protocols, and
technologies to administer printing services and printers.
Several terms and concepts that are introduced in this chapter and are used frequently
throughout this book. To fully grasp printing concepts, a basic understanding of these concepts
and terms is essential. For a complete listing of all the printing concepts and terms, see Glossary.
This is a list of the information in this chapter.
■
■
■
■
■
■
■
■
■
“What's New in Printing?” on page 21
“Fundamentals of Printing in the Solaris Operating System” on page 25
“Overview of the Solaris Printing Architecture” on page 26
“Implementation of the Open Standard Print API” on page 27
“Using Printing Protocols in the Solaris Release” on page 28
“Overview of Solaris Print Manager” on page 34
“Overview of the LP Print Service ” on page 34
“The Solaris Print Client-Server Process” on page 35
“Where to Find Printing Tasks” on page 42
What's New in Printing?
This section describes new and changed printing features in this Solaris release. For a complete
listing of new Solaris features and a description of Solaris releases, see Solaris Express Developer
Edition What’s New.
21
What's New in Printing?
Common UNIX Printing System
Solaris Express Community Edition, build 87: The Common UNIX Printing System (CUPS),
Version 1.3.6, is now part of the Solaris OS distribution.
The Common UNIX Printing System (CUPS) is a modular printing system that enables a
system to function as a print server. A system that is running CUPS is a host that can accept
print requests from client systems, process the requests, then send them to the appropriate
printer.
To facilitate this support in the Solaris OS, the following interfaces have been introduced:
■
A new print-service command that enables you choose between the LP print service and
CUPS.
■
Two new Service Management Facility (SMF) services:
■
svc:/application/cups/scheduler – This service controls the cupsd daemon. This
daemon provides basic printing services, including queueing, filtering, spooling,
notification, Internet Print Protocol support, device enumeration, web management,
and more.
■
svc:/application/cups/in-lpd – This service controls the cupd-lpd daemon. This
daemon provides basic RFC-1179 (LPD protocol) support for CUPS.
The Printer Management profile and the solaris.smf.manage.cups authorization enable
users who do not have superuser privileges to manage these SMF services.
Note – These services are marked as incompatible with their corresponding LP services and
will not run if the corresponding LP services are running.
For more information, see the CUPS documentation page, at
http://www.opensolaris.org/os/community/printing/Documentation/cupsprint/. The
complete set of CUPS documentation is also accessible from a CUPS server on a host that is
running CUPS by typing http://localhost:631/help/ in a web browser.
OpenSolaris Print Manager
Solaris Express Community Edition, build 97 and OpenSolaris 2008.11 release: The
OpenSolarisTM Print Manager application is a graphical user interface (GUI) that you can use to
manage local and remote printer queues, printer groups, and print jobs. Print Manager enables
you to perform many aspects of printer administration. You can run the OpenSolaris Print
Manager application from the Main Menubar on the GNOME desktop panel. For more
information, see Chapter 10, “Setting Up and Administering Printers From the Desktop
(Tasks).”
22
System Administration Guide: Solaris Printing • January 2009
What's New in Printing?
Automatic Printer Discovery and Configuration in the
Desktop Environment
OpenSolaris 2008.05: The Solaris OS has the capability to automatically discover directly
attached and network-attached printers. This service is implemented through the Hardware
Abstraction Layer (HAL) and has the capability to detect SNMP capable printers on a on
network where a Solaris host is attached. This functionality is managed by the Service
Management Facility (SMF) and can be enabled by using the svcadm command. Authorizations
that are required to use this feature have been added to the Print Management user profile. See
Chapter 10, “Setting Up and Administering Printers From the Desktop (Tasks),” for further
details of this feature.
This feature provides the following types of support:
■
■
■
Detection
Configuration
Notification
The detection component has the ability to discover USB printers that have been physically
connected to or disconnected from a local system. The configuration component enables you to
configure certain properties of directly attached USB printers. The notification component lets
you know when a printer has been connected or disconnected from the local system.
Automatic printer discovery includes enhanced hardware abstraction layer (HAL) support for
recognizing USB printer hotplug events, as well as network attached printers on a Solaris hosted
network. HAL USB support was introduced in the Solaris Express Developer Edition 5/07
release. The hardware abstraction layer (HAL) daemon, hald, provides a view of devices that
are attached to a local system. This view is updated automatically as a system's hardware
configuration changes, by hotplugging or other methods. You can find out more about HAL at
http://opensolaris.org/os/project/tamarack/.
More information can be found at http://www.opensolaris.org/os/project/presto.
For step-by-step instructions, see Chapter 10, “Setting Up and Administering Printers From the
Desktop (Tasks).”
More information about other OpenSolaris printing projects can be found at
http://opensolaris.org/os/community/printing/.
Privilege Requirements for Using Solaris Print
Commands
The design of the Open Standard Print API (PAPI) implementation in the Solaris release makes
it no longer necessary for applications, toolkits, and print commands to run with elevated
privilege to interact with print services.
Chapter 1 • Introduction to Printing in the Solaris Operating System
23
What's New in Printing?
As a result, the following print commands are no longer installed SUID root:
■
■
■
■
■
■
■
■
/usr/bin/lp
/usr/bin/lpstat
/usr/bin/cancel
/usr/bin/lpmove
/usr/{ucb|bin}/lpr
/usr/{ucb|bin}lpq
/usr/{ucb|bin}/lprm
/usr/lib/print/printd
Previsously, these commands were installed SUID root because the commands required an
elevated privilege for the following purposes:
■
■
■
Opening a reserved port
Allocating a sequential job-id number
Manipulating files in the /var/spool/print directory
This functionality is now localized in a small helper application, /usr/lib/print/lpd-port. As
a result, any applications that use RFC-1179 PAPI support no longer require elevated privilege.
The lpd-port helper application contains minimal support for passing RFC-1179 protocol
requests on a reserved port and allocating sequential job-id numbers. Although the helper
application is installed SUID root, all elevated privileges are dropped until they are required.
When necessary, the privilege is elevated for the required operation and then permanently
dropped if the elevated privilege is no longer required. In the Solaris release, this process is
accomplished through the use of privileges. On other platforms, the process is accomplished by
using the setuid, seteuid, or setreuid functions.
If you have local printers that you do not want to share on the network, you can safely disable
the printing network listeners. If you are running the Solaris release, or a CUPS server, the
lpstat command provides you with more information about remote print queues and print
jobs, as well as their capabilities when using IPP to communicate with those servers.
When IPP is in use, and with the proper authorization, the following operations can be
performed on remote print queues and print jobs:
■
■
■
■
■
■
accept
reject
enable
disable
move job
modify job
Also, you can now move print requests between queues on a print server and modify print
requests remotely when IPP is in use.
For more information, see the privileges(5) man page. For step-by-step procedures, see
“Administering Printers by Using the Internet Printing Protocol (Task Map)” on page 158.
24
System Administration Guide: Solaris Printing • January 2009
Fundamentals of Printing in the Solaris Operating System
PPD File Management Utility
Solaris Express Developer Edition 5/07: The PPD File Manager, /usr/sbin/ppdmgr, is a
utility for administering PostScriptTM Printer Description (PPD) files that are used with the
Solaris print subsystem. When you add a PPD file to the system by using the ppdmgr utility or
the lpadmin command with the -n option, a cache of PPD file information is automatically
updated. This cache is used by Solaris Print Manager and the printing tools that are available in
the GNOME Desktop Environment.
For more information, see “Administering PPD Files by Using the PPD File Management
Utility (Task Map)” on page 219 and the ppdmgr(1M) man page.
Fundamentals of Printing in the Solaris Operating System
The Solaris printing software provides an environment for setting up and managing print
servers and print clients.
The Solaris printing software contains these tools and services:
■
Solaris Print Manager – A graphical user interface (GUI) that enables you to manage
printing configuration on a local system or in a naming service.
■
LP print service commands – A command-line interface (CLI) that is used to set up and
manage printers on a local system or in a naming service. These commands also provide
functionality that extend beyond the other print management tools.
■
PostScript Printer Definition File Manager (ppdmgr) – The PPD File Manager is a
command-line utility that is used to administer PPD files and the cache of printer
information on a Solaris system.
■
OpenSolaris Print Manager – Is a GUI tool that is available in the GNOME Desktop
Environment for automatic printer discovery and configuration. The tool monitors printer
attachments and detachments.
For more information, see Chapter 5, “Administering Printers by Using Solaris Print Manager
and LP Print Commands (Tasks).”
The Solaris printing software includes these additional interfaces, protocols, and technologies:
■
■
■
■
Open Standard Print API (PAPI) interface
Berkeley Software Distribution (BSD) protocol
Internet Printing Protocol (IPP)
Server Message Block (SMB) protocol, through Samba
Chapter 1 • Introduction to Printing in the Solaris Operating System
25
Overview of the Solaris Printing Architecture
Overview of the Solaris Printing Architecture
At the core of the print system is a UNIX System V (R4) based spooler. In addition to the
spooler are client applications that are used to make requests of and manage the spooler. filters
that perform document translation, back-end processing software that performs final
document transformation , and device (printer) communication. To utilize the complete
functionality of the print system, all these resources are required.
Printing in the Solaris OS consists of the software to support the following:
■
Print commands
■
Print spooler
■
Over-the-wire protocol
■
Underlying technologies that move a print request from the client to the server, and, or the
printer
The following figure is a high level diagram that represents the Solaris print system
components.
currently layered
on BSD/SYSV
commands,
migrating to PAPI
IPP Listener
_foomatic
interface scripts
Apache
mod_ipp.so
IPP
Mozilla,
Star/OpenOffice,
Xprint, KDE/Qt,
Other Applications
PAPI
GNOME Applications
[net]standard
interface script
RFC1179
LPD Listener
libipp-listener.so
libipp-core.so
PAPI
SYSV commands
Foomatic
Ghostscript
a2ps
ImageMagick
hpijs/gimp-print
SAMBA Listener
SAMBA
(smbd)
URI
interface script
smb spool
RFC1179
BSD commands
lp.cat postio netpr
Solaris LP Server
LPSCHED
Solaris LP Client
Recent changes in Solaris printing include the integration of IPP client-side support,
implemented through the PAPI. The Berkeley Software Distribution (BSD) and System V
(SysV) commands, as well as some applications, are layered on top of the PAPI interface. See
“Implementation of the Open Standard Print API” on page 27.
26
System Administration Guide: Solaris Printing • January 2009
Implementation of the Open Standard Print API
Implementation of the Open Standard Print API
The Solaris implementation of the Open Standard Print API, also referred to as PAPI, makes it
possible to layer applications, toolkits and print commands on top of a print service, protocol
neutral interface. This implementation can be used with RFC-1179, IPP-based, and LP-based
printing services. Printer, server, and job attributes, as well as job submission and queries to a
printer, are among the supported PAPI functions. This support enables the print client, be it an
application, or the print commands themselves, to query the print system about the
characteristics of a printer and to request information.
For more information, see the following references:
■
■
“How PAPI Is Implemented in the Solaris OS” on page 284.
http://sf.net/projects/openprinting.
PAPI Print Client Commands
Historically, printing commands have been tied to a specific print system because they have
been implemented on top of print system specific protocols and interfaces. Examples include
the BSD, LPR, SysV LP, LPRng, and CUPS printing protocols. The introduction of the PAPI,
makes it possible to layer these print commands on top of a print service, protocol neutral,
interface.
The PAPI provides applications a single interface for print service interaction. This means that
applications can be written to use this interface and work with a variety of print services without
requiring changes to the applications. Applications are no longer tied to a particular print
service, such as the LP print service or CUPS. Instead, print services can easily be replaced on a
system without impacting the protocol or application layers above. Ultimately, print services
can be both developed and selected based on specific needs.
The PAPI interacts with the lpsched command and RFC-1179-based servers. PAPI also enables
interaction with CUPS servers by using libcups and native IPP client-side support. The PAPI
supports that is available in the Solaris OS includes the modification of several common BSD
and SysV printing commands. The new command implementations are layered on the PAPI.
Hence, these commands can work with a variety of printing services.
The PAPI implementation in the Solaris OS also includes server-side and client-side support for
IPP, which is layered on top of the PAPI. IPP is implemented as a set of protocol-specific
libraries and an Apache module. Like the command implementations, the IPP Listening Service
can be used with any printing service that supports the PAPI. Server-side support for the
RFC-1179 protocol is also available. For more information, see Chapter 3, “Setting Up Printing
Services (Tasks).”
Chapter 1 • Introduction to Printing in the Solaris Operating System
27
Using Printing Protocols in the Solaris Release
The following is a list of the PAPI supported components:
■
libpapi-common.so – Core PAPI attribute support
■
libpapi.so – PAPI library with dynamic backend support
■
psm-lpd.so – PAPI support on top of the RFC-1179 protocol
■
psm-ipp.so and libipp-core.so – PAPI support on top of IPP
■
in.lpd – RFC-1179 protocol listening support
■
mod_ipp.so, libipp-listener.so – IPP listening support under the Apache Web Server,
Versions 1.0 and 2.0
■
BSD and SysV command implementations on top of the PAPI interface – See “Modified
Solaris Print Commands” on page 285 for a complete listing of the modified commands.
Using Printing Protocols in the Solaris Release
The overall printing architecture in the Solaris OS uses network printing protocols to
communicate with print services in following ways:
■
■
Client-to-server communications
Server-to-printer communications
The Solaris Express software provides applications, toolkits, printing commands, and an
application programming interface that interacts with print services. This API is called the
PAPI. The PAPI consists of a front-end API implementation that dynamically loads back-end
print service or protocol modules that communicate directly with print services. These print
services contain the print job or print queue that is being acted upon. Client-to-server
communications include the RFC-1179 and IPP protocols, as well as support for
communicating with a local LP print service. For server-to-printer communications, the
network printing protocol support enables the print service to transmit print jobs directly to
network-attached printers.
Server-to-printer communications include support for the following network protocols:
■
■
■
■
Raw Transmission Control Protocol (TCP) socket
RFC-1179
IPP
SMB
Selecting the Client-To-Server Network Printing
Protocol
Applications, toolkits, and printing commands select the protocol to use for client-to-server
communications, based on the value of the printer-uri-supported attribute that is found in
28
System Administration Guide: Solaris Printing • January 2009
Using Printing Protocols in the Solaris Release
the printers.conf database entry for the specified print queue. This value is automatically
generated and populated when access to a remote print queue is configured by using the
lpadmin command or when an application uses the interface that is being referenced to perform
an action or actions.
For example, when printing a document while using Mozilla, the path that is followed to gain
access to the printer is:
Mozilla → lp → PAPI
For more information, see the printers.conf(4)
The lpadmin command generates printer-uri-supported values using the following format:
{ipp|lpd}://server/printers/queue
To determine which URI to use in the printers.conf database, the lpadmin command probes
the remote print service. If the remote print service supports IPP, this protocol is preferred over
the BSD protocol. However, you can override automatic protocol selection by specifying the
-soption with the lpadmin command, then supplying a different URI. For more information,
see the “Printer URI Formats” on page 29.
The print subsystem uses the BSD print protocol, also referred to as the RFC-1179 protocol, and
raw Transmission Control Protocol (TCP), the basic communication language or protocol of
the Internet, to communicate with the printer. If you are setting up a printer that includes
printer vendor documentation, information about which protocol to use is provided. The TCP
protocol is the protocol that is most often used for printing on the network.
Printer URI Formats
The following are supported printer URI formats:
TABLE 1–1
lpsched
Supported URI Formats for Print Commands
lpsched://localhost/printers/queue
This printer URI scheme can only be used to contact a local LP service to access
the print queue that is specified in the URI.
lpd
lpd://localhost/printers/queue[#extensions]
Use this printer URI scheme to contact local or remote print services to address
the specified print queue on the host that is specified in the URI. The optional
#extensions can be specified as #solaris to indicate that the server host will
process Solaris extensions to the RFC-1179 protocol during print job submission.
Chapter 1 • Introduction to Printing in the Solaris Operating System
29
Using Printing Protocols in the Solaris Release
TABLE 1–1
ipp
Supported URI Formats for Print Commands
(Continued)
ipp://server[:port]/printers/queue
http://server:631/printers/queue
ipp://server[:port]/...
Use this printer URI scheme to contact local or remote print services to address a
particular print queue on the host that is specified in the URI. The IPP URI
scheme is described in the IPP specifications. This printer URI scheme utilizes
more of a free form than the LPD printer URI scheme. All of the Solaris and
CUPS-based print queues are accessed by using these schemes, or formats.
Access to print queues on other IPP-based print servers requires the use of the
server supported IPP URI scheme. Typically, the scheme that is used is one those
that are listed in this table.
Selecting the Server-To-Printer Network Printing
Protocol
Network-attached printers often support more than one method of communicating with a
print service. The most common method of communicating with the print service is through a
raw TCP connection to a well-known port on the device. Other methods of communication
include the RFC-1179 and IPP network protocols. You can select the server-to-printer
communication protocol when adding a new print queue in one of following ways:
■
By using the lpadmin command with the following options, and as shown here:
# lpadmin -o protocol={bsd|tcp} -o dest=printer:queue-or-port -m netstandard{_foomatic}
This method for communicating with the print service was introduced in the Solaris 2.6 OS
and is available in all subsequent Solaris releases.
■
The second method is to use the lpadmin command with the -d option, supplying a
device-uri, and the -m option, specifying a uri.
This method for communicating with the print service was introduced more recently and is
intended to replace the previous method. For more information, see “What is a Device
URI?” on page 31.
When determining which protocol to use for server-to-printer communication, consult the
vendor printer documentation for more specific information. Documentation includes
information such as TCP port numbers, RFC-1179 printer names, and the IPP printer URIs
that are supported by the device. In most instances, a raw TCP socket communication is likely
to provide the most reliable results.
Also, note that due to differences between printing services on UNIX and Windows platforms,
Windows hosted printers should be configured as network-attached printers and administered
as such. These types of printers require the creation of a print queue if you are using them on a
30
System Administration Guide: Solaris Printing • January 2009
Using Printing Protocols in the Solaris Release
Solaris system. These printers might also use the SMB protocol for server-to-printer
communication. For more information about the SMB protocol, see “Using the SMB Protocol”
on page 33.
For more information about setting up printers and configuring print queues, see “Setting Up
Printers on a Print Server (Task Map)” on page 78.
What is a Device URI?
A Uniform Resource Identifier (URI) is an addressing technology for identifying resources on
the Internet or a private intranet. The terms URI and URL are used synonymously. URIs can be
used with application-level protocols, called URI schemes. The Solaris printer software includes
support for configuring network-attached printers. When creating print queues for
network-attached printers by using LP print commands or by using Solaris Print Manager, you
can specify the device as a device-uri.
To specify the device as a device-uri from the command line, use the lpadmin command with
the -v and -m options:
# lpadmin -p printer -v device-uri -m uri
Note that the -v option is still a valid option for specifying devices other than those that utilize
the device-uri. addressing technology.
For example, to add the printer, Lucille, by using the device-uri, smb://server/queue, and the
interface script that is included in the Solaris printer software, type:
# lpadmin -p lucille -v smb://server/print-queue -m uri -n /usr/lib/lp/model/ppd
/system/foomatic/Epson/Epson-Stylus_Color_777-Stc777p.upp.ppd.gz
Note – You must use the -m option in the command-line syntax to specify an interface script, or
the back-end process ignores the print request. The script can be the interface script that is
included in the Solaris printing software or another interface script that is device-uri protocol
aware.
The following device-uri schemes are supported:
■
■
■
■
■
■
■
ipp://host/printers/name
lpd://host/printers/name
socket://host:port
smb://server/printer
smb://workgroup/server/printer
smb://username:password@server/printer
smb://username:password@workgroup/server/printer
Chapter 1 • Introduction to Printing in the Solaris Operating System
31
Using Printing Protocols in the Solaris Release
To specify a device that uses a device-uri when using Solaris Print Manager to add a
network-attached printer, select the URI option in the Protocol drop-down menu of the New
Network Printer window. Type a supported printer URI in the destination field.
Other modifications that support setup of remote print queues by specifying the device as a
device-uri include the following:
■
The Solaris print spooler can pass device information in the form of a device-uri to the
back-end interface script as the environment variable, DEVICE_URI. Because the information
is passed to the back-end as an environment variable, the existing interface scripts cannot
take advantage of this information. However, these scripts are not adversely impacted.
■
The /etc/lp/model/uri file now communicates with the printer through the use of helper
applications and the device-uri. The interface script also has the ability to process PPD files
and uses a Foomatic script to convert print data to a printer-ready format.
What Is the Internet Printing Protocol?
IPP is a fairly recent industry standard network printing protocol that is used for
client-to-server and server-to-printer communications. This protocol provides a basic model
that includes printers and jobs, standard attributes for these printers and jobs, and a set of
standard operations that can be performed against these printers and jobs. Because the objects,
attributes, and operations are standardized, IPP is a method for communicating between client
and server systems. In the Solaris OS, server-side support for this protocol is provided by an IPP
listening service. IPP client-side support in the Solaris OS is implemented through the PAPI.
IPP printer support is available through the URI interface script.
More information about OpenSolaris printing can be found at
http://opensolaris.org/os/community/printing/.
For step-by-step procedures and additional background information in this document, see
“Setting Up the Internet Printing Protocol” on page 69 and Appendix A, “Using the Internet
Printing Protocol.”
Overview of the RFC-1179 Printing Protocol
The RFC-1179 protocol is an existing over-the-wire protocol that is widely used for
communicating between print clients and servers and network-attached printers. The Request
for Comments (RFC) 1179 describes the protocol that a line printer daemon client uses to
control printing. Developed originally for BSD UNIX, the RFC-1179 printing protocol has long
been the cross-platform standard for printing. You can use this protocol to perform basic
printing tasks, such as submitting and canceling print jobs, and obtaining print job status. The
RFC-1179 protocol is able to communicate with LPD-based print servers and any other print
server that accepts the BSD printing protocol. Many network-attached printers offer this
protocol as an option for transferring job data.
32
System Administration Guide: Solaris Printing • January 2009
Using Printing Protocols in the Solaris Release
RFC-1179 Protocol Compared to the Internet Printing
Protocol
The RFC-1179 protocol has served for decades as the standard network printing protocol. The
protocol was originally designed to perform a very limited set of operations. The RFC-1179
protocol lacks a common representation for status information. In addition, this protocol offers
only basic print job options. Conversely, the design of IPP includes features that are lacking in
the RFC-1179 and BSD protocols. With IPP, a broad set of operations can be performed. These
operations make use of a core set of common attributes by using a common representation and
encoding method. Also, IPP enables encryption and authentication to be used between a print
client and a print server. Finally, IPP provides a means for extending operations and attributes,
while maintaining backward compatibility and interoperability. One of the results of the
evolution of the RFC-1179 protocol is that it has several conflicting vendor extensions to
overcome, making IPP the preferred choice of printing protocols.
For more information about using IPP to set up and administer printers, see “Setting Up the
Internet Printing Protocol” on page 69 and Appendix A, “Using the Internet Printing
Protocol.”
Using the SMB Protocol
The SMB protocol is an application-level network protocol that is primarily used for sharing
printers, access to files, serial ports, and miscellaneous communications between nodes on the
network. Mainly used by Windows systems, SMB is an authenticated inter-process
communication mechanism. In the Solaris OS, the SMB protocol is used primarily for sharing
printers. All of these processes take place over the network. SMB can run over multiple
protocols.
SMB works through a peer-to-peer approach. A client makes a specific requests to a server, and
the server responds accordingly. SMB servers make their file systems and other resources
available to clients on the network. In the Solaris OS, SMB includes Samba server-side support
that is managed by the Service Management Facility (SMF) and Samba smbclient client-side
support. To access a Windows hosted printer, setup of a local print queue is required. This
requirement is due to differences in UNIX and Windows printing models.
About Samba
Samba is an open-source SMB server freeware application that uses the SMB protocol. Samba
provides Windows clients access to UNIX servers and UNIX clients access to Windows servers.
The access that is provided is for both files and other services, including printer sharing.
Samba's design, as well as constraint, is to operate on top of a variety of existing UNIX systems.
Samba runs as a set of daemons and services, without any need for modification of existing
kernels. More information about Samba can be found at http://www.samba.org.
Chapter 1 • Introduction to Printing in the Solaris Operating System
33
Overview of Solaris Print Manager
Overview of Solaris Print Manager
Solaris Print Manager is a JavaTM technology-based GUI that enables you to manage local and
remote printing configuration. This tool can be used in the files, LDAP, NIS, and NIS+ naming
service environments.
To use this tool, you must:
■
■
■
Be logged in as superuser or assume an equivalent role.
Subscribe to the Print Management profile.
Have Solaris.print.admin authorization
Solaris Print Manager centralizes printer information when the information is used in
conjunction with a naming service. Using a naming service for storing printer configuration
information is the preferred method, because a naming service makes printer information
available to all systems on the network. This method provides easier printer administration.
Solaris Print Manager recognizes existing printer information on print servers, print clients,
and in the naming service databases. No conversion tasks are required to use Solaris Print
Manager as long as the print clients are running at least the Solaris 2.6 release.
The Solaris Print Manager package is SUNWppm.
Overview of the LP Print Service
The LP print service is a set of software utilities that enables users to print files while continuing
to work. Originally, the print service was called the LP spooler. LP represents line printer, but
the meaning now includes many other types of printers, such as laser printers. Spool is an
acronym for Simultaneous Peripheral Operations Online.
The LP print service consists of the LP print service software, any print filters you might provide,
and the hardware, such as the printer, system, and network connections.
Solaris Express 8/06: Starting with this release, the LP print client commands make use of the
PAPI to interact with Solaris LP (lpsched), RFC-1179 (BSD/LPD protocol), and IPP-based
servers. IPP support is capable of interacting with CUPS servers by using its native IPP service.
With the introduction of this API support, several common BSD and SysV printing commands
use the PAPI interface. As a result, the new command implementations work with a number of
existing print services. A portion of this development includes server-side support for IPP that
is also layered on the API. This support is implemented as a set of protocol-specific libraries and
as an Apache module, Versions 1 and 2. Similar to the print command implementation, the IPP
listening service can be used with any print service that has PAPI support. The RFC-1179
server-side support is also layered on the PAPI.
For additional information about the LP print service, see “LP Print Service” on page 264.
34
System Administration Guide: Solaris Printing • January 2009
The Solaris Print Client-Server Process
Functions of the LP Print Service
The LP print service performs the following functions:
■
■
■
■
■
■
■
■
■
Administers files and schedules local print requests
Receives and schedules network requests
Filters files, if necessary, so they print properly
Starts programs that interface with the printers
Tracks the status of print jobs
Tracks forms that are mounted on the printer
Tracks print wheels that are currently mounted
Delivers alerts to mount new forms or different print wheels
Delivers alerts about printing problems
Customizing the LP Print Service
Although the LP print service is designed to be flexible enough to handle most printers and
printing needs, the LP print service does not handle every possible situation. You might have a
print request that is not accommodated by the standard features of the LP print service. Or, you
might have a printer that does not quite fit into the way the LP print service handles printers.
You can customize the LP print service in the following ways:
■
■
■
■
■
Adjust the printer port characteristics.
Adjust the terminfo database.
Customize the printer interface program.
Create a print filter.
Define a form.
For detailed descriptions and step-by-step instructions on customizing the LP print service, see
Chapter 7, “Customizing Printing Services and Printers (Tasks).”
The Solaris Print Client-Server Process
This section provides an overview of the print client-server process.
Using Print Servers
The print server is a system that has a local printer connected to it and makes the printer
available to other systems on the network. The following figure highlights the part of the print
process in which the print server sends the print request to the printer.
Chapter 1 • Introduction to Printing in the Solaris Operating System
35
The Solaris Print Client-Server Process
1
Print
client
FIGURE 1–1
1.
2.
3.
4.
5.
2
Print
request
3
Print client
command
processing
4
5
Printer
Print
server
Printed
output
The Print Server Sends a Print Request to the Printer
The print client submits a print request.
The print request is processed on the print client.
The print request goes to the print server.
The print request goes to the printer.
The print output is produced on the printer.
Using Print Clients
A print client is a system that can send print requests to a print server.
The following figure highlights the part of the print process in which the user submits a print
request from a print client.
1
Print
client
FIGURE 1–2
2
Print
request
3
Print client
command
processing
4
Print
server
5
Printer
Printed
output
The User Submits a Print Request from a Print Client
The Print Client Process
The following figure illustrates the path of a print request from the time the user initiates the
request until the print request is printed.
36
System Administration Guide: Solaris Printing • January 2009
The Solaris Print Client-Server Process
1
Print
client
FIGURE 1–3
2
Print
request
3
Print client
command
processing
4
Print
server
5
Printer
Printed
output
Overview of the Print Client Process
1. A user submits a print request from a print client.
2. The print command checks a hierarchy of print configuration resources to determine where
to send the print request.
3. The print command sends the print request directly to the appropriate print server. A print
server can be any server that accepts Berkley Software Distribution (BSD) printing protocol,
including System V Release 4 (SVR4), or LP print servers and BSD LPD-based print servers,
as well as servers that accept IPP.
4. The print server sends the print request to the appropriate printer.
5. The print request is printed.
How Local Printing Works
The print request follows the same path it would if the client and server were separate systems.
Requests always flow from client to server following the same path.
The following figure shows what happens when a user submits a request to print a PostScript
file on a local printer, which is a printer connected to the user's system. The lpsched daemon on
the local system does all processing.
This processing might include the following:
■
■
■
Matching the printer and content type
Identifying the default printer, filtering the request
Starting the specified printer interface program
The printer interface program does the following:
■
Prints the banner page.
■
Catches printer faults.
■
Determines the printer fault policy to either reset, continue, or begin the print job over
again.
Chapter 1 • Introduction to Printing in the Solaris Operating System
37
The Solaris Print Client-Server Process
■
Finally, the interface program uses the lpcat program to download the print request to the
local printer's serial port.
lpsched
lpsched checks the system files for:
Configuration information
/etc/lp
Default printer
Filters
Forms
Classes
/var/spool/lp
lpsched queues local print
requests and schedules them
when the printer is available.
Document
How LP Administers Files and Schedules Local Print
Requests
The LP print service has a scheduler daemon called lpsched. The scheduler daemon updates
the LP system files with information about printer setup and configuration.
The lpsched daemon schedules all local print requests on a print server, as shown in the
following figure. Users can issue the requests from an application or from the command line.
Also, the scheduler tracks the status of printers and filters on the print server. When a printer
finishes a request, the scheduler schedules the next request n the queue on the print server, if a
next request exists.
38
System Administration Guide: Solaris Printing • January 2009
The Solaris Print Client-Server Process
A user submits
a print request.
lpsched
Local
system
lp sends the request to
the lpsched daemon.
/var/spool/lp
lpsched spools
the print request.
lpsched matches
the printer type and the
file content type, and
identifies the default
printer for the system.
lpsched filters the
job. (It also can put the
filtered output back into
the spooling area.)
Requests
file.ps
file.ps
When the printer is
free, lpsched starts the
printer's specified interface
program on the serial port.
The Interface program:
Interface
program
Prints the banner page
Catches faults
Depending on the fault
policy, it waits to be reset,
continues, or begins job over.
The interface program
uses the lpcat program
to download the file into
the serial port.
Document
Chapter 1 • Introduction to Printing in the Solaris Operating System
39
The Solaris Print Client-Server Process
Without rebooting the system, you can stop the scheduler with the svcadm disable
application/print/server command. Then, restart the scheduler with the svcadm enable
application/print/server command. The scheduler for each system manages requests that
are issued to the system by the lp command.
How Remote Printing Works
The following figure shows what happens when a user on a Solaris print client submits a print
request to an LPD-based print server. The command opens a connection and handles its own
communications with the print server directly.
Solaris print client
/var/spool/print
lp sends a print request
to the lpd-based print server.
lp
lpd-based print server
/var/spool/lpd
lpd accepts the request,
spools it, filters it, and
schedules the local printing.
lpd
Document
The following figure shows an LPD-based print client submitting a print request to a Solaris
print server. The lpd daemon handles the local part of the print request and the connection to
the print server. On the print server, the inetd process waits for network printing requests and
starts a protocol adaptor to service the request. The protocol adaptor communicates with the
lpsched daemon, which processes the request on the print server.
40
System Administration Guide: Solaris Printing • January 2009
The Solaris Print Client-Server Process
lpd-based print client
lpr submits print request
to lpd, which spools it.
/var/spool/lpd
lpr
lpr
lpr the spool file, checks in
the /etc/printcap file to
find the printer location, and
connects to the network if
the printer is remote.
Solaris print server
inetd
/var/spool/lp
in.lpd
libpapi.so
inetd listens for a request
and then starts. in.lpd
processes the request by
making calls to libpapi.so.
For local requests, libpapi.so
loads psm-lpsched.so and
passes the requests to
lpsched by making calls to
psm-lpsched.so.
psm_lpsched
lpsched
Document
The following figure shows what happens when a user on a Solaris print client submits a print
request to a Solaris print server. The print command on the print client handles the local part of
each print request by communicating directly with the print server.
Chapter 1 • Introduction to Printing in the Solaris Operating System
41
Where to Find Printing Tasks
Solaris print client
/var/spool/print
lp
Solaris print server
inetd listens for a request
and then starts. in.lpd
processes the request by
making calls to libpapi.so.
For local requests, libpapi.so
loads psm-lpsched.so and
passes the requests to
lpsched by making calls to
psm-lpsched.so.
inetd
/var/spool/lp
in.lpd
libpapi.so
psm_lpsched
lpsched
Document
The inetd process on the print server monitors network printing requests and starts a protocol
adaptor to communicate with the lpsched daemon on the print server, which processes the
print request.
Where to Find Printing Tasks
42
Printer Task
Topics Covered
For More Information
Set up and administer printing
services.
Setting up Solaris Print Manager,
the LP print service, and the IPP,
RFC-1179, and SMB printing
protocols.
Chapter 3, “Setting Up Printing
Services (Tasks)”
System Administration Guide: Solaris Printing • January 2009
Where to Find Printing Tasks
Printer Task
Topics Covered
For More Information
Set up printers.
Setting up a print server, adding
directly attached and
network-attached printers, and
adding a print client.
Chapter 4, “Setting Up Printers
(Tasks)”
Administering printers, the print
scheduler, setting printer
definitions, and administering
print requests by using the
following printing tools, services
and protocols:
■
Solaris Print Manager
■
LP print service
■
IPP
■
RFC-1179 protocol
■
SMB protocol (through
Samba)
Chapter 5, “Administering Printers
by Using Solaris Print Manager and
LP Print Commands (Tasks)”
Chapter 6, “Administering Printers
That Use Network Printing Protocols
(Tasks)”
Administer PPD files by using the
PPD File Manager (ppdmgr).
Administering PPD Files on a
Chapter 9, “Administering Printers
system by using the ppdmgr utility, by Using the PPD File Management
a tool that automates PPD file
Utility (Tasks)”
administration.
Set up and administer printers
from the Desktop.
Setting up USB directly attached
and network-attached printers
from the desktop.
Customize printing services and
printers.
Customizing printing services.
Chapter 7, “Customizing Printing
Administering character sets,
Services and Printers (Tasks)”
print forms, print filters, and print
fonts.
Chapter 1 • Introduction to Printing in the Solaris Operating System
Chapter 10, “Setting Up and
Administering Printers From the
Desktop (Tasks)”
43
44
2
C H A P T E R
2
Planning for Printing in the Solaris Operating
System (Tasks)
This chapter provides information about planning for printer setup. Also include is
information about distributing printers across your network to gain the best efficiency.
This is a list of overview information in this chapter:
■
■
■
■
■
■
“Determining a Method to Use for Printer Setup and Administration” on page 45
“Planning for Printer Setup and Administration” on page 48
“Distributing Printers on the Network” on page 56
“Printer Configuration Resources” on page 57
“Assigning Print Servers and Print Clients” on page 61
“Print Server Requirements and Recommendations” on page 62
Determining a Method to Use for Printer Setup and
Administration
The following sections describe printing services, tools, and protocols that you might choose to
use for setting up and administering printers in the Solaris release. Each tool, service, and
protocol has advantages and disadvantages. Some tools and services are more appropriate for
specific uses, while others can be used for all, or most, printing tasks that you might perform.
Unless otherwise mentioned, all of the following printing tools are available in the Solaris
Express, Solaris 10, and compatible Solaris releases. Also, all of these printing services and tools
use LDAP, NIS, and NIS+.
45
Determining a Method to Use for Printer Setup and Administration
Selecting Printing Tools and Services
This section describes the tools you can use to perform printer setup and related tasks.
The following tools are available:
■
■
■
■
Solaris Print Manager
lpadmin command
PPD File Manager (ppdmgr)
OpenSolaris Print Manager (in the GNOME Desktop Environment)
Solaris Print Manager
Solaris Print Manager, /usr/sbin/printmgr, is a Java technology-based GUI that you use to
perform setup tasks for local and remote printers, either directly attached and
network-attached.
For directly attached and network-attached printers, you can perform the following tasks:
■
■
■
Create a print queue.
Modify a print queue.
Delete a print queue.
For remote printers, you can use Solaris Print Manager to define access to the print queue. Note
that a remote printer is a printer that has a print queue that is defined on a system other than the
local system. For more information about terminology that is commonly used in this book, see
Glossary.
lpadmin Command
The lpadmin command, /usr/sbin/lpadmin, is a command-line tool that you can use to
perform all of the tasks that you can perform by using Solaris Print Manager performs. Several
additional tasks that cannot be performed by using Solaris Print Manager can be performed by
using the lpadmin command. For more information, see “Setting Printer Definitions” on
page 48.
PPD File Manager
You can use the PPD File Manager utility, /usr/sbin/ppdmgr, to administer PPD files on
Solaris systems. The PPD File Management utility is the preferred method for adding PPD files
to a system's PPD file repository. For more information, see Chapter 9, “Administering Printers
by Using the PPD File Management Utility (Tasks).”
OpenSolaris Print Manager GUI
The OpenSolaris Print Manager GUI is available in the GNOME Desktop Environment. When
you initiate your desktop session, the tool is started. The tool monitor printing events, such as
when a printer is attached to a system or detached from a system. When you connect a new
46
System Administration Guide: Solaris Printing • January 2009
Determining a Method to Use for Printer Setup and Administration
printer, the system discovers the device through the Hardware Abstraction Layer (HAL) and
begins the print queue configuration process. A dialog that contains preconfigured printer
information is displayed, enabling you to configure the new printer or reconfigure a print queue
for an existing printer. For more information, see “Automatic Printer Discovery and
Configuration in the Desktop Environment” on page 23.
To use all of the features of the Print Manager tool, you must be running at least the Solaris
Express 1/08 release. For more information about this support, see Chapter 10, “Setting Up and
Administering Printers From the Desktop (Tasks).”
Note – For printer setup, the GNOME Desktop tools and the Solaris Print Manager tools are
easier and more convenient to use than the lpadmin command. These tools provide sufficient
printer attributes in most situations. However, you might need to use the lpadmin command
when setting up printers with printer attributes that cannot be defined by using Solaris Print
Manager or GNOME Desktop tools.
For more information about setting up printers, see Chapter 4, “Setting Up Printers (Tasks).”
Determining Which Printing Protocol to Use
The Solaris Print System uses two over-the-wire protocols for sending print requests from a
print client to the print server. The following table describes the printing protocols that can be
used for printing in the Solaris OS.
TABLE 2–1
Supported Printing Protocols
Network Printing Protocol
Server-Side Support?
Client-Side Support?
For More Information
Internet Printing Protocol (IPP) Server-side support for the IPP IPP client-side support is
listening service is available,
available, starting with the
starting with the Solaris 10
Solaris Express 8/06 release.
release.
Appendix A, “Using the Internet
Printing Protocol”
RFC-1179 protocol
Supported in all Solaris
releases.
Supported in all Solaris
releases.
“Overview of the RFC-1179
Printing Protocol” on page 32
SMB protocol, through Samba
Supported, starting with the
Solaris 9 OS.
Supported, starting with the “Using the SMB Protocol” on
page 33
Solaris 9 OS.
Note – The SMB protocol,
through Samba, is an
implementation that enables
interoperability between Linux
and UNIX servers, and
Windows-based clients.
Chapter 2 • Planning for Printing in the Solaris Operating System (Tasks)
47
Planning for Printer Setup and Administration
Planning for Printer Setup and Administration
This section provides an overview of planning for printing that includes the following:
■
Defining attributes of printers, such as printer name, printer description, printer port
■
Selecting a printer make, model, and driver (for setting up printers with PPD files)
■
Selecting a printer type and file content type (for setting up printers without PPD files)
■
Determining which PPD file to use (for setting up printers with PPD files)
■
Setting up a default printer destination
■
Determining whether you want to print banner pages
■
Limiting user access to printer
■
Setting up printer classes
■
Setting up fault notification
■
Setting up fault recovery
Setting Printer Definitions
Setting definitions for printers is an ongoing task that lets you provide a more effective print
environment for users. For example, you can assign parameters for all your site's printers to
help users find where a printer is located. Or, you can define a class of printers to provide the
fastest turnaround for print requests.
The following table describes printer definitions that you can set by using the lpadmin
command. Also included is information about whether you can set these printer definitions by
using Solaris Print Manager. For more information about setting up printers, see Chapter 4,
“Setting Up Printers (Tasks)”
Available in Solaris Print
Manager?
Definition
Description
Example
Default
Required?
Printer Name
Name of printer
laser1
N/A
Required to install an Available
attached or network
printer and to add
access to a print
queue
48
System Administration Guide: Solaris Printing • January 2009
Planning for Printer Setup and Administration
Available in Solaris Print
Manager?
Definition
Description
Example
Default
Required?
Print server
Name of print
server
venus
Use localhost
for Printer
Server attribute
check box
selected by
default
Required to install an Available
attached or network
printer and to add
access to a printer —
this field is filled in by
the tool.
Description
User defined string
laser printer near
breakroom
N/A
Optional
Printer Port
Device that the
printer is attached
to
/dev/term/a
/dev/term/a
Required to install an Available
attached printer
Printer Type
Type of printer
unknown
PostScript
Required to install an Available
attached printer or a
network printer
without PPD files
File Content Type
Content to be
printed
any
PostScript
Required to install an Available
attached printer or a
network printer
without PPD files
Printer Make
Make of printer
Lexmark
N/A
Required to install an Available
attached printer or a
network printer with
PPD files
Printer Model
Model of printer
Lexmark Optra E312
N/A
Required to install an Available
attached printer or a
network printer with
PPD files
Printer Driver
Driver that is used
by specifying PPD
file
Foomatic/PostScript
N/A
Required to install an Available
attached printer or a
network printer with
PPD files
Destination
Destination name
for the network
printer
For examples, see
“Selecting the
Destination Name
(Also Called the
Network Printer
Access Name)” on
page 93
N/A
Required to install a
network printer
Chapter 2 • Planning for Printing in the Solaris Operating System (Tasks)
Available
Available
49
Planning for Printer Setup and Administration
Available in Solaris Print
Manager?
Definition
Description
Example
Default
Required?
Protocol
Protocol used to
communicate with
the printer
TCP, URI
BSD
Required to install a
network printer
Available
Fault Notification
Specifies how to
Mail to superuser
notify user of errors
Write to
superuser
Optional
Available
Default Printer
Identifies the
default printer
N/A
N/A
Optional
Available
Banner Page
Specifies to print a
banner page
N/A
Set to On,
unless
otherwise
specified
Optional
Available
User Access List
List of users allowed rimmer,lister
to print on the print
server
All users can
print
Optional
Available
Printer Class
Specifies a class of
printers by printer
type, location, or
work group or
department.
lpadmin -p luna -c
roughdrafts
N/A
Optional
Not Available
Fault Recovery
Defines recovery
lpadmin -p mars -A
options for printers. ’mail joe’ -W 5
N/A
Optional
Not Available
For more information about using LP print commands to set or reset printer definitions, see
“Setting Printer Definitions by Using LP Print Commands” on page 127.
Printer Name
When adding a printer to a system, you specify a printer name for the printer.
A printer name must adhere to these guidelines:
■
The printer name must be unique among all printers within the bounds of an administrative
domain.
■
The printer name can have a maximum of 14 alphanumeric characters, which can include
dashes and underscores.
Note – Printer names can now include a dot (.) and be up to 255 characters in length.
■
50
The printer name should be easy to remember and can identify the type of printer, its
location, or the print server name.
System Administration Guide: Solaris Printing • January 2009
Planning for Printer Setup and Administration
Establish a naming convention that works for your site. For example, if you have different types
of printers on the network, including the printer type as part of the printer name can help users
choose an appropriate printer. For instance, you could identify PostScript printers with the
letters PS. However, if all of the printers at your site are PostScript printers, you would not need
to include the initials PS as part of the printer name.
Printer Server
The print server is the system that has a local printer connected to it and makes the printer
available to other systems on the network.
Printer Description
You can assign a description to a printer by using the lpadmin -D command or by using Solaris
Print Manager. The printer's description should contain information that helps users identify
the printer. You might include the room number where the printer is located, the type of
printer, the manufacturer, or the name of the person to call if printing problems occur.
Users can view a printer description by using the following command:
$ lpstat -D -p printer-name
Printer Port
When you initially install a printer, or later change its setup, you can specify the device, or the
printer port, to which the printer is connected. You can use either Solaris Print Manager or the
lpadmin -p printer-name -v device-name command to specify the device or printer port.
Most systems have two serial ports, plus a parallel port or USB ports. Unless you add ports, you
cannot directly connect more than two serial printers and a parallel printer, or two USB
printers, to one system.
You can select the following printer port types by using Solaris Print Manager. These options
give you as much flexibility as using the lpadmin command.
Printer Port Type
Corresponding Device Name Options
Serial
/dev/term/a
Serial
/dev/term/b
Parallel
/dev/printers/0 —> /dev/ecpp0
USB
/dev/printers/[1–9]
Specify any port name that the print server recognizes
Other
Chapter 2 • Planning for Printing in the Solaris Operating System (Tasks)
51
Planning for Printer Setup and Administration
The LP print service initializes the printer port by using the settings from the standard printer
interface program. For more information about printer interface programs, see “Administering
Print Filters” on page 196. If you have a parallel printer or a serial printer for which the default
settings do not work, see “Adjusting Printer Port Characteristics” on page 167.
x86 only – If you use multiple ports on an x86 based system, only the first port is enabled by
default. The second port, and any subsequent ports, are disabled by default. To use more than
one port, you must manually edit the device driver port configuration file for each additional
asy (serial) port or ecpp (parallel) port. The path names for the x86 port configuration files are
the following:
/kernel/drv/asy.conf
/kernel/drv/ecpp.conf
Printer Type
The printer type is a generic name for a type of printer. Printer type identifies the terminfo
database entry that contains various control sequences for the printer. By convention, printer
type is usually derived from the manufacturer's model name. For example, the printer type
name for the DECwriter printer is decwriter. However, the common printer type PS does not
follow this convention. PS is used as the printer type for many models of PostScript printers,
such as the Apple LaserWriterI and Apple LaserWriterII printers. For more information about
the terminfo database, see “The terminfo Database” on page 268.
You can specify the printer type by using the lpadmin -T command or Solaris Print Manager.
Selecting a Printer Type
In this Solaris release, you can assign a printer type with Solaris Print Manager if you deselect
the Use PPD files default attribute in the Print Manager drop-down menu in Solaris Print
Manager. This printer definition is not available when the Use PPD files attribute is selected.
When you add a printer with PPD files, the printer make, model, and driver printer definitions
replace the printer type definition.
For a local PostScript printer, use a printer type of either PostScript (PS) or Reverse PostScript
(PSR). If your printer supports PostScript, choose PS or PSR, even if the specific printer type is
listed in the terminfo database.
If your PostScript printer prints pages face up, documents appear to be printed backwards. As
such, the first page is at the bottom of the stack and the last page is on the top. If you specify the
printer's type as PSR, the LP print service reverses the order of the pages before sending the
pages to the printer. The last page is printed first, and the pages are stacked in forward order.
However, the LP print service can reliably change the page order only for PostScript files that
52
System Administration Guide: Solaris Printing • January 2009
Planning for Printer Setup and Administration
conform to the Adobe® Technical Note #5001, PostScript Language Document Structuring
Conventions Specification. This document is available on the Adobe Developer Relations web
site.
If a printer can emulate more than one kind of printer, you can assign several printer types by
using the lpadmin -T command. If you specify more than one printer type, the LP print service
uses the printer type that is appropriate for each print request.
You might not find the printer type in the appropriate terminfo directory. The type of printer is
not necessarily linked to the manufacturer's name on the printer. For example, for any type of
PostScript printer, you can use the PS or PSR entry, found in the /usr/share/lib/terminfo/P
directory, instead of an entry specific to the manufacturer or product name.
If you have an unusual type of printer, you might need to try different entries before you can
determine whether a particular terminfo entry works for your type of printer. If possible, find
an entry in the terminfo database that works for your printer. Trying to use an existing entry is
much easier than trying to create an entry. If you must create your own entry, “Adding a
terminfo Entry for an Unsupported Printer” on page 169 contains some useful tips.
Selecting a File Content Type
In this Solaris release, to assign the file content type printer definition by using Solaris Print
Manager, first deselect the Use PPD files default attribute in the Print Manager drop-down
menu in Solaris Print Manager. You cannot select a file content type if you use PPD files. The
default file content type for printers that are associated with PPD files is PostScript. This file
content type is automatically set by the tool. You can also specify file content type by using the
lpadmin -I command.
Print filters convert the content type of a file to a content type that is acceptable to the
destination printer. The file content type tells the LP print service the type of file contents that
can be printed directly, without any filtering. To print without filtering, the necessary fonts
must also be available in the printer. You must set up and use filtering for other types of files.
Most printers can print directly the following types of files:
■
■
The same type as the printer type. For example, PS for a PostScript printer.
The simple type. For example, an ASCII text file.
When submitting a file for printing, the user can indicate the content type of the file by using the
lp -T content-type command. If no file content type is supplied when the request is submitted,
the LP print service checks the first file in the request to determine the content type. If the file
begins with ^D%! or %!, the request is considered to contain PostScript data. Otherwise, the
request is assumed to contain simple (ASCII) text. The LP print service uses the file content
type to determine which filters to use to convert the file contents into a type the printer can
handle.
Chapter 2 • Planning for Printing in the Solaris Operating System (Tasks)
53
Planning for Printer Setup and Administration
When you are not specifying PPD files, Solaris Print Manager provides a list of file content types
from which you can choose when you install or modify an attached or network printer. The
choices are translated to the names that the LP print service uses. The following table describes
the file content types that you can choose with Solaris Print Manager.
TABLE 2–2
Choosing File Content Type With Solaris Print Manager When Not Using PPD Files
File Contents Choice
LP Print Service Name
Description
PostScript
postscript
PostScript files do not require filtering.
ASCII
simple
ASCII files do not require filtering.
Both PostScript and ASCII simple, postscript
PostScript files and ASCII files do not require
filtering.
None
""
All files require filtering, except those files that
match the printer's type.
Any
any
No filtering is required. If the printer cannot
handle a file content type directly, the file will
not be printed.
Choose the file content type that best matches the printer's capabilities. PostScript is the default
choice in Solaris Print Manager and is probably correct most of the time. PostScript means that
filtering is not needed for PostScript files.
Printer Make
When you set up a printer with PPD files, the printer make is the name of the manufacturer of
the printer. The printer make is found on the printer itself, and on the packaging materials and
documentation that is shipped with the printer.
The following are examples of printer makes that are available in this release:
■
■
■
■
■
Lexmark
Epson
Canon
QMS
Xerox
Printer Model
The printer manufacturers produce several types and models of printers. When you set up a
printer with PPD files, the printer model defines the printer precisely. The model is usually
stamped on the front or top of the printer. This information is also displayed on the packaging
materials and documentation that is shipped with the printer.
54
System Administration Guide: Solaris Printing • January 2009
Planning for Printer Setup and Administration
The following are examples of printer models that are available in this release:
■
■
■
Lexmark Optra E312
Lexmark Z32
Lexmark 1000
Printer Driver
The printer driver is determined when you select the PPD file for the specified printer make and
printer model
Printer Destination
This printer definition specifies the host name, IP address, or URI of the target printer. This
definition applies to network-attached printers only.
Printer URIs can be specified by using the following formats:
■
■
■
■
lpd://{printer-name or ip}/printers/print-queue
ipp://{printer-name or ip}/printers/print-queue
socket://{printer-name or ip}:{port}
smb://{windows-host}/{printer}
Network Protocol
This printer definition specifies the protocol to be used between the print server and the printer.
The current choices are the BSD, TCP and URI network protocols. This printer definition
applies to network-attached printers only.
Fault Notification
This printer definition is used to specify whether a notification is sent when a printer fault is
detected, and how the notification should be sent.
Default Printer
The default printer is the printer that the print system commands use when a printer is not
specified on the command line or in by using a printing tool. For more information about using
LP print commands to set up a default printer destination, see “Setting Up a Default Printer
Destination by Using LP Print Commands” on page 128.
Banner Page
The banner page is the first sheet that is printed when on a print job is requested. The banner
page can be set to always print, optionally print, or never print. For more information about
using LP print commands to specify banner page options, see “Printing Banner Pages by Using
LP Print Commands” on page 129.
Chapter 2 • Planning for Printing in the Solaris Operating System (Tasks)
55
Distributing Printers on the Network
User Access List
The user access list specifies a list of users are allowed to print from the specified print server.
For more information about using LP print commands to limit user access to a printer, see
“Limiting User Access to a Printer by Using LP Print Commands” on page 136
Printer Class
A printer class is a collection of printers. Print requests that go to a class of printers are handled
by the first available printer in that class. For more information about using LP print command
to define printer classes, see “Setting Up Printer Classes by Using LP Print Commands” on
page 131
Fault Recovery
You can find out about printing faults so that you can correct the problem. Fault recovery
options are defined by using the lpadmin command with the -F option. For more information
about using LP print commands to set up fault recovery, see “Setting Up Printer Fault Recovery
by Using LP Print Commands” on page 135
Distributing Printers on the Network
The goal of setting up printers on a network is to give users access to one or more printers. As an
administrator, you must determine whether each printer would be best used if it is dedicated to
one system or available to many systems. In a network environment, distribute your printers on
several print servers. The advantage of setting up several print servers is that when one print
server has a problem, you can route print requests to other print servers.
If you use a centralized print configuration, you can still connect printers to user systems for
convenience or for improved response. A printer that is connected to a user system is still
available to other systems on the network.
The following figure shows an example of how you can have a centralized print configuration
and still connect printers to users' systems.
56
System Administration Guide: Solaris Printing • January 2009
Printer Configuration Resources
Print client
Print client
Local printer connected
to a user's system
Printers connected to a
print server
FIGURE 2–1
How to Distribute Printers on a Network
Printer Configuration Resources
This section describes the resources that the printing software uses to locate printer names and
printer configuration information.
The printer software may be configured to use a naming service to advertise the printers. The
naming service can be used for storing printer configuration information for all printers on the
network. The naming service, LDAP, NIS, or NIS+, simplifies printer configuration
maintenance. When you add a printer in the naming service, all print clients on the network can
access the printer.
Printing Support in the naming service Switch
The printers database in /etc/nsswitch.conf, the naming service switch file, provides
centralized printer configuration information to print clients on the network.
By including the printers database and corresponding sources of information in the naming
service switch file, print clients automatically have access to printer configuration information
without having to add it to their own systems.
The default printers entry in the /etc/nsswitch.conf file for files, LDAP, NIS, and NIS+
environments are described in the following table.
naming service Type
Default printers Entry
files
printers: user files
ldap
printers: user files ldap
nis
printers: user files nis
Chapter 2 • Planning for Printing in the Solaris Operating System (Tasks)
57
Printer Configuration Resources
naming service Type
Default printers Entry
nis+
printers: user nisplus files
For example, if your naming service is NIS, printer configuration information on print clients is
searched for in the following sources in this order:
■
■
■
■
user – Represents the user's $HOME/.printers file
files – Represents the /etc/printers.conf file
nis – Represents the printers.conf.byname table
nisplus – Represents the printers.org_dir table
For more information, see the nsswitch.conf(4) man page and System Administration Guide:
Naming and Directory Services (DNS, NIS, and LDAP).
Adding Printer Information to a naming service
Adding printer information to a naming service makes access to printers available to all systems
on the network. Doing so makes printer administration easier because all the information about
printers is centralized.
naming service Configuration
Actions to Centralize Printer Information
Use a naming service
Adding the printer to the LDAP, NIS, or NIS+
database makes the printer available to all systems on
the network.
Do not use a naming service
Adding the printer adds the printer information to the
printer server's configuration files only. Print clients
will not automatically know about the printer.
You will have to add the printer information to every
print client that needs to use the printer.
58
System Administration Guide: Solaris Printing • January 2009
Printer Configuration Resources
LDAP Print Support Guidelines
Keep the following in mind when you manage printer information in the LDAP naming service:
■
Solaris Print Manager uses the ldapclient command to determine the default LDAP server
name. If more than one server is specified, the first server is automatically selected. For more
information, see ldapclient(1M).
■
Solaris Print Manager always displays printer entries from the current LDAP server. If the
current LDAP server is not the domain's LDAP master server, the list of printers displayed
might not be the current list of printers. The LDAP replica server might not have been
updated by the master server, and as a result, is out of sync with the master. Replica servers
can have various update replication agreements. For example, a change is made on the
master, and the replica servers can be updated immediately or once a day.
■
If the selected LDAP server is an LDAP replica server, any updates are referred to the master
server and are done there. This situation again means that the printer list could be out of
sync with the master server. For example, a deleted printer might still appear in the
displayed printer list until the replica is updated from the master server.
■
Users can use the LDAP command-line utilities, ldapadd and ldapmodify, to update printer
entries in the directory. However, this method is not recommended. If these utilities are
used, the user must ensure that the printer-name attribute value is unique within the
ou=printers container. If the printer-name attribute value is not unique, the result of
modifications done by Solaris Print Manager, or by the lpset command, might not be
predictable.
How the Solaris Printing Software Locates Printers
The following figure highlights the part of the print process in which the printing software
checks a hierarchy of printer configuration resources to determine where to send the print
request.
Chapter 2 • Planning for Printing in the Solaris Operating System (Tasks)
59
Printer Configuration Resources
1
Print
Client
2
Print
request
FIGURE 2–2
Print Client
Command
Processing
How the Print Client Software Locates Printers
1. A user submits a print request from a print client by using the lp or lpr command. The user
can specify a destination printer name or class in any of three styles:
■
Atomic style, which is the lp command and option, followed by the printer name or
class, as shown in this example:
% lp -d neptune filename
■
POSIX style, which is the print command and option, followed by server:printer, as
shown in this example:
% lpr -P galaxy:neptune filename
■
Context-based style, as shown in this example:
% lpr -d thisdept/service/printer/printer-name filename
2. The print command locates a printer and printer configuration information as follows:
■
The print command checks to see if the user specified a destination printer name or
printer class in one of the three valid styles.
■
If the user didn't specify a printer name or class in a valid style, the command checks the
user's PRINTER or LPDEST environment variable for a default printer name.
■
If neither environment variable for the default printer is defined, the command checks
the sources configured for the printers database in the /etc/nsswitch.conf file. The
naming service sources might be one of the following:
■
■
■
60
LDAP directory information tree in the domain's ou=printers container
NIS printers.conf.byname map
NIS+ printers.conf_dir map
System Administration Guide: Solaris Printing • January 2009
Assigning Print Servers and Print Clients
Assigning Print Servers and Print Clients
You must decide which systems will have local printers physically attached to them. You must
also decide which systems will use printers on other systems. A system that has a local printer
attached to it and makes the printer available to other systems on the network is called a print
server. A system that sends its print requests to a print server is called a print client.
The LP print service software provides printing services in the Solaris Operating System.
Besides physically connecting a printer to a system, you must define the printer server
characteristics to the LP print service. Once you have print servers set up, you can set up other
systems as print clients.
Print servers and print clients can run different versions of the Solaris release and different
versions of the UNIX operating system. Print clients running the Solaris 9 release and
compatible versions can print to print servers that are running an LPD-based print service, such
as the SunOS 4.1, BSD UNIX, and Linux releases. In addition, print clients running an
lpd-based print service can print to print servers running the Solaris 9 release and compatible
versions.
The following figure shows a print configuration on a network with systems running the Solaris
release and an LPD-based print service.
BSD
print client
BSD
print client
Solaris print server
Solaris
print client
FIGURE 2–3
BSD print server
Solaris
print client
Solaris and LPD-Based Systems Print Configuration
Chapter 2 • Planning for Printing in the Solaris Operating System (Tasks)
61
Print Server Requirements and Recommendations
Print Server Requirements and Recommendations
You can attach a printer to a stand-alone system or to any system on the network. Any
networked system with a printer can be a print server, as long as the system has adequate
resources to manage the printing load.
Spooling Space
Spooling space is the amount of disk space that is used to store and process requests in the print
queue. Spooling space is the single most important factor to consider when deciding which
systems to designate as print servers. When users submit files for printing, the files are stored in
the /var/spool/lp directory until the files are printed. The size of the /var directory depends
on the size of the disk and how the disk is partitioned. Spooling space can be allocated in the
/var directory on the print server, or mounted from a file server and accessed over the network.
Note – If /var is not created as a separate file system, the /var directory uses space in the root (/)
file system. The root (/) file system is likely to be insufficient on a print server.
Disk Space
When evaluating systems as possible print servers, consider their available disk space. A large
spool directory can consume 600 Mbytes of disk space. Evaluate the size and division of disk
space on systems that can be designated as print servers.
Also, carefully evaluate the printing needs and use patterns of print client systems. For example,
assume that users in a small group typically print only short email messages, which are simple
ASCII files without sophisticated formatting requirements. In this example, a print server with
20 to 25 Mbytes of disk space allocated to the /var directory is probably sufficient. If, however,
many print client users are printing large documents, bit mapped images, or raster images, the
users will likely fill the spooling space quite frequently. When users cannot queue their jobs for
printing, work flow is interrupted. Requests for more spooling space can force you to either add
disk space for spooling or designate a different system as the print server.
If the print server has a /var directory that is too small, and a larger file system is available, you
can mount the larger file system on the /var directory for additional spooling space. For
information about mounting file systems and editing the vfstab file, see “Mounting File
Systems” in System Administration Guide: Devices and File Systems.
Memory Requirements
A print server does not require additional memory. However, you might find that more
memory improves performance in managing print requests.
62
System Administration Guide: Solaris Printing • January 2009
Print Server Requirements and Recommendations
Swap Space
The swap space allocation on the print server should be sufficient to handle LP print service
requirements. For information about how to increase swap space, see Chapter 21, “Configuring
Additional Swap Space (Tasks),” in System Administration Guide: Devices and File Systems.
Hard Disk
For optimal performance, the print server should have a hard disk and a local /var directory.
You should mount spooling space for a print server on a local hard disk. If a print server has its
own hard disk and a local /var directory, printing is much faster. And, you can more accurately
predict the time needed to process print requests.
Chapter 2 • Planning for Printing in the Solaris Operating System (Tasks)
63
64
3
C H A P T E R
3
Setting Up Printing Services (Tasks)
This chapter describes how to set up the print services, as well as how to set up printers and
make those printers accessible to systems on the network.
This is a list of the information in this chapter:
■
■
■
■
“Setting Up Solaris Printing Services (Task Map)” on page 65
“Using Solaris Print Manager” on page 66
“Setting Up the Internet Printing Protocol” on page 69
“Enabling and Disabling Printing Services (Task Map)” on page 72
For overview information, see Chapter 1, “Introduction to Printing in the Solaris Operating
System.”
For printer setup information, see Chapter 4, “Setting Up Printers (Tasks).”
Setting Up Solaris Printing Services (Task Map)
Task
Description
For Instructions
Set up printing services with
Solaris Print Manager
To use Solaris Print Manager,
there is very little configuration
required. However, there are some
guidelines and requirements for
running the tool. Also, you must
also have appropriate privileges to
use many of the tool's features.
“Determining a Method to Use for
Printer Setup and Administration”
on page 45
“How to Start Solaris Print Manager”
on page 67
65
Using Solaris Print Manager
Task
Description
For Instructions
Set up the Internet Printing
Protocol.
Setting up the IPP services
involves configuring both server
and client data:
■
For IPP server-side support,
you can customize the
listening service by adding
directives to the Apache
configuration file on the
server.
“How to Configure IPP Server Data”
on page 71
“How to Configure IPP Client Data”
on page 72
For IPP client-side support, queue
configuration data is stored in the
printers.conf configuration
database. This database contains
entries for each configured print
queue.
Using Solaris Print Manager
Solaris Print Manager is a Java-based graphical user interface that enables you to manage local
and remote printer configuration. This tool can be used in the following naming service
environments: LDAP, NIS, NIS+, and files. You must be logged in as superuser to use this tool.
Use Solaris Print Manager to set up print servers (Add New Attached Printer or Add a Network
Printer) and print clients (Add Access to Printer). An attached printer is a printer that is
physically cabled to the print server. A network printer is physically attached to the network.
Adding access to a printer, or adding remote access to a printer, is the process of giving print
clients (all those machines that are not the server) access to the printer. For more information
about printing terms, see Glossary.
Solaris Express 5/06: Starting with this release, the Solaris print system can use and recognize
localhost as the host name in the print system databases. Previously, /bin/hostname was used
to generate the print host name. These improvements were made to enable print servers to
maintain the same print host name, independent of the machine host name. For more
information, see “How to Use Solaris Print Manager to Add a Print Queue With the Local Host
Specified as the Host Name” on page 84.
66
System Administration Guide: Solaris Printing • January 2009
Using Solaris Print Manager
Solaris Print Manager Options and Selectable
Attributes
You can add, modify, or delete a print queue and add printer access by using the Solaris Print
Manager GUI tool. Most of the options that can be used with the lpadmin command are also
available in Solaris Print Manager.
Note – You must superuser equivalent privileges to gain access to some of the options in Solaris
Print Manager. Options and selectable attributes within the tool can vary, depending on the
user's role.
For a detailed description of all the printer definitions that you can set or reset by using Solaris
Print Manager, see “Setting Printer Definitions by Using Solaris Print Manager” on page 81.
For step-by-step instructions on setting up new printers with Solaris Print Manager, see
Chapter 3, “Setting Up Printing Services (Tasks).”
Solaris Print Manager and Special Characters
Solaris Print Manager checks user input for the various text fields in the input screens. There are
two types of checking: general illegal input and input that is illegal for specific fields.
Solaris Print Manager does not accept the following characters as input, except for the help
screens:
■
Shell metacharacters, such as “\$^&*(){}‘'|;:?<>, except for the destination field on the
network printer screen, which accepts colons (:)
■
Multibyte characters
■
Pound signs (#), spaces, or tabs, except the description field, which accepts tabs
Starting Solaris Print Manager
To start Solaris Print Manager, use either of the following methods:
■
■
▼
1
Select the Solaris LP Print Manager application in the GNOME Desktop.
Type the appropriate command from the command line.
How to Start Solaris Print Manager
Verify that the following prerequisites are met. To use Solaris Print Manager, you must meet the
following requirements:
Chapter 3 • Setting Up Printing Services (Tasks)
67
Using Solaris Print Manager
■
Have a bitmapped display monitor, such as the standard display monitor that comes with a
Sun workstation. Solaris Print Manager can be used only on a system with a console that is a
bitmapped screen.
■
Be running an X Window System, such as the GNOME Desktop Environment, or be using
the remote display feature on a system running an xhost environment.
■
Be logged in as superuser or an equivalent role on the print server to install an attached or
network printer, or on the print client to add access to a printer.
■
Have the required access privileges for managing the LDAP, NIS, or NIS+ database.
■
If your naming service is LDAP, you must have the following items.
■
The distinguished name (DN) of a printer administrator and password in the
directory.
■
The name or IP address of an LDAP server hosting the administered domain. This
information is usually displayed and selected automatically.
■
If your naming service is NIS, you must have the root password for the NIS master.
■
If you naming service is NIS+, you might need to complete the following steps.
a. Log in to the NIS+ master as superuser.
b. Identify the group that owns the printers table.
# niscat -o printers.org_dir.domain-name.com
.
.
.
Group
: "admin.domain-name.com"
c. If necessary, add the system that runs Solaris Print Manager to the NIS+ admin
group authorized to update the printers.org_dir.<domain> file.
# nisgrpadm -a admin.domain-name.com hostname
d. As superuser, log in to the system that runs Solaris Print Manager. Your NIS+
configuration might make it necessary to run the /usr/bin/keylogin command.
For more information, see the keylogin(1) man page.
■
Have the SUNWppm package installed.
# pkginfo | grep SUNWppm
system
SUNWppm
2
Solaris Print Manager
Start Solaris Print Manager by using one of the following methods:
■
Select the Solaris LP Print Manager in the GNOME Desktop.
System → Administration → Solaris LP Print Manager
■
68
Type the following command:
System Administration Guide: Solaris Printing • January 2009
Setting Up the Internet Printing Protocol
# /usr/sbin/printmgr &
Note – You can also start Solaris Print Manager by using the original path of the printmgr
command:
# /usr/sadm/admin/bin/printgr &
The Select Naming Service window overlays the Solaris Print Manager main window.
If Solaris Print Manager fails to start from the GNOME Desktop menu or from the command
line, check the following:
■
Superuser (root) might not have permission to connect to the X-server process on the local
system or the remote system. In this case, type the following:
$ ssh -Xhostname
$ su
(Enter root’s password)
# /usr/sbin/printmgr &
Replace hostname with either the local system name or the remote system name before
restarting Solaris Print Manager.
■
Verify that the SUNWppm package is installed on the local system or the remote system.
$ pkginfo | grep SUNWppm
3
Select the naming service that is used in your network from the Select Naming Service window.
The choices are: LDAP, NIS, NIS+, or files.
4
Check that the domain name is correct.
The Solaris Print Manager main menu is displayed after the naming service is loaded
successfully.
Setting Up the Internet Printing Protocol
The IPP listening service provides an IPP network protocol service that enables print client
systems a means of interacting with a print service on the system that is running the listener.
This listener implements server-side IPP protocol support, which includes a broad set of
standard operations and attributes. The listener is implemented on Solaris as an Apache
module and a series of shared libraries containing IPP operation and wire support. The IPP
software stack is installed when the Solaris OS is installed on the system. The listening service is
an SMF service that depends on the print service to run. As a result, IPP is automatically
enabled on a print server when the first print queue has been added . It is also disabled when the
Chapter 3 • Setting Up Printing Services (Tasks)
69
Setting Up the Internet Printing Protocol
last print queue has been removed. If you make configuration changes, you will need to restart
the listener. For more information, see “How to Restart the IPP Network Listening Service” on
page 74.
The IPP listening service implementation is embedded under the Apache Web Server. The web
server receives IPP operations through HTTP POST requests. When an HTTP POST request is
received it is passed on to the Apache IPP module (mod_ipp.so). Based on configuration, the
Apache Web Service might provide an authentication service and it might also use encryption
between client and server. The listening service runs as it's own dedicated instance of Apache.
IPP support in the Solaris OS is split into server-side and client-side support. Both the
server-side and client-side support share some common elements, as well as elements that are
unique to the client or server operation. As a result, the IPP client and server components share
a code base that implements these common elements. Table Table A–1 describes the
components that make up IPP support in the Solaris OS.
Configuring IPP Server and Client Data
The Apache configuration for this web server instance runs as the lp print service user, which
provides enough privileges to support all of the existing IPP operations, but limits access to
print service specific resources. The listening service runs as its own web server instance,
specifically configured to support IPP, which is intended to minimize potential security risks.
On the server-side, IPP configuration changes are made to the
/etc/apache/httpd-standalone-ipp.conf file. On the client-side, IPP configuration changes
are made to the /etc/printers.conf file.
Note – If you make any configuration changes, you need to restart the service to load the new
configuration. For more information, see “How to Restart the Print Scheduler” on page 122.
The IPP listening service configuration file, /etc/apache/httpd-standalone-ipp.conf, is like
any normal Apache 1.3 configuration file. The configuration files takes any Apache 1.3
configuration directives that you want to use.
The default configuration includes the following features:
■
Listening on port 631.
■
Loading of a minimal set of Apache modules.
■
Enabling all supported IPP operations at the /printers/ path, for example
ipp://server/printers/, without requiring authentication.
The default operations that are enabled for/printers/ is limited to a set of operations that
poses less of a security risk. However, all operations are enabled at the /admin/ path, for
example ipp://server/admin/, with basic authentication required.
70
System Administration Guide: Solaris Printing • January 2009
Setting Up the Internet Printing Protocol
The mod_ipp Apache configuration options to choose from are:
■
ipp-conformance - Selects the level of protocol checking. The default is automatic, allowing
maximum client interaction.
■
ipp-operation - Allows you to selectively enable or disable IPP operation support for one
more IPP operations.
■
ipp-default-user - Selects the user name to use when contacting the local print service.
The default is lp user, which allows for more functional proxying.
■
ipp-default-service - Selects the default print service where print requests are directed.
The default is the lpsched daemon.
Conformance checking types are:
■
Automatic – Only check that the requested operation is supported by the protocol listener.
(default)
■
1.0 – Check that the request conforms to IPP, 1.0
■
1.1 – Check that the request conforms to IPP, 1.1
IPP Keywords for Apache Web Server Configuration
The following syntax is used for the IPP operations keywords:
ipp-operation operation enable | disable
For more information about the IPP operation keywords that are used to configure the Apache
Web Server, see “IPP Operation Keywords” on page 316.
▼
How to Configure IPP Server Data
1
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see
“Configuring RBAC (Task Map)” in System Administration Guide: Security Services.
2
Open the /etc/apache/httpd-standalone-ipp.conf file in a text editor.
3
Add the desired IPP server configuration data.
For example:
if mod_ipp is loaded User lp run as "lp"
URI: ipp://{host]/printers/{queue}
SetHandler application/ipp use mod_ipp for this location
ipp-conformance strict enable strict protocol checking (default)
ipp-operation all enable enable all supported operations
Chapter 3 • Setting Up Printing Services (Tasks)
71
Enabling and Disabling Printing Services (Task Map)
▼
How to Configure IPP Client Data
Under PAPI support, the bsdaddr value (server,q) is converted to it's equivalent
printer-uri-supported value (lpd://server/printers/q), when the
printer-uri-supported value is missing from the printers database. However, in some
situations, such as when there is a mix of client systems and the queue is on an IPP capable
server, you might need to manually configure this data.
1
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see
“Configuring RBAC (Task Map)” in System Administration Guide: Security Services.
2
Open the /etc/printers.conf file in a text editor. Add the desired IPP client configuration
data.
For example:
/etc/printers.conf:queue: \
:bsdaddr=server,queue,Solaris: \
:printer-uri-supported=ipp\://server/printers/queue:
See Also
For additional information about printing with IPP, Appendix A, “Using the Internet Printing
Protocol.”
For more information about administering printers by using IPP, see “Administering Printers
by Using the Internet Printing Protocol (Task Map)” on page 158.
Enabling and Disabling Printing Services (Task Map)
TABLE 3–1
72
Enabling and Disabling Printing Services: Task Map
Task
Description
For Instructions
Enable, disable, and restart the IPP
network listening service through
the Service Management Facility
(SMF).
The IPP listener provides
server-side support for IPP. This
service is controlled by SMF. You
can enable, disable, and restart the
IPP network listening service by
using he svcadm command.
“How to Enable the IPP Network
Listening Service” on page 73
System Administration Guide: Solaris Printing • January 2009
“How to Disable the IPP Network
Listening Service” on page 74
“How to Restart the IPP Network
Listening Service” on page 74
Administering Network Printing Services
TABLE 3–1
Enabling and Disabling Printing Services: Task Map
(Continued)
Task
Description
For Instructions
Enable, disable, and restart the
RFC-1179 network listening
service through SMF.
The RFC-1179 network listening
service is controlled by SMF. You
can enable, disable, and restart the
RFC-1179 network listening
service by using the svcadm
command.
“How to Enable the RFC-1179
Network Listening Service” on
page 74
“How to Disable the RFC-1179
Network Listening Service” on
page 74
“How to Restart the RFC-1179
Network Listening Service” on
page 75
You can enable, disable, and restart Server-side support for the SMB
the SMB network service through
network service is controlled by
SMF.
SMF and is available through
Samba. You can enable, disable,
and restart the SMB network
listening service by using the
svcadm command.
“How to Enable the SMB Network
Service” on page 75
“How to Disable the SMB Network
Service” on page 75
“How to Restart the SMB Network
Service” on page 75
Administering Network Printing Services
Network services for the IPP, RFC-1179, and the SMB protocols are managed by SMF.
The FMRI descriptions for these printing services are as follows:
■
For the IPP listening service, the FMRI is svc:/application/print/ipp-listener.
■
For the RFC-1179 listening service, the FMRI is
svc:/application/print/rfc1179-listener.
■
For the SMB network service (server-side support), the FMRI is svc:/network/samba or
svc:/network/wins. This service is available through Samba.
For more information about SMF services and using the svcadm command, see Chapter 16,
“Managing Services (Overview),” in System Administration Guide: Basic Administration.
▼
How to Enable the IPP Network Listening Service
1
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see
“Configuring RBAC (Task Map)” in System Administration Guide: Security Services.
2
To enable the IPP network service, type:
# svcadm enable application/print/ipp-listener
Chapter 3 • Setting Up Printing Services (Tasks)
73
Administering Network Printing Services
▼
How to Disable the IPP Network Listening Service
1
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see
“Configuring RBAC (Task Map)” in System Administration Guide: Security Services.
2
To disable the IPP network service, type:
# svcadm disable application/print/ipp-listener
▼
How to Restart the IPP Network Listening Service
1
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see
“Configuring RBAC (Task Map)” in System Administration Guide: Security Services.
2
To restart the IPP network service, type:
# svcadm restart application/print/ipp-listener
▼
How to Enable the RFC-1179 Network Listening
Service
1
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see
“Configuring RBAC (Task Map)” in System Administration Guide: Security Services.
2
To enable the RFC-1179 network listening service, type:
# svcadm enable application/print/rfc1179
▼
How to Disable the RFC-1179 Network Listening
Service
1
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see
“Configuring RBAC (Task Map)” in System Administration Guide: Security Services.
2
To disable the RFC-1179 network service, type:
# svcadm disable application/print/rfc1179
74
System Administration Guide: Solaris Printing • January 2009
Administering Network Printing Services
▼
How to Restart the RFC-1179 Network Listening
Service
1
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see
“Configuring RBAC (Task Map)” in System Administration Guide: Security Services.
2
To restart the RFC-1179 network service, type:
# svcadm restart application/print/rfc1179
▼
How to Enable the SMB Network Service
1
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see
“Configuring RBAC (Task Map)” in System Administration Guide: Security Services.
2
To enable the SMB network service, type one of the following commands:
# svcadm enable application/print/samba
# svcadm enable application/print/wins
▼
How to Disable the SMB Network Service
1
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see
“Configuring RBAC (Task Map)” in System Administration Guide: Security Services.
2
To disable the SMB network service, type one of the following commands:
# svcadm disable application/network/samba
# svcadm disable application/network/wins
▼
1
How to Restart the SMB Network Service
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see
“Configuring RBAC (Task Map)” in System Administration Guide: Security Services.
Chapter 3 • Setting Up Printing Services (Tasks)
75
Administering Network Printing Services
2
To restart the SMB network service, type:
# svcadm restart application/network/samba
# svcadm restart application/network/wins
76
System Administration Guide: Solaris Printing • January 2009
4
C H A P T E R
4
Setting Up Printers (Tasks)
This chapter describes how to set up the print services, as well as how to set up printers and
make those printers accessible to systems on the network.
This is a list of the information in this chapter:
■
■
■
“Introduction to Setting Up Printers” on page 77
“Setting Up Printers on a Print Server (Task Map)” on page 78
“Setting Up Printers on a Print Client (Task Map)” on page 109
For overview information about printing, see Chapter 1, “Introduction to Printing in the Solaris
Operating System.”
Introduction to Setting Up Printers
A print server is a system on which a print queue is configured and makes the printer available
to other systems on the network. A print client is a system that utilizes configured print queues.
For more information, see “The Solaris Print Client-Server Process” on page 35.
Printers can also be divided into two categories, local and remote. A local printer refers to a
print queue that has been defined on a system that is local to you. A remote printer refers to a
print queue that is defined anywhere but your local system. These terms do not have anything to
do with whether the printer is physically attached to a system or to the network, but rather
where the print queue was configured. Where the print queue is configured determines the
server for that printer. Often, the print server supporting a building full of printers is the same
system.
Another way to view printers and printer setup is how they are connected to the world. Some
printers are directly attached to the print server by a wire. These printers are referred to as
attached printers. If a printer is attached to the network, rather than to a desktop or server, it is
called a network printer. The terms local and remote refer to print queue configuration. The
terms directly attached and network-attached refer to the physical connection of the printer
77
Setting Up Printers on a Print Server (Task Map)
hardware. Referring to a printer as an attached or a network printer defines the way the printer
is physically connected. When you are referring to a local or a remote printer, you are referring
to how the print queue for that printer was defined. Sometimes, the use of these terms can be
confusing, because a printer that is physically attached to a system also most likely has a print
queue that was defined on a local system. Similarly, print queues for network printers are more
than likely defined on a system that is remote to your local system. This is the reason that
attached and network printers are often referred to as local and remote printers.
Setting Up Printers on a Print Server (Task Map)
78
Task
Description
For Instructions
Add a new directly attached local
printer by using Solaris Print
Manager.
Use Solaris Print Manager to make
the printer available for printing
after you physically attach the
printer to a system.
“How to Add a New Directly
Attached Printer by Using Solaris
Print Manager” on page 82
Use Solaris Print Manager to add a You can specify localhost as the
print queue with localhost
host name in the print system's
specified as the system's host name. databases when adding a new print
queue or modifying an existing
print queue by using Solaris Print
Manager.
“How to Use Solaris Print Manager
to Add a Print Queue With the
Local Host Specified as the Host
Name” on page 84
Add a new directly attached local
printer by using LP print
commands.
“How to Add a New Directly
Attached Printer by Using LP Print
Service Commands” on page 86
Use LP print service commands to
make the printer available for
printing after you physically attach
the printer to a system.
Use the lpadmin command to add a Use the lpadmin command with
printer queue with localhost
the -s option to specify localhost
specified as the host name.
as the host name when setting up a
local print queue. This
modification was added to enable
print servers to maintain the same
print host name, localhost,
independent of the machine host
name.
“How to Use LP Print Commands
to Add a Print Queue With
localhost Specified as the Host
Name” on page 89
Add a new network-attached
printer by using Solaris Print
Manager.
“How to Add a New
Network&hyphen;Attached
Printer by Using Solaris Print
Manager” on page 97
Use Solaris Print Manager add a
new network-attached printer.
System Administration Guide: Solaris Printing • January 2009
Setting Up Directly Attached Printers by Using Solaris Print Manager
Task
Description
For Instructions
Add a new network-attached
printer by using LP print service
commands.
Use LP print service commands
add a new network-attached
printer.
“How to Add a New
Network&hyphen;Attached
Printer by Using LP Print Service
Commands” on page 100
Add a remote print queue for a
printer that is connected to a
Solaris print server by using IPP.
To add access to a remote print
queue by using IPP, there are two
methods that you can use:
■
Use the lpadmin command.
■
Use the lpset command.
“How to Set Up a Remote Printer
That is Connected to a Solaris Print
Server by Using IPP” on page 105
Set up a printer specifying a PPD
file.
Add a new printer specifying a PPD “How to Specify a PPD File When
file.
Adding a New Printer by using LP
Print Commands” on page 108
Add a new network-attached
printer by using the printer
vendor-supplied software.
Use Printer vendor supplied tools
to configure a network printer after
you physically connect the printer
to the network.
“How to Add a Attached Network
Printer by Using Printer
Vendor-Supplied Tools” on
page 106
Setting Up Directly Attached Printers by Using Solaris Print
Manager
The following table describes each printer definition to help you determine the information that
is needed to set up a directly attached printer by using Solaris Print Manager. All of these
attributes can also be set by using LP print commands. For more information about the printer
definitions that you can set by using Solaris Print Manager and LP print commands, see “Setting
Printer Definitions” on page 48.
Printer Definition
Description
Example
Default Setting
Required or Optional?
Printer Name
Name of printer
laser1
N/A
Required to install an
attached or network printer
and to add access to a
printer
Print server
Name of print server
venus
Use localhost for
Printer Server
attribute check box
selected by default
Required to install an
attached or network printer
and to add access to a
printer — This field is filled
in by the tool
Description
User defined string
laser printer near N/A
breakroom
Chapter 4 • Setting Up Printers (Tasks)
Optional
79
Setting Up Directly Attached Printers by Using Solaris Print Manager
Printer Definition
Description
Example
Default Setting
Required or Optional?
Printer Port
Device that the printer
is attached to
/dev/term/a
/dev/term/a
Required to install an
attached printer
Printer Type
Type of printer
unknown
PostScript
Required to install an
attached printer or a
network printer without
PPD files
File Content Type
Content to be printed
any
PostScript
Required to install an
attached printer or a
network printer without
PPD files
Printer Make
Make of printer
Lexmark
N/A
Required to install an
attached printer or a
network printer with PPD
files
Printer Model
Model of printer
Lexmark Optra E312 N/A
Required to install an
attached printer or a
network printer with PPD
files
Printer Driver
Driver that is used by
specifying PPD file
Foomatic/PostScript
N/A
Required to install an
attached printer or a
network printer with PPD
files
Fault Notification
Specifies how to notify
user of errors
Mail to superuser
Write to
superuser
Optional
Default Printer
Identifies the default
printer
N/A
N/A
Optional
Banner Page Drop-Down
Menu:
Specifies to print a
banner page.
N/A
Banner is printed
unless turned off by
using lp command
with appropriate
option
Optional
User Access List
List of users allowed to rimmer,lister
print on the print server
All users can print
Optional
80
System Administration Guide: Solaris Printing • January 2009
Setting Up Directly Attached Printers by Using Solaris Print Manager
Setting Printer Definitions by Using Solaris Print
Manager
Solaris Print Manager contains the following drop-down menus:
■
■
■
Print Manager
Printer
Tools
The Print Manager menu contains the following selectable options and attributes:
■
Select Naming Service
When you select this option, the Solaris Print Manager: Select Naming Service window is
displayed.
Options that might be available from this drop-down menu include:
■
■
■
■
files
LDAP
NIS
NIS+
To close the Select Naming Service window, click OK, Reset, Cancel, or Help.
■
Show Command-Line Console
■
Confirm All Actions
■
Use PPD files
■
Use localhost for Printer Server
A new tool attribute check box, Use localhost for Printer Server, is now available. This
attribute is selected by default. When creating a local print queue, use this option to specify
localhost as the host name in the print system's databases. This modification was made to
enable print servers to maintain the same print host name, localhost, independent of the
machine host name. To revert to earlier behavior for this option, deselect the check box.
The Printer menu contains the following selectable options:
■
Add Access to Printer
■
Add Attached Printer
■
Add Network Printer
■
Modify Printer Properties – This option is not available until you select a printer from the
list of available printers to modify.
■
Delete Printer – This option is not available out until you select a printer from the list of
available printers to delete.
Chapter 4 • Setting Up Printers (Tasks)
81
Setting Up Directly Attached Printers by Using Solaris Print Manager
The Tools menu contains the following selectable options:
■
▼
Find Printer
How to Add a New Directly Attached Printer by Using
Solaris Print Manager
When adding a directly attached printer by using Solaris Print Manager, the default is to use
PPD files. The Use PPD files attribute is located in the Print Manager drop-down menu in
Solaris Print Manager. This default attribute enables you to select the printer make, model, and
driver when adding new printer. You can deselect this attribute if you are adding a printer that
does not use a PPD file.
This procedure shows you how to add a new attached printer by using Solaris Print Manager
with the Use PPD files default attribute is selected. To add a new attached printer without PPD
files, deselect this attribute by removing the checkmark from the check box.
1
Select the system to be the print server.
2
Connect the printer to the print server. Turn on the power to the printer.
Consult the printer vendor's installation documentation for information about the hardware
switches and cabling requirements.
3
Start Solaris Print Manager on the print server where you connected the printer.
For instructions, see “How to Start Solaris Print Manager” on page 67.
You can specify localhost as the host name in the print system's databases. This modification
was made to enable print servers to maintain the same print host name, localhost,
independent of the machine host name. This option is the default in Solaris Print Manager. You
can deselect this check box to revert to earlier behavior for this option. Note that this option
applies exclusively to the set up of local print queues. For more information, see “Using PPD
Files When Setting Up a Printer in Solaris Print Manager” on page 107.
To set up a local print queue specifying localhost as the host name by using the lpadmin
command with the -s option, see “How to Use LP Print Commands to Add a Print Queue With
localhost Specified as the Host Name” on page 89.
82
4
Select New Attached Printer from the Printer menu.
The New Attached Printer window is displayed.
5
Fill in the required fields with the appropriate information.
If you need information to complete a field, click the Help button.
System Administration Guide: Solaris Printing • January 2009
Setting Up Directly Attached Printers by Using Solaris Print Manager
For example, to add a new attached printer with PPD files, provide the appropriate information
in the following fields:
Printer Name:
Description:
Printer Port:
Printer Make:
Printer Model:
Printer Driver:
Fault Notification:
Options:
Default Printer
Always Print Banner
User Access List:
The Printer Server field is filled in by Solaris Print Manager.
To add a new attached printer without PPD files, provide the appropriate information in the
following fields:
Printer Name:
Description:
Printer Port:
Printer Type:
File Contents:
Fault Notification:
Options:
Default Printer
Always Print Banner
User Access List:
The Printer Server field is filled in by Solaris Print Manager.
6
Click OK.
7
Verify that the printer has been installed. Check for the new printer entry in the Solaris Print
Manager main window.
8
Verify that the printer can print requests.
$ lp -d printer-name filename
9
10
Exit Solaris Print Manager.
Choose Exit from the Print Manager Menu.
Verify that the new Solaris Print Manager feature is working.
When you are using Solaris Print Manager to create or modify a print queue, choose the files
option as the naming service. Select the New Attached Printer option from the menu. If the
Chapter 4 • Setting Up Printers (Tasks)
83
Setting Up Directly Attached Printers by Using Solaris Print Manager
drop-down menu displays the printer make and printer model, the new feature is working.
More Information
Verifying That the RIP Feature Is Working
The RIP enables you to print to printers that do not have resident PostScript processing
capabilities.
To ensure that the RIP feature is working you need to create a new print queue by selecting one
of the make/model combinations that is available in the New Attached Printer and New
Network Printer screens used by Solaris Print Manager. Then, try printing to the new printer. If
the output of the print job is recognizable, the RIP feature is working. If the output of the print
job is unrecognizable, then the RIP feature is not working.
▼
How to Use Solaris Print Manager to Add a Print Queue
With the Local Host Specified as the Host Name
This procedure shows how to use Solaris Print Manager to add a local print queue with
localhost specified as the host name in the print system databases. This modification was
added to enable print servers to maintain the same print host name, independent of the
machine host name. Note that you can also modify a print queue by using these commands.
1
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see
“Configuring RBAC (Task Map)” in System Administration Guide: Security Services.
2
Start Solaris Print Manager as described in the procedure, “How to Start Solaris Print Manager”
on page 67.
3
Set the print host name to localhost in Solaris Print Manager.
For instructions, see “Setting Printer Definitions by Using Solaris Print Manager” on page 81.
4
Check the entry in the /etc/printers.conf file.
% lpget new-print-queue
new-print-queue:
bsdaddr=abc,new-print-queue,Solaris
If the print queue was created or modified successfully, the output of the lpget command
returns the name of the new or modified print queue.
See Also
84
For information about specifying localhost as the print server's host name when adding or
modifying a print queue with the lpadmin command, see “How to Use LP Print Commands to
System Administration Guide: Solaris Printing • January 2009
Setting Up Directly Attached Printers by Using LP Print Service Commands
Add a Print Queue With localhost Specified as the Host Name” on page 89.
Setting Up Directly Attached Printers by Using LP Print
Service Commands
The following table describes each printer attribute to help you determine the information that
is needed to set up a directly attached printer by using the lpadmin command.
Printer Definition
LP Print
Command
Option
Description
Example
Default Setting
Required/Optional?
Printer Name
-p
Name of printer
laser1
N/A
Required to install an
attached or network
printer and to add access
to a printer
Name of print
server
venus
Use localhost for
Printer Server
attribute check box
selected by default
Required to install an
attached or network
printer and to add access
to a printer — This field
is filled in by the tool
Print server
Description
-d
User defined
string
laser printer near
breakroom
N/A
Optional
Printer Port
-v
Device that the
printer is attached
to
/dev/term/a
/dev/term/a
Required to install an
attached printer
Printer Type
-T
Type of printer
unknown
PostScript
Required to install an
attached printer or a
network printer without
PPD files
File Content Type
-I
Content to be
printed
any
PostScript
Required to install an
attached printer or a
network printer without
PPD files
PPD file name
-n
Full path to the
PPD file and file
name with .ppd
extension.
path/necprinter.ppd
N/A
Optional
Fault
Notification
-A
Specifies how to
notify user of
errors
-A mail
Write to superuser Optional
Default Printer
-d
Identifies the
default printer
N/A
N/A
Chapter 4 • Setting Up Printers (Tasks)
Optional
85
Setting Up Directly Attached Printers by Using LP Print Service Commands
LP Print
Command
Option
Printer Definition
Banner Page control
Menu:
▼
-o
Description
Example
Default Setting
Required/Optional?
Select whether to
print banner page
-o banner=never
-o banner=optional Optional
How to Add a New Directly Attached Printer by Using
LP Print Service Commands
This procedure describes how to add a new attached printer specifying a PPD file. The -n option
to the lpadmin command enables you to specify a PPD file when adding a new attached printer
or modifying an existing attached printer. Two examples follow this procedure. The first
example shows you how to add a new attached printer with PPD files. The second example
shows you how to add a new attached printer without PPD files.
1
Connect the printer to the system, and turn on the power to the printer.
Consult the printer vendor's installation documentation for information about the hardware
switches and cabling requirements.
2
Collect the information that is required to configure an attached printer with PPD files.
■
■
■
Printer name and port device
File content type
PPD file
To determine the PPD file that the printer will use, first define the printer make, model, and
driver.
For overview information about using PPD files when adding a new printer or modifying an
existing printer by using LP print service commands, see “What's New in Printing?” on page 21.
3
Define the printer name, port device, file content type, and PPD file that the printer will use.
When using PPD files, the file content type is typically PostScript.
a. Specify the printer name and the port device that the printer will use.
# lpadmin -p printer-name -v /dev/printers/0
The device to use is /dev/printers/0.
You can now use the -s option with the lpadmin command to specify the print service host
name as localhost. For more information, see “How to Use LP Print Commands to Add a
Print Queue With localhost Specified as the Host Name” on page 89.
b. Specify the interface script that the printer will use.
# lpadmin -p printer-name -m standard_foomatic
86
System Administration Guide: Solaris Printing • January 2009
Setting Up Directly Attached Printers by Using LP Print Service Commands
c. Specify the file content type and the PPD file that the printer will use.
# lpadmin -p printer-name -I content-type -n /path/ppdfile
The PPD file that you supply is located in the /path directory.
Note – If /path is not a PPD file repository on the system, then a copy of the PPD file is placed
in the user label directory in the user PPD file repository. For more information, see
“Administering PPD Files by Using the PPD File Management Utility (Task Map)” on
page 219.
d. Specify the printer description.
# lpadmin -p printer-name -D "printer-description"
For more information, see the lpadmin(1M) man page.
4
(Optional) Add filters to the print server.
# cd /etc/lp/fd
# for filter in *.fd;do
> name=‘basename $filter .fd‘
> lpfilter -f $ name-F $ filter
> done
5
Enable the printer to accept print requests and to print those requests.
# accept printer-name
# enable printer-name
6
Verify that the printer is correctly configured.
# lpstat -p printer-name -l
The output of the lpstat command will list the PPD file that you used.
Example 4–1
Adding a New Directly Attached Printer With PPD Files by Using LP Print Service
Commands
This example shows how to add a new attached printer with PPD files. The -n option to the
lpadmin command enables you to add a new print queue by specifying PPD files. The following
information is used as an example.
The information that you provide might vary from the following:
■
■
■
■
Printer name: paper
Port device: /dev/printers/0
File content type: postscript
PPD file: /path/Lexmark-Optra_E312-Postscript.ppd.gz
Chapter 4 • Setting Up Printers (Tasks)
87
Setting Up Directly Attached Printers by Using LP Print Service Commands
#
#
#
#
#
#
lpadmin -p paper
lpadmin -p paper
lpadmin -p paper
lpadmin -p paper
lpadmin -p paper
cd /etc/lp/fd
-v
-I
-m
-n
-D
/dev/printers/0
(1)
postscript
(2)
standard_footmatic
(3)
/path/Lexmark-Optra_E312-Postscript.ppd.gz
"Color printer on third floor, rm 3003"
(4)
(5)
# accept paper
destination “paper” now accepting requests
# enable paper
(6)
printer “paper” now enabled
# lpstat -p paper
(7)
printer paper is idle. enabled since Feb 28 11:21 2004...
1. Defines the printer name and the port device that the printer will use
2. Sets the file content types to which the printer can print to directly
3. Specifies the interface script for utilizing PPD files
Note – This command also copies the PPD file to the user label in the user PPD file
repository, if /path is not in an existing PPD file repository on the system.
4. Specifies the path to the PPD file and the PPD file name
5. Adds a description for the printer
6. Accepts print requests for the printer and enables the printer
7. Verifies that the printer is ready for printing
Example 4–2
Adding a New Directly Attached Printer Without PPD Files by Using LP Print Service
Commands
This example shows how to add a new attached printer without PPD files. The commands in
this example must be executed on the print server where the printer is connected. The following
information is used as an example.
The information that you provide might vary from the following:
■
Printer name: luna
■
Port device: /dev/term/b
■
Printer type: PS
■
File content type: postscript
# chown lp /dev/term/b
# chmod 600 /dev/term/b
(1)
# lpadmin -p luna -v /dev/term/b
88
(2)
System Administration Guide: Solaris Printing • January 2009
Setting Up Directly Attached Printers by Using LP Print Service Commands
#
#
#
#
lpadmin -p luna -T PS
(3)
lpadmin -p luna -I postscript
(4)
lpadmin -p luna -D "Room 1954 ps"
(5)
cd /etc/lp/fd
# accept luna
destination “luna” now accepting requests
# enable luna
(6)
printer “luna” now enabled
# lpstat -p luna
(7)
printer luna is idle.enabled since Feb 28 11:21 2003.available
1.
2.
3.
4.
5.
6.
7.
See Also
■
■
▼
Gives lp ownership and sole access to a port device
Defines the printer name and the port device that the printer will use
Sets the printer type of the printer
Specifies the file content types to which the printer can print directly
Adds a description for the printer
Accepts print requests for the printer and enables the printer
Verifies that the printer is ready for printing
“How to Add Printer Access by Using Solaris Print Manager” on page 110 to add printer
access on a print client.
“How to Set Up a .printers File” on page 112 to allow users to customize printer aliases.
How to Use LP Print Commands to Add a Print Queue
With localhost Specified as the Host Name
This procedure shows how to use LP print commands to add a local print queue with
localhost specified as the host name in the print system databases. This modification was
added to enable print servers to maintain the same print host name, independent of the
machine host name. Note that you can also modify a print queue by using these commands.
1
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see
“Configuring RBAC (Task Map)” in System Administration Guide: Security Services.
2
Set the print host name to localhost.
# lpadmin -p new-print-queue -s localhost -v device
3
Check the entry in the /etc/printers.conf file.
% lpget new-print-queue
new-print-queue:
bsdaddr=abc,new-print-queue,Solaris
Chapter 4 • Setting Up Printers (Tasks)
89
Setting Up Directly Attached Printers by Using LP Print Service Commands
If the print queue was created or modified successfully, the output of the lpget command
returns the name of the new or modified print queue.
Example 4–3
Adding a Print Queue by Specifying localhost as the Host Name
This example shows how to add a new print queue, paper, by using the lpadmin command with
the -s option to specify localhost as the host name.
% su - root
# lpadmin -p paper -s localhost -v /dev/ecpp0
% lpget paper
paper:
bsdaddr=localhost,paper,Solaris
Example 4–4
Adding a Print Queue by Using the Default Behavior of lpadmin to Specify the Host
Name
This example shows the default behavior of the lpadmin command for using system host name,
abc, when adding a new print queue.
% su - root
# lpadmin -p newspaper -v /dev/printers/0
% lpget newspaper
fargo:
bsdaddr=abc,newspaper,Solaris
Example 4–5
Modifying a Print Queue to Use the Local Host as the Print Server Name
This example shows how to modify an existing print queue, newspaper, and specify localhost
as the new print server name.
% su - root
# lpadmin -p newspaper -s localhost
# lpget newspaper
newspaper:
bsdaddr=localhost,newspaper,Solaris
See Also
90
For information about specifying localhost as the print server's host name when adding or
modifying a print queue with Solaris Print Manager, see “How to Use Solaris Print Manager to
Add a Print Queue With the Local Host Specified as the Host Name” on page 84.
System Administration Guide: Solaris Printing • January 2009
Setting Up Network Printers
Setting Up Network Printers
A network printer is a hardware device that is directly connected to the network. This printer
can be accessed from a print server without physically connecting the printer to the print server
with a cable. The network printer has its own system name and IP address.
Caution – Configuring a network printer without utilizing queue configuration on a print server
is an unsupported method that results in printer misconfiguration.
You can correctly configure a network printer with Solaris Print Manager by selecting the New
Network Printer option. Or, you can use the lpadmin command to correctly configure a
network printer. For information about how to configure a network printer by using the
lpadmin command, see “How to Add a New Network&hyphen;Attached Printer by Using LP
Print Service Commands” on page 100.
Note that you should not use the lpadmin -p queue-name -s printer-name command or the
Add Access to Printer option of Solaris Print Manager to add a network printer. These methods
should be used exclusively to point to an already existing queue on a remote print server.
The print server includes the following features:
■
■
■
Queueing capabilities
Filtering
Printing administration for a network printer
Printing directly to a network printer results in a printer misconfiguration that is likely to cause
a number of problems. Additionally, job options, such as copies, the use or disuse of burst page,
and filtering, are lost.
Network printers might use one or more special protocols that require a vendor-supplied
printing program. The procedures that are used to set up the vendor-supplied printing program
can vary. If the printer does not come with vendor– supplied support, Solaris network printer
support can be used with most devices. Use the printer vendor-supplied software, whenever
possible.
The vendor might supply an SVR4 printer interface script to replace the standard printer
interface script. If so, that SVR4 interface script calls the vendor-supplied printing program to
send the job to the printer. If not, you need to modify the standard interface script to call the
vendor-supplied printing program. To do so, edit the per-printer copy of the standard interface
script to call the vendor-supplied printing program.
Chapter 4 • Setting Up Printers (Tasks)
91
Setting Up Network Printers
The following are the terms that are used in network printer configuration. For a complete
description of printing terms, see Glossary.
■
Print server – The system that spools and schedules the jobs for a printer.
■
Printer-host device – The software and hardware supplied by a vendor that provides
network printer support for a non-network capable printer.
■
Printer node – Either the physical printer or the printer-host device.
■
Printer name – The name typed on the command line when you use any of the printer
commands.
■
Destination or network printer access name – The internal name of the printer node port
that is used by the printer subsystem to access the printer.
■
Protocol – The over-the-wire protocol that is used to communicate with the printer. For
more information, see “Selecting the Printing Protocol” on page 94.
■
Timeout, or retry interval timeout – Is a seed number that represents the number of
seconds to wait between attempting connections to the printer.
Sun Support for Network Printers
If the network printer vendor does not provide software support, Sun supplied software is
available. The software provides generic support for network printers and is not capable of
providing full access to all possible printer attributes.
A general discussion of how to add a network printer is provided in “Setting Up Network
Printers” on page 91. The following is a discussion of printer management when you use the
Sun supplied software.
Invoking Network Printer Support
The software support for network printers is called through the network interface script
netstandard. Configuring a network printer with this script causes the network printer
support module to be called. Here is the command to configure the printer with the network
support.
lpadmin -p printer-name -m netstandard
Selecting the Printer Node Name
You select the printer node name. This name must be unique, as with any node on the network.
The printer node name is associated with the IP address of the printer.
92
System Administration Guide: Solaris Printing • January 2009
Setting Up Network Printers
Selecting the Destination Name (Also Called the
Network Printer Access Name)
The print subsystem requires access information for the printer. The subsystem uses the
destination name when making the network connection to the printer. You supply this name to
the print subsystem by using the lpadmin command. This name then becomes part of the
printer configuration database. The printer access name is the name of the printer node,
sometimes qualified by a port name. Port designation varies across printer vendors. You can
find information about port designation in the printer documentation.
Here is the format of printer access name:
printer-node-name[:port-designation]
Destination names can be specified in one of three forms:
Atomic (simple)
(destination) - Is resolved by locating a printer-uri-supported
key/value pair for the named destination in the printers.conf or the
printers configuration database. If no printer-uri-supported key is
found for an entry, it's bsdaddr value is converted to printer URI form and
used.
For more information, see the printers(4) and printers.conf(4) man
pages.
Printer URI
(scheme://endpoint) - Is completely resolved and specifies the protocol
and communication endpoint to contact for print services. This form of
destination name is useful for accessing print services outside of your
system's current management domain. Since the name includes the
protocol to use when contacting the print service, you can select a richer
protocol than the RFC-1179 protocol.
POSIX
(server:queue[:extensions]) - Is complete and resolves to an equivalent
printer URI form of lpd://server/printers/queue[#extensions] This
form is being maintained for Solaris backward compatibility only. The
printer URI form is the preferred replacement.
EXAMPLE 4–6
Destination Name (or Network Printer Access Name) With Port Designation (Number)
A common port designation with TCP is 9100. If the printer node name is pn1, and the printer
vendor defines the port as 9100, then the printer access name is pn1:9100. To configure a
printer in this case, use the following command:
lpadmin -p printer_name -o dest=pn1:9100
Chapter 4 • Setting Up Printers (Tasks)
93
Setting Up Network Printers
EXAMPLE 4–7
Destination Name (or Network Printer Access Name) With BSD Port Designation (Name)
When you use the BSD protocol, the port designation might not be a number, but some name
defined by the printer vendor, for example: xxx_parallel_1. If the printer node name is
cardboard, then the printer access name is cardboard:xxx_parallel_1. To configure a printer
in this case, use the following command:
lpadmin -p printer-name -o dest=cardboard:xxx_parallel_1
EXAMPLE 4–8
Destination Name (or Network Printer Access Name) With No Port Designation
If there is no port designation, and the printer node name is newspaper, the printer access name
is the printer node name: newspaper. To configure a printer in this case, use the following
command:
lpadmin -p printer-name -o dest=newspaper
Selecting the Printing Protocol
The print subsystem uses the BSD print protocol and raw TCP to communicate with the
printer. The printer vendor documentation provides information about which protocol to use.
In general, the TCP protocol is more generic across printers.
Note – The Device URI protocol was introduced in the Solaris Express 2/05 releaseSolaris 10
5/08 release. This protocol enables remote printer access. You can specify a device-uri when
adding a network printer by using the lpadmin command or by using Solaris Print Manager.
To select the BSD protocol, type:
lpadmin -p printer-name -o protocol=bsd
To select the TCP protocol, type:
lpadmin -p printer-name -o protocol=tcp
If the protocol that is selected is the BSD print protocol, you can further select the order of
sending the control file to the printer. Some printers expect the control file, then the data file.
Other printers expect the reverse. For this information, see the printer vendor documentation.
The default is to send the control file first.
To select the order, type one of the following commands:
94
System Administration Guide: Solaris Printing • January 2009
Setting Up Network Printers
lpadmin -p printer-name -o bsdctrl=first
lpadmin -p printer-name -o bsdctrl=last
For information about using the IPP protocol, see “Administering Printers by Using the
Internet Printing Protocol (Task Map)” on page 158.
Setting the Timeout Value
The timeout option allows the user to select the amount of time (in seconds) to wait between
successive attempts to connect to the printer. Some printers have a long warm up time, and a
longer timeout value is advised. The default is 10 seconds.
The timeout value does not impact the success or failure of the print process. The value is a seed
value that the software uses as the initial timeout count. On repeated failures, this count is
increased. A message is sent to the spooler when repeated attempts to connect to the printer fail.
This message alerts the user that intervention might be required. The failure could be anything
from the printer being turned off to the printer being out of paper. If these messages are
produced too often, for example when the printer is warming up, increasing the timeout value
will eliminate spurious messages.
You can experiment to find the optimal timeout value. Type the following command to set the
timeout value:
lpadmin -p printer-name -o timeout=n
Managing Network Printer Access
Each network printer should have only one server that provides access to the printer. This
restriction enables the server to manage access to the printer and keep jobs coherent.
The default device for the network printer is /dev/null. This device is sufficient when the
printer has only one queue. If more queues are required, set the device to a file. This setting
enables the print system to restrict access to the printer across queues. The following
commands create a device file and configure it as the network printer device.
touch /path/filename
chmod 600 /path/filename
lpadmin -p printer-name -v /path/filename
The following is an example of how to create a device file called devtreedown.
Chapter 4 • Setting Up Printers (Tasks)
95
Setting Up Network-Attached Printers by Using Solaris Print Manager
# touch /var/tmp/devtreedown
# chmod 600 /var/tmp/devtreedown
# lpadmin -p treedown -v /var/tmp/devtreedown
Setting Up Network-Attached Printers by Using Solaris Print
Manager
The following table describes each printer attribute to help you determine the information that
is needed to set up a network-attached printer with Solaris Print Manager.
Printer Definition
Description
Example
Default Setting
Required or Optional?
Printer Name
Name of printer
laser1
N/A
Required to install an
attached or network
printer and to add access
to a printer
Print server
Name of print server
venus
Use localhost for
Printer Server
attribute check box
selected by default
Required to install an
attached or network
printer and to add access
to a printer — This field
is filled in by the tool
Description
User defined string
laser printer near N/A
breakroom
Optional
Printer Type
Type of printer
unknown
PostScript
Required to install an
attached printer or a
network printer without
PPD files
File Content Type
Content to be printed
any
PostScript
Required to install an
attached printer or a
network printer without
PPD files
Printer Make
Make of printer
Lexmark
N/A
Required to install an
attached printer or a
network printer with
PPD files
Printer Model
Model of printer
Lexmark Optra E312 N/A
Required to install an
attached printer or a
network printer with
PPD files
96
System Administration Guide: Solaris Printing • January 2009
Setting Up Network-Attached Printers by Using Solaris Print Manager
Printer Definition
Description
Example
Default Setting
Required or Optional?
Printer Driver
Driver that is used by
specifying PPD file
Foomatic/PostScript
N/A
Required to install an
attached printer or a
network printer with
PPD files
Destination
Destination name for
the network printer
For examples, see
“Selecting the
Destination Name
(Also Called the
Network Printer
Access Name)” on
page 93
N/A
Required to install a
network printer
Protocol
Protocol used to
communicate with the
printer
TCP, URI
BSD
Required to install a
network printer
Fault Notification
Specifies how to notify
user of errors
Mail to superuser
Write to superuser
Optional
Default Printer
Identifies the default
printer
N/A
N/A
Optional
Banner Page Drop-Down
Menu:
■
Always Print Banner
■
User
Selectable-Default=on
■
Never Print Banner
Print banner?
N/A
Print banner? User
selectable option,
turned on by default. To
turn banner printing
off, use lp command
with appropriate
option.
Banner page printing
turned on by default
Banner is printed unless unless another option is
specified within the
turned off by using lp
Solaris Print Manager
command with
pull-down menu
appropriate option
Banner is printed
Banner is not printed
Never print banner?
User Access List
▼
List of users allowed to rimmer,lister
print on the print server
All users can print
Optional
How to Add a New Network-Attached Printer by Using
Solaris Print Manager
The Use PPD files default attribute in Solaris Print Manage enables you to select the printer
make, model, and driver when adding new printer. For more information on this feature, see
“Administering Printers That Use PPD Files” on page 115.
This procedure shows you how to add a new network printer by using Solaris Print Manager
with the Use PPD files default attribute is selected. To add a new network printer without PPD
files, deselect this attribute by removing the checkmark from the check box.
Chapter 4 • Setting Up Printers (Tasks)
97
Setting Up Network-Attached Printers by Using Solaris Print Manager
1
Select the system to be the print server.
2
Connect the printer to the network. Turn on the power to the printer.
Consult the printer vendor's installation documentation for information about the hardware
switches and cabling requirements.
3
Start Solaris Print Manager on the print server.
For instructions, see “How to Start Solaris Print Manager” on page 67.
In this Solaris release you can specify localhost as the host name in the print system's
databases. This modification was added to enable print servers to maintain the same print host
name, localhost, independent of the machine host name. This option is the default in Solaris
Print Manager. To revert to earlier behavior for this option, deselect the check box. Note that
this option applies exclusively to the setup of local print queues. For more information, see
“Solaris Print Manager Options and Selectable Attributes” on page 67.
To set up a local print queue specifying localhost as the host name by using the lpadmin
command with the -s option, see “How to Use LP Print Commands to Add a Print Queue With
localhost Specified as the Host Name” on page 89.
4
Select New Network Printer from the Printer menu.
The New Network Printer window is displayed.
5
Fill in the required fields with the appropriate information.
If you need information to complete a field, click the Help button.
For example, to add a new network printer with PPD files, provide the appropriate information
in the following fields:
Printer Name:
Description:
Printer Make:
Printer Model:
Printer Driver:
Fault Notification:
Destination:
Protocol:
Options:
Default Printer
Always Use Banner
User Access List:
The Printer Server field is filled in by Solaris Print Manager.
98
System Administration Guide: Solaris Printing • January 2009
Setting Up Network-Attached Printers by Using LP Print Commands
To add a new network printer without PPD files, provide the appropriate information in the
following fields:
Printer Name:
Description:
Printer Type:
File Contents:
Fault Notification:
destination:
Protocol:
Options:
Default Printer
Always Use Banner
User Access List:
The Printer Server field is filled in by Solaris Print Manager.
6
Click OK.
7
Verify that the printer has been installed. Check for the new printer entry in the Solaris Print
Manager main window.
8
Verify that the printer can print requests.
$ lp -d printer-name filename
9
Exit Solaris Print Manager.
Choose Exit from the Print Manager Menu.
Setting Up Network-Attached Printers by Using LP Print
Commands
The following table describes each printer attribute to help you determine the information that
is needed to set up a network-attached printer by using the lpadmin command.
Printer Definition
LP Command
Option
Description
Example
Default Setting
Required or Optional?
Printer Name
-p
Name of printer
laser1
N/A
Required to install an
attached or network
printer and to add access
to a printer
Chapter 4 • Setting Up Printers (Tasks)
99
Setting Up Network-Attached Printers by Using LP Print Commands
LP Command
Option
Printer Definition
Print server
Description
Example
Default Setting
Required or Optional?
Name of print server venus
Use localhost
for Printer
Server attribute
check box selected
by default
Required to install an
attached or network
printer and to add access
to a printer — This field is
filled in by the tool
Description
-D
User defined string
laser printer near
breakroom
N/A
Optional
Printer Type
-T
Type of printer
unknown
PostScript
Required to install an
attached printer or a
network printer without
PPD files
File Content Type -I
Content to be
printed
any
PostScript
Required to install an
attached printer or a
network printer without
PPD files
PPD file name
-n
Full path and file
$path/myprinter.ppd
name of the PPD file
including the .ppd
extension
N/A
Optional
Destination
-o
Destination name
for the network
printer
-o
N/A
dest=access-name:port
Required to install a
network printer
Protocol
-o
Protocol used to
communicate with
the printer
-o protocol=tcp
BSD
Required to install a
network printer
Fault
Notification
-A
Specifies how to
notify user of errors
-A mail
Write to
superuser
Optional
Default Printer
-d
Identifies the default N/A
printer
N/A
Optional
Select whether to
print banner
-o
banner=optional
Optional
Banner Page control -o
▼
-o banner=never
How to Add a New Network-Attached Printer by Using
LP Print Service Commands
This procedure describes how to add a new network printer with the expanded printer support
that is available in this release. There are two examples that follow this procedure. The first
100
System Administration Guide: Solaris Printing • January 2009
Setting Up Network-Attached Printers by Using LP Print Commands
example shows you how to add a new network printer with PPD files by using lp commands.
The second example shows you how to add a new network printer without PPD files by using lp
commands.
The following steps are necessary to set up a network printer by using the network printer
support software. The use of this software is intended for printers that do not come with
vendor-supplied software.
For overview information about adding a new network printer or modifying an existing
network printer with PPD files, see “What's New in Printing?” on page 21.
1
Connect the printer to the network, and turn on the power to the printer.
Consult the printer vendor's installation documentation for information about the hardware
switches and cabling requirements. Get an IP address and select a name for the printer node.
This step is equivalent to adding any node to the network.
2
Collect the information that is required to configure a new network printer with PPD files.
■
■
■
■
■
■
Printer name and port device
Network printer access name
Protocol
Timeout
File content type
PPD file
To determine the PPD file, first define the printer make, model, and driver that the printer will
use.
For more information, see the terms that are described in “Setting Up Network Printers” on
page 91.
3
Define the printer name, port device, file content type, and PPD file that the printer will use.
When using PPD files, the file content type is usually PostScript.
a. Specify the printer name and the port device that the printer will use.
# lpadmin -p printer-name -v /dev/null
The device to use is /dev/null.
You can use the -s option with the lpadmin command to specify the print service host name
as localhost. For more information, see “How to Use LP Print Commands to Add a Print
Queue With localhost Specified as the Host Name” on page 89.
You can use the -v option to specify a device-uri. The protocol enables you to access remote
printers. For more information, see “What is a Device URI?” on page 31.
Chapter 4 • Setting Up Printers (Tasks)
101
Setting Up Network-Attached Printers by Using LP Print Commands
b. Specify the interface script that the printer will use.
# lpadmin -p printer-name -m netstandard_foomatic
The interface script that is supplied with the support software for network printer is
/usr/lib/lp/model/netstandard_foomatic.
c. Specify the file content type and PPD file that the printer will use.
When using PPD files, the file content type is usually PostScript.
# lpadmin -p printer-name -I content-type -n
/path/ppdfile
The PPD file that you specify is located in the /path directory.
Note – If /path is not a PPD file repository on the system, then a copy of PPD file is placed in
the user label directory in the user PPD file repository. For more information, see
Chapter 9, “Administering Printers by Using the PPD File Management Utility (Tasks).”
For more information, see lpadmin(1M).
d. Specify the printer description.
# lpadmin -p printer-name -D "printer-description"
4
Set the printer destination, protocol, and timeout values.
# lpadmin -p printer-name -o dest=access-name:port -o protocol=protocol
-o timeout=value
5
-p printer-name
Specifies the network printer name.
-o dest=access-name:port
Sets the printer destination to the network printer access name
and a designated printer vendor port, if the port is defined in the
printer vendor documentation.
-o protocol=protocol
Sets the over-the-wire protocol used to communicate with the
printer. Both BSD and raw TCP are supported.
-o timeout=value
Sets a retry timeout value that represents a number of seconds to
wait between attempting connections to the printer.
(Optional) Add filters to the print server.
# cd /etc/lp/fd
# for filter in *.fd;do
> name=‘basename $ filter .fd‘
> lpfilter -f $name -F $ filter
> done
102
System Administration Guide: Solaris Printing • January 2009
Setting Up Network-Attached Printers by Using LP Print Commands
6
Enable the printer to accept print requests and to print those requests.
# accept printer-name
# enable printer-name
7
Verify that the printer is correctly configured.
# lpstat -p printer-name
8
Add client access to the new printer.
Now that the printer has been added, create access to the printer for the clients. For more
information, see “Setting Up a Print Client” on page 109. For information about how to define a
print client by using a naming service, see “Printing Support in the naming service Switch” on
page 57.
9
Complete any optional tasks.
There are several optional tasks that you might want to complete when setting up a printer. For
pointers to the remaining tasks, see “Setting Up Solaris Printing Services (Task Map)” on
page 65. For information about how to define print clients by using the naming service, see
“Printing Support in the naming service Switch” on page 57.
Example 4–9
Adding a New Network-Attached Printer With PPD Files by Using LP Print Service
Commands
This example shows how to add a new network printer with PPD files. The -n option to the
lpadmin command enables you to add a new print queue by specifying PPD files. The
commands used in this example must be executed on the print server. The following
information is used as an example only. The information that you provide will vary.
■
Printer name : luna1
■
Device: /dev/null
■
Interface: /usr/lib/lp/model/netstandard_foomatic
■
Network printer access name: nimquat:9100
■
Protocol: tcp
■
Timeout: 5
■
File content type: postscript
■
PPD file: /path/ppdfile
# lpadmin -p
# lpadmin -p
# lpadmin -p
-o timeout=5
# lpadmin -p
luna1 -v
luna1 -m
luna1 -o
(3)
luna1 -I
/dev/null
(1)
netstandard_foomatic
(2)
dest=nimquat:9100 -o protocol=tcp
postscript
Chapter 4 • Setting Up Printers (Tasks)
(4)
103
Setting Up Network-Attached Printers by Using LP Print Commands
lpadmin -p luna1 -n /path/ppdfile
(5)
lpadmin -p luna1 -D "Second floor color printer"
(6)
cd /etc/lp/fd
for filterin *.fd;do
> name =‘basename $ filter .fd‘
> lpfilter -f $ name -F $ filter
> done
(7)
# accept luna1
destination "luna1" now accepting requests
# enable luna1
(8)
printer "luna1" now enabled
# lpstat -p luna1
(9)
printer luna1 is idle. enabled since Mon Apr 19 15:31:15 2004. available.
#
#
#
#
1.
2.
3.
4.
5.
6.
7.
8.
9.
Example 4–10
Defines printer name and sets the device to /dev/null
Defines the interface script for network printers
Sets the destination, protocol, and timeout
Specifies the file content types to which the printer can print to directly
Specifies the PPD file to use
Adds a description for the printer
Adds print filters to the print server
Accepts print requests for the printer and enables the printer
Verifies that the printer is ready for printing
Adding a New Network-Attached Printer Without PPD Files by Using LP Print
Service Commands
This example shows how to add a new network printer without PPD files. Thse commands
must be executed on the print server.
The following information is used as an example:
■
■
■
■
■
■
■
■
Printer name: luna1
Device: /dev/null
Interface: /usr/lib/lp/model/netstandard
Network printer access name: nimquat:9100
Protocol: tcp
Timeout: 5
File content type: postscript
Printer type: PS
# lpadmin -p
# lpadmin -p
# lpadmin -p
-o timeout=5
# lpadmin -p
104
luna1 -v
luna1 -m
luna1 -o
(3)
luna1 -I
/dev/null
(1)
netstandard
(2)
dest=nimquat:9100 -o protocol=tcp
postscript -T PS
(4)
System Administration Guide: Solaris Printing • January 2009
Setting Up Network-Attached Printers by Using LP Print Commands
# lpadmin -p luna1 -D "Room 1954 ps"
(5)
# cd /etc/lp/fd
# for filter in *.fd;do
> name =‘basename $ filter .fd‘
> lpfilter -f $ name -F $ filter
> done
(6)
# accept luna1
destination "luna1" now accepting requests
# enable luna1
(7)
printer "luna1" now enabled
# lpstat -p luna1
(8)
printer luna1 is idle.enabled since Feb 28 11:21 2003.available.
1. Defines printer name and sets the device to /dev/null
2. Defines the interface script for network printers
3. Sets the destination, protocol, and timeout
4. Specifies the file content type to which the printer can print directly, and the printer type
5. Adds a description for the printer
6. Adds print filters to the print server
7. Accepts print requests for the printer and enables the printer
8. Verifies that the printer is ready for printing
▼
How to Set Up a Remote Printer That is Connected to a
Solaris Print Server by Using IPP
1
Become superuser or assume an equivalent role.
2
Set up a remote printer by using one of the following methods:
■
To use the lpadmin command, type the following command:
# lpadmin -p printer -s ipp://printer-ip-address/printers/printer-name
■
To use the lpset command, type the following command:
# lpset -a printer-uri-supported=ipp://printer-ip-address/printers/printer-name
The -a option of the lpset command accepts key/value pairs. In the preceding output, the
key that is specified is printer-uri-supported, with the value being
ipp://printer-ip-address/printers/printer-name. Typically, you would not configure
this value to refer directly to a printer, but rather a print queue on a print server.
Chapter 4 • Setting Up Printers (Tasks)
105
Adding a New Network-Attached Printer by Using Printer Vendor-Supplied Software
3
(Optional) To determine the URI you have supplied, type the following command:
$ lpstat -p ipp://printer-ip-address/printers/printer-name
When you use the lpstat command and specify the URI as the destination, the local printing
configuration is bypassed, connecting you directly to the network-attached printer or the
remote print server.
Adding a New Network-Attached Printer by Using Printer
Vendor-Supplied Software
Network printers often have software support provided by the printer vendor. If your printer
has printer vendor- supplied software, use the printer vendor software, when possible. The
software is designed to support the attributes of the printer and can take full advantage of the
printer capabilities. Read the printer vendor documentation to install and configure the printer,
so that it can operate with the LP print service.
▼
How to Add a Attached Network Printer by Using
Printer Vendor-Supplied Tools
1
Connect the printer to the network. Turn on the power to the printer.
Consult the printer vendor's installation documentation for information about the hardware
switches and cabling requirements. Get an IP address and select a name for the printer node.
This method is equivalent to adding any node to the network.
2
Follow the printer vendor instructions to add the network printer.
Use the printer vendor instructions to configure the network printer. These instructions are
specific to the vendor and printer.
106
3
Add client access to the new printer.
Now that the printer has been added, create access to the printer for the print clients. For more
information, see “Setting Up a Print Client” on page 109.
4
Complete any optional tasks.
There are several optional tasks that you might want to complete when setting up a network
printer. For pointers to these tasks, see “Setting Up Solaris Printing Services (Task Map)” on
page 65.
System Administration Guide: Solaris Printing • January 2009
Setting Up Printers That are Associated With PPD Files
Setting Up Printers That are Associated With PPD Files
You can set up a printer and associate that printer with a PPD file by using either Solaris Print
Manager or LP print commands.
When adding or modifying a printer in Solaris Print Manager, the default option is to use PPD
files. The Use PPD files attribute is located in the Print Manager drop-down menu of Solaris
Print Manager. This default option enables you to select the printer make, model, and driver
when you add new printer or modify an existing printer. To deselect this attribute, remove the
checkmark from the check box. For more information about how to specify PPD files when a
adding a printer, see “Administering Printers That Are Associated With PPD Files (Task Map)”
on page 150.
To specify a PPD file when adding or modifying a printer by using LP print commands, use the
lpadmin command with the -n option. For more information, see “How to Specify a PPD File
When Adding a New Printer by using LP Print Commands” on page 108.
Using PPD Files When Setting Up a Printer in Solaris
Print Manager
Solaris Print Manager includes a Use PPD files option that is the default when you create a new
print queue or modify an existing print queue. If you do not want to specify a PPD file, you can
override this option by removing the checkmark from the check box. To switch back to using
PPD files, recheck the Use PPD files check box.
Note that if you create a new print queue or modify an existing print queue with PPD files in
Solaris Print Manger, you cannot assign the printer type or file content type printer definitions.
However, If you do not use PPD files when creating a print queue, you can assign these printer
definitions by deselecting the Use PPD files attribute in the Solaris Print Manager drop-down
menu.
To create a print queue with PPD files, you are required to provide the following information:
■
■
■
Printer make
Printer model
Printer driver
The definitions for printer make, model, and printer driver are available in Solaris Print
Manager when you create a print queue with the Use PPD files option selected. Note that this
option is the default.
Chapter 4 • Setting Up Printers (Tasks)
107
Setting Up Printers That are Associated With PPD Files
Note – You do not need to create a print queue that uses PPD files. Also, PPD files are not
required for printers that already contain the RIP feature. You can continue to use Solaris Print
Manager to configure these printers you did previously. To do so, before adding the printer,
remove the checkmark from the Use PPD files check box.
For a detailed description of the printer make, printer model, and printer driver printer
definitions, see “Setting Printer Definitions” on page 48.
Specifying a PPD File When Setting Up a Printer by
Using LP Print Commands
Use the -n option with the lpadmin command to specify a PPD file when creating a new print
queue or modifying an existing print queue.
For example, to add the print queue, foobar, to a Lexmark printer, you would type:
# lpadmin -p foobar -v device -I postscript -m standard_foomatic \
-n /path/Lexmark-Optra_E312-Postscript.ppd.gz
When using the lpadmin -n command to specify a PPD file, you must provide the full path to
the PPD file.
Note – If you use the lpadmin -n command to add a PPD file, and the repository that you specify
in the PPD file path does not exist on the system, a copy of the PPD file is stored in the user label
directory, within the user repository. This directory is located at
/var/lp/ppd/user/manufacturer/ppd-file. The Solaris Print Manager cache is then updated
to reflect the printer information from the recently added PPD file. For more information, see
Chapter 9, “Administering Printers by Using the PPD File Management Utility (Tasks).”
▼
How to Specify a PPD File When Adding a New Printer
by using LP Print Commands
When you use the lpadmin command with the -n option to specify a PPD file, you are required
to provide the full path to the PPD file. If you choose to use a PPD file that is located in a
different directory, you must specify the full path to that file.
1
108
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see
“Configuring RBAC (Task Map)” in System Administration Guide: Security Services.
System Administration Guide: Solaris Printing • January 2009
Setting Up a Print Client
2
To specify a PPD file, use the lpadmin command with the following options:
# lpadmin -p foo -n /home/user/stuff/ppd-file -m \
standard_foomatic -I postscript -v /device
Example 4–11
-p
Specifies the printer name
-n
Specifies to use a PPD file
-m
Specifies the interface script for utilizing PPD files
-v
Specifies the port device that the printer will use
Specifying a PPD File When Setting Up a Printer
For example, to specify the xyz.ppd file that is located in the user's home directory, you would
type the following command:
# lpadmin -p foo -n /home/user/stuff/xyz.ppd -m \
standard_foomatic -I postscript -v /device
Setting Up Printers on a Print Client (Task Map)
Task
Description
For Instructions
Add printer access by using Solaris
Print Manager
Use Solaris Print Manager to add
printer access on the print client.
“How to Add Printer Access by
Using Solaris Print Manager” on
page 110
Add printer access by using LP
print service commands.
Use LP print commands to add
printer access on the print client.
“How to Add Printer Access by
Using LP Print Commands” on
page 110
Set up a .printers file.
Use a $HOME/.printers file so that
users can establish their own
custom printer aliases.
“How to Set Up a .printers File”
on page 112
Setting Up a Print Client
A print client is a system that is not the server for the printer. Yet, this system has access to the
printer. A print client uses the services of the print server to spool, schedule, and filter the print
jobs. Note that one system can be a print server for one printer and be a print client for another
printer.
Chapter 4 • Setting Up Printers (Tasks)
109
Setting Up a Print Client
Access to a printer can be configured on a domain-wide basis or on a per-machine basis. If you
add the printer information to the naming service database, access is configured on a
domain-wide basis.
The following procedure describes how to use the Solaris Print Manager to add access to a
printer on a print client. The example that follows describes how to add printer access by using
the lp print service commands.
▼
1
How to Add Printer Access by Using Solaris Print
Manager
Start Solaris Print Manager on the system where you want to add access to a remote printer.
For instructions, see “How to Start Solaris Print Manager” on page 67.
2
Select Add Access to Printer from the Printer menu.
The Add Access to Printer window is displayed.
3
Type the appropriate data in the entry fields.
If you need information to complete a field, click the Help button.
4
Click OK.
5
Verify that access to the printer is added by checking for the new printer entry in the Solaris
Print Manager main window.
6
Verify that the printer can print requests.
$ lp -d printer-name filename
7
Exit Solaris Print Manager.
Choose Exit from the Print Manager Menu.
▼
1
How to Add Printer Access by Using LP Print
Commands
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see
“Configuring RBAC (Task Map)” in System Administration Guide: Security Services.
110
System Administration Guide: Solaris Printing • January 2009
Setting Up a .printers File
2
Add access to the printer.
# lpadmin -p printer -s print-server -D description
3
Set the printer as the system's default printer destination
# lpamin -d printer
4
Verify that the printer is ready for printing.
# lpstat -p printer
Example 4–12
Adding Printer Access by Using lp Print Service Commands
If you want to print to a remote printer, you must add access to the remote printer. This
example shows how to configure access to a printer named luna, whose print server is saturn.
#
#
#
#
1.
2.
3.
4.
lpadmin -p luna -s saturn
(1)
lpadmin -p luna -D "Room 1954 ps"
lpadmin -d luna
(3)
lpstat -p luna
(4)
(2)
Identifies the printer and the print server
Adds a description for the printer
Sets the printer as the system's default printer destination
Verifies that the printer is ready for printing
Setting Up a .printers File
The .printers file is located in a user's home directory. This file includes information about a
user's default printer and other frequently used printers. Having a .printers file enables users
to establish their own printer aliases. For example, a _default alias can be used to specify a
user's default printer. Also, a special _all alias can be used to define a list of printers that are
affected when a print job is canceled or to check the status of printers.
The use of the .printers file by the LP print service is controlled by the naming service switch
(/etc/nsswitch.conf). The default configuration specifies that the print service checks a user's
home directory to locate printer configuration information before it checks the other naming
services. So, you can tailor a user's printer configuration file to use custom printer information
rather than the shared information in the naming service.
For more information about the .printers file, see theprinters(4) man page. For more
information about the naming service switch, see the nsswitch.conf(4) man page.
Chapter 4 • Setting Up Printers (Tasks)
111
Setting Up a .printers File
▼
How to Set Up a .printers File
This procedure shows users how to set up .printers file in their own home directories.
1
2
Log in to the systemwith your user name and password..
If necessary, change directories to $HOME.
% cd $HOME
3
Start the file editor that you want to use to create a .printers file in the user's home directory.
4
(Optional) Set up the _default alias to make a specific printer the user's default printer. Use an
entry that is similar to this entry.
_default printer-name
5
Set up the _all alias to define the printers affected when you cancel a print request or check the
status of printers. Use an entry similar to this entry.
_all printer1,printer2,printer3
6
112
Save the file as .printers.
System Administration Guide: Solaris Printing • January 2009
5
C H A P T E R
5
Administering Printers by Using Solaris Print
Manager and LP Print Commands (Tasks)
This chapter describes the typical printing tasks that a system administrator might perform on a
daily, weekly, or occasional basis. The printing services and tools that you can use to perform
these tasks are covered in each of the subsequent task sections of this chapter.
For the step-by-step procedures that are associated with administering printing services and
printers, see the following task maps:
■
■
■
■
■
“Administering Printers by Using Solaris Print Manager (Task Map)” on page 116
“Administering Printers and the Print Scheduler by Using LP Print Commands (Task Map)”
on page 117
“Setting Printer Definitions by Using LP Print Commands (Task Map)” on page 126
“Administering Print Requests by Using the LP Print Commands (Task Map)” on page 139
“Administering Printers That Are Associated With PPD Files (Task Map)” on page 150
For overview information, see Chapter 1, “Introduction to Printing in the Solaris Operating
System.”
For information about how to set up printing services see Chapter 3, “Setting Up Printing
Services (Tasks).”
For information about setting up printers, see Chapter 4, “Setting Up Printers (Tasks)”
For information about how to administer printing services and printers by using printing
protocols, see Chapter 6, “Administering Printers That Use Network Printing Protocols
(Tasks)”
113
Introduction to Administering Printers
Introduction to Administering Printers
After you set up print servers and print clients, you might need to perform these administration
tasks frequently:
■
■
■
■
Delete a printer
Delete remote printer access
Check the status of printers
Restart the print scheduler
Administering Local Printers
A local printer is a printer that has a print queue that has been defined on a system that is local
to you. A remote printer is a printer that has a print queue that is defined anywhere but your
local system. These terms do not have anything to do with whether the printer is physically
attached to a system or to the network. The terms strictly define where the print queue was
configured, which is important to note because where the print queue is configured determines
the print server for that printer. One print server can support all the printers at a particular site.
Administering Network Printers
A network-attached printer is a hardware device that is connected directly to the network. A
network printer transfers data directly over the network to the output device. The printer or
network connection hardware has its own system name and IP address.
Network printers often have software support provided by the printer vendor. If your printer
has printer vendor-supplied software, then use the printer vendor software. If the network
printer vendor does not provide software support, Sun supplied software is available. This
software provides generic support for network-attached printers. However, this software is not
capable of providing full access to all possible printer capabilities.
The terms “attached” and “network” refer to the way printers are connected to the world.
Neither of these terms imply local or remote. Sometimes, these terms are used interchangeably,
due to the fact that local printers and attached printers tend to be the same. However, the terms
local and remote refer to print queue configuration. The terms, attached and network, refer to
the physical connection of the printer hardware only, not how the print queue was configured.
For information about setting up a directly attached and network printers, see “Setting Up
Printers on a Print Server (Task Map)” on page 78.
For information about using over-the-wire network printing protocols for printing on the
network, see “Using Printing Protocols in the Solaris Release” on page 28.
114
System Administration Guide: Solaris Printing • January 2009
Introduction to Administering Printers
Scheduling Network Print Requests
Each print client communicates directly with a print sever over the network. The
communication is done between the requesting command, such as lp, lpstat, cancel, lpr,
lpq, or lprm, and the print service on the print server. This communication reduces the print
system overhead on client–only systems, improving scalability, performance and accuracy of
data.
Print servers listen for print requests with the Internet services daemon (inetd). Upon hearing
a request for print service from the network, the inetd daemon starts a program called the
protocol adaptor (in.lpd). The protocol adaptor translates the print request and communicates
it to the print spooler, and returns the results to the requester. This protocol adaptor starts on
demand and exits when it has serviced the network request. This process eliminates idle system
overhead for printing. This process also eliminates any additional system configuration for
network printing support as was the case in previous versions of Solaris printing software.
Setting Definitions for Printers
Setting definitions for the printers on your network is an ongoing task that lets you provide a
more effective print environment for users. For example, you can assign printer descriptions for
all your site's printers to help users find where a printer is located. Or, you can define a class of
printers to provide the fastest turnaround for print requests.
For information on setting up printer definitions and planning printers on your network, see
Chapter 2, “Planning for Printing in the Solaris Operating System (Tasks).”
Administering Printers That Use PPD Files
Specific modifications have been made to incorporate the RIP feature and PPD files into the
Solaris print subsystem. Two interface scripts, standard_foomatic, and
netstandard_foomatic, are available. These interface scripts provide the generic Solaris
interface between the Solaris spooler and the back-end process of the Solaris print server.
For more information, see“Administering Printers That Are Associated With PPD Files (Task
Map)” on page 150 and “Using PPD Files To Set Up Printers” on page 275.
Administering Character Sets, Filters, Forms, and
Fonts
Depending on your site's requirements and the types of printers you have on the network, you
might have to set up and administer printer-specific features of the LP print service. For
example, you can assign different print wheels, filters, and forms to different printers. For
background information and step-by-step instructions on how to set up character sets, print
filters, forms, and fonts, see Chapter 7, “Customizing Printing Services and Printers (Tasks).”
Chapter 5 • Administering Printers by Using Solaris Print Manager and LP Print Commands (Tasks)
115
Administering Printers by Using Solaris Print Manager (Task Map)
Administering Printers by Using Solaris Print Manager (Task
Map)
The following tables lists categories of printer administration tasks you can perform by using
the Solaris Print Manager GUI. Note that you cannot perform all printer administration tasks
by using Solaris Print Manager. For some of these tasks, for example, stopping and starting the
print scheduler, you must use LP print commands. For more information, see “Administering
Print Requests by Using the LP Print Commands (Task Map)” on page 139.
▼
Task
Description
For Instructions
Delete a printer or access to a
printer by using Solaris Print
Manager
Use Solaris Print Manager to delete “How to Delete a Printer by Using
local and remote printers and
Solaris Print Manager” on page 116
remove printer access. However,
you cannot move queued print
requests to another printer by
using Solaris Print Manager.
Set or reset miscellaneous printer
definitions by using Solaris Print
Manager
Add, modify, delete a printer, and
add printer access by using the
Solaris Print Manager GUI tool.
Many of the same options that can
be used with the lpadmin
command are also available in
Solaris Print Manager.
“Setting Printer Definitions by
Using Solaris Print Manager” on
page 81
How to Delete a Printer by Using Solaris Print Manager
Use this procedure to remove a printer from service and to remove the printer information
from the print server.
For information about how to delete a printer and remove printer access by using LP print
commands, see “How to Delete a Printer and Remove Printer Access by Using LP Print
Commands” on page 118.
1
On the print server for the printer that you want to delete, log in as superuser, lp, or assume an
equivalent role.
2
Stop accepting print requests for the printer.
# reject printer-name
3
116
Move any print requests that are still in the print queue to another printer.
For information about how to move print requests to another printer, see “How to Move Print
Requests to Another Printer” on page 148.
System Administration Guide: Solaris Printing • January 2009
Administering Printers and the Print Scheduler by Using LP Print Commands (Task Map)
4
Stop the printer.
For information about how to stop printing, see “How to Enable or Disable a Printer” on
page 142.
5
Start Solaris Print Manager as described in the procedure, “How to Start Solaris Print Manager”
on page 67.
6
To delete the printer, follow these steps:
a. From the list of available printers, select the printer that you want to delete.
b. From the Printer menu, select Delete Printer.
c. Click OK to save your changes.
7
Verify that the printer has been deleted:
# lpstat -p printer-name
Administering Printers and the Print Scheduler by Using LP
Print Commands (Task Map)
Task
Description
Delete a printer and remove printer If a printer needs to be replaced or
access.
moved to a different location, you
can delete information about the
printer from the print-client
For Instructions
“How to Delete a Printer and
Remove Printer Access by Using
LP Print Commands” on page 118
Check the status of printers.
Use the lpstat command to check “How to Check the Status of
the status of all printers or a specific Printers” on page 120
printer. This command allows you
to determine which printers are
available for use and enables you to
examine the characteristics of those
printers.
Stop the print scheduler.
If the print scheduler stops
“How to Stop the Print Scheduler”
accepting print requests, you might on page 122
need to stop and restart the print
scheduler.
Chapter 5 • Administering Printers by Using Solaris Print Manager and LP Print Commands (Tasks)
117
Administering Printers and the Print Scheduler by Using LP Print Commands (Task Map)
▼
Task
Description
For Instructions
Restart the print scheduler.
After you stop the print scheduler,
you will need to restart the print
scheduler, so the printer can begin
accepting requests.
“How to Restart the Print
Scheduler” on page 122
Start the print scheduler with
options.
There are two ways to pass options
to the print scheduler under the
Solaris Management Facility
(SMF). You can set options for the
duration of a call, or you can set
options to remain over a system
boot.
“How to Set Print Option Values
Only for the Duration of a Call” on
page 123
“How to Set Printer Option Values
That Remain Over a System
Reboot” on page 124
How to Delete a Printer and Remove Printer Access by
Using LP Print Commands
Use this procedure when you remove a printer from service, and you want to remove the
printer access from the print clients. Then, remove the printer information from the print
server.
1
Log in as superuser, lp, or assume an equivalent role on a print client that has access to the
printer you want to delete.
2
On the system that is the print client, delete information about the printer.
# lpadmin -x printer-name
3
4
-x
Deletes the specified printer.
printer-name
Specifies the name of the printer you want to delete.
Log in as superuser, lp, or assume an equivalent role on the print server.
On the system that is the printer server, stop accepting print requests for the printer.
# reject printer-name
reject printer-name rejects print requests for the specified printer.
This step prevents any new requests from entering the printer's queue while you are in the
process of removing the printer. For a detailed description, see “How to Accept or Reject Print
Requests for a Printer” on page 144.
5
On the system that is the print server, stop the printer.
# disable printer-name
118
System Administration Guide: Solaris Printing • January 2009
Administering Printers and the Print Scheduler by Using LP Print Commands (Task Map)
This step stops print requests from printing. For a detailed description on how to stop printing,
see “How to Enable or Disable a Printer” on page 142.
6
Move any print requests that are still in the queue to another printer.
For information about how to move print requests to another printer, see “How to Move Print
Requests to Another Printer” on page 148.
7
On the system that is the print server, delete the printer.
# lpadmin -x printer-name
8
Verify that the printer information has been deleted:
a. Confirm that the printer information has been deleted on the print client.
$ lpstat -p printer-name -l
In the command output, you should receive an error indicating that the printer does not
exist.
b. Confirm that the printer information has been deleted on the print server.
$ lpstat -p printer-name -l
In the command output, you should receive an error indicating that the printer does not
exist.
Example 5–1
Deleting a Printer and Remote Printer Access
The following example shows how to delete the printer luna from the print client terra and
from the print server jupiter. This example also shows how to delete the print client terra
from the print server.
terra# lpadmin -x luna
Removed “luna”.
terra# lpstat -p luna -l
jupiter# lpadmin -x luna
Removed “terra”.
jupiter# lpstat -p luna -l
Checking Printer Status
Many routine printer administration tasks require information about the status of the LP print
service or a specific printer. For example, you can determine which printers are available for
use. You can also examine the characteristics of those printers. You can use the lpstat
command to find status information about the LP print service or a specific printer.
Chapter 5 • Administering Printers by Using Solaris Print Manager and LP Print Commands (Tasks)
119
Administering Printers and the Print Scheduler by Using LP Print Commands (Task Map)
If a PPD file was used to create or modify a print queue, the specific PPD file is listed in the
lpstat output. If a PPD file was not specified when the print queue was created, the PPD entry
in the lpstat output is none.
▼
How to Check the Status of Printers
1
Log in to any system on the network.
2
Check the status of printers.
Only the most commonly used options are shown here. For other options, see thelpstat(1)
man page.
$ lpstat [-d] [-p] printer-name [-D] [-l] [-t]
-d
Shows the system's default printer.
-p printer-name
Shows if a printer is active or idle, when the printer was enabled or
disabled, and whether the printer is accepting print requests.
You can specify multiple printer names with this command. Use a space or
a comma to separate printer names. If you use spaces, enclose the list of
printer names in quotation marks. If you don't specify printer-name, the
status of all printers is displayed.
Example 5–2
-D
Shows the description of the specified printer-name.
-l
Shows the characteristics of the specified printer-name.
-t
Shows status information about the LP print service, including the status
of all printers, such as whether they are active and whether they are
accepting print requests.
Checking the Status of Printers
The following example shows how to display the system's default printer.
$ lpstat -d
system default destination: luna
The following example shows how to display the status of the printer luna.
$ lpstat -p luna
printer luna is idle. enabled since Jul 12 11:17 2001. available.
The following example shows how to display the description of the printers asteroid and luna.
120
System Administration Guide: Solaris Printing • January 2009
Administering Printers and the Print Scheduler by Using LP Print Commands (Task Map)
$ lpstat -p "asteroid luna" -D
printer asteroid faulted. enabled since Jan 5 11:35 2004. available.
unable to print: paper misfeed jam
Description: Printer by break room
printer luna is idle. enabled since Jan 5 11:36 2004. available.
Description: Printer by server room.
The following example shows how to display the characteristics of the printer luna.
$ lpstat -p luna -l
printer luna is idle. enabled since Thu Jul 12 15:02:32 PM PDT
Form mounted:
Content types: postscript
Printer types: PS
Description:
Connection: direct
Interface: /usr/lib/lp/model/standard
PPD: none
After fault: continue
Users allowed:
(all)
Forms allowed:
(none)
Banner not required
Character sets:
(none)
Default pitch:
Default page size: 80 wide 66 long
Default port settings:
Stopping and Restarting the Print Scheduler
The print scheduler, lpsched, handles print requests on print servers. However, the print
scheduler might sometimes stop running on a system, so print requests stop being accepted or
printed. The lpadmin command automatically enables the lpsched service when local printers
are added to the system and disables it when the last local printer is removed. The following
procedures describe how to stop and restart the print scheduler. If a print request was printing
when the print scheduler stopped running, the print request will be printed in its entirety when
you restart the print scheduler.
Chapter 5 • Administering Printers by Using Solaris Print Manager and LP Print Commands (Tasks)
121
Administering Printers and the Print Scheduler by Using LP Print Commands (Task Map)
▼
How to Stop the Print Scheduler
1
Log in as superuser, lp, or assume an equivalent role on the print server.
2
Determine if the print scheduler is running.
# svcs application/print/server
You can also use the lpstat -r command to determine if the print scheduler is running.
If the print scheduler is not running, the message scheduler is not running is displayed.
3
If the print scheduler is running, stop it.
# svcadm disable application/print/server
You can also use the lpshut command to stop the print scheduler.
▼
How to Restart the Print Scheduler
1
Log in as superuser, lp, or assume an equivalent role on the print server.
2
Determine if the print scheduler is running.
# svcs application/print/server
You can also use the lpstat -r command to determine if the print scheduler is running.
If the print scheduler is not running, the message scheduler is not running is displayed.
3
If the print scheduler is not running, start it.
# svcadm enable application/print/server
You can also use the /usr/lib/lpsched command to start the print scheduler. For more
information about the difference between starting the print scheduler by using the
/usr/lib/lpsched command or by using the svcadm enable application/print server
command, see “Starting the Print Scheduler With Options” on page 123.
122
System Administration Guide: Solaris Printing • January 2009
Administering Printers and the Print Scheduler by Using LP Print Commands (Task Map)
Starting the Print Scheduler With Options
There are two ways to pass options to the print scheduler by using SMF:
■
By modifying option values only for the duration of a call.
Use the /usr/lib/lpsched command with the appropriate options when you only want to
pass options to the print scheduler for the duration of a call. Before setting options, see the
lpsched(1M) man page for more information about these default values and reasons for
changing them.
■
By maintaining option values over a system reboot, or if the print scheduler is restarted.
The SMF manifest for the print server contains properties that are utilized by the print
server start-up script. These property values are passed on to the print scheduler and
represent the options, which are set by using the svccfg command.
The properties are as follows:
■
■
■
■
lpsched/num_filters
lpsched/num_notifiers
lpsched/fd_limit
lpsched/reserved_fds
Any options that are not set with the svccfg command will use the default values that are in
the print scheduler. For more information about using the svccfg command, see the
svccfg(1M) man page.
▼
1
How to Set Print Option Values Only for the Duration
of a Call
Become superuser, lp, or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see
“Configuring RBAC (Task Map)” in System Administration Guide: Security Services.
2
Set option values.
# /usr/lib/lpsched option value
-f num_filters
Specifies the number of concurrent slow filters that can be run on a print
server.
-n num_notifiers
Specifies the number of concurrent notification processes that can run on
a print server.
-p fd_limit
Specifies the file descriptor resource limit for the lpsched process.
Chapter 5 • Administering Printers by Using Solaris Print Manager and LP Print Commands (Tasks)
123
Administering Printers and the Print Scheduler by Using LP Print Commands (Task Map)
-r reserved_fds
Example 5–3
Specifies the number of file descriptors that the scheduler reserves for
internal communications under heavy load.
Setting Option Values Only for the Duration of a Call
This example shows how to set the number of filters to 2. The remaining options will use the
defaults that are in the print scheduler.
# /usr/lib/lpsched -f 2
To use the default options that are in the print scheduler, run the /usr/lib/lpsched command
without any options.
Note that starting the print scheduler by using the /usr/lib/lpsched command does not
utilize the values that are set with the svccfg command.
▼
How to Set Printer Option Values That Remain Over a
System Reboot
1
Become superuser, lp, or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see
“Configuring RBAC (Task Map)” in System Administration Guide: Security Services.
2
Set one or all options.
# svccfg
svc:> select svc:/application/print/server
svc:/application/print/server> setprop property = value
.
.
.
svc:/application/print/server> quit
For each option that you want to set, repeat the setprop property = value command on a
separate line.
3
Verify that the option has been correctly set by displaying the current values of the print server
properties.
# svcprop svc:/application/print/server
4
Restart the print scheduler.
■
124
If the print scheduler is not running, use the following commands:
System Administration Guide: Solaris Printing • January 2009
Administering Printers and the Print Scheduler by Using LP Print Commands (Task Map)
# svcadm refresh svc:/application/print/server
# svcadm enable svc:/application/print/server
■
If the print scheduler is running, use the following commands:
# svcadm refresh svc:/application/print/server
# svcadm restart svc:/application/print/server
To determine if the print scheduler is running, run the svcs application/print/server
command.
Example 5–4
Setting Printer Option Values That Remain Over a System Reboot
This example shows how to set the number of filters to 1. This option will remain set over a
system reboot, or if you restart the print scheduler.
# svccfg
svc:> select svc:/application/print/server
svc:/application/print/server> setprop lpsched/num_filters = count: 1
svc:/application/print/server> quit
This example shows how to set all options.
# svccfg
svc:> select svc:/application/print/server
svc:/application/print/server> setprop lpsched/num_filters = count: 1
svc:/application/print/server> setprop lpsched/num_notifiers = count: 1
svc:/application/print/server> setprop lpsched/fd_limit = count: 4096
svc:/application/print/server> setprop lpsched/reserved_fds = count: 2
svc:/application/print/server> quit
The following is a sample script that sets all options.
#!/bin/ksh
svccfg <<-EOF
select svc:/application/print/server
setprop lpsched/num_filters = count: 1
setprop lpsched/num_notifiers = count: 1
setprop lpsched/fd_limit = count: 4096
setprop lpsched/reserved_fds = count: 2
EOF
Chapter 5 • Administering Printers by Using Solaris Print Manager and LP Print Commands (Tasks)
125
Setting Printer Definitions by Using LP Print Commands (Task Map)
Setting Printer Definitions by Using LP Print Commands (Task
Map)
126
Task
Description
Add a printer description.
Use the lp command with the-p
“How to Add a Printer Description
option to add a printer description. by Using LP Print Commands” on
page 127
Set a default printer for a system.
Specify a default printer
destination for a user so the user
does not need to type the printer
name.
“How to Set a System's Default
Printer Destination by Using LP
Print Commands” on page 128
Make banner pages optional.
Give users a choice to turn off
printing of a banner page when
they submit a print request.
“How to Make Banner Pages
Optional by Using LP Print
Commands” on page 130
Turn off banner pages.
Set the -o banner=never variable
for a printer you can turn off
banner pages under all
circumstances.
“How to Turn Off Banner Pages by
Using LP Print Commands” on
page 131
Define a class of printers.
Group printers in a class by using
the lpadmin -c command.
Printers can be grouped in the
following classes:
■
Printer type
■
Location
■
Work group
“How to Define a Class of Printers
by Using LP Print Commands” on
page 132
Set fault alters for a printer.
The print service can notify you
when it detects a printer fault. Use
the -A option with the lpadmin
command to set fault alerts for a
printer.
“How to Set Fault Alerts for a
Printer by Using LP Print
Commands” on page 134
Set printer fault recovery.
You can choose not to receive any “How to Set Printer Fault Recovery
fault notification. You can find out by Using LP Print Commands” on
about printing faults so that you
page 136
can correct the problem. Use the -F
option with the lpadmin command
to define fault recovery options.
Limit user access to a printer.
To control user access to printers,
create allow and deny lists on the
print server.
System Administration Guide: Solaris Printing • January 2009
For Instructions
“How to Limit User Access to a
Printer by Using LP Print
Commands” on page 138
Setting Printer Definitions by Using LP Print Commands (Task Map)
Setting Printer Definitions by Using LP Print
Commands
Setting definitions for the printers on your network is an ongoing task that lets you provide a
more effective print environment for users. For example, you can assign printer descriptions for
all your site's printers to help users find where a printer is located. Or, you can define a class of
printers to provide the fastest turnaround for print requests. See “Specifying a PPD File When
Setting Up a Printer by Using LP Print Commands” on page 108 for more information about
setting printer definitions by using LP print commands.
Many printer definitions can be set or reset by using Solaris Print Manager. For more
information, see “Setting Printer Definitions by Using Solaris Print Manager” on page 81.
The following procedures provide step-by-step instructions on setting or resetting printer
definitions by using LP Print Commands. These procedures show how to quickly set or reset
printer definitions.
▼ How to Add a Printer Description by Using LP Print Commands
1
Log in as superuser, lp, or assume an equivalent role on the print server.
2
Add a printer description.
# lpadmin -p printer-name -D "comment"
-p printer-name
Specifies the name of the printer for which you are adding a description.
-D "comment"
Specifies the characteristics of the printer, such as the location or
administrative contact. Enclose characters that the shell might interpret,
such as *, ?, \, !, ^, in single quotation marks.
For more information, see the lpadmin(1M) man page.
3
Verify that the Description information is correct.
# lpstat -p printer-name -l
Example 5–5
Adding a Printer Description
The following example shows how to add a printer description for the printer luna.
# lpadmin -p luna -D "Nathans office"
Chapter 5 • Administering Printers by Using Solaris Print Manager and LP Print Commands (Tasks)
127
Setting Printer Definitions by Using LP Print Commands (Task Map)
Setting Up a Default Printer Destination by Using LP
Print Commands
You can specify a default printer destination for a user so that the user does not need to type the
printer name when using the print commands. Before you can designate a printer as the default,
the printer must be known to the print service on the system.
Set a user's default printer destination by setting any of the following:
■
LPDEST environment variable
■
PRINTER environment variable
■
The _default variable in the user's .PRINTERS file
■
The system's default printer by using the lpadmin -d command or Solaris Print Manager
When an application provides a printer destination, that destination is used by the print service,
regardless of whether you have set a system's default printer destination. If an application
doesn't provide a printer destination or if you don't provide a printer name when using a print
command, the print command searches for the default printer in a specific order. The following
table shows the search order for a system's default printer destination.
TABLE 5–1
Search Order for Default Printer Destinations
Search Order
Using /usr/bin/lp Command
Using LPD-Based Compatibility Commands (lpr,
lpq, and lprm)
First
LPDEST variable
PRINTER variable
Second
PRINTER variable
LPDEST variable
Third
System's default printer
System's default printer
▼
How to Set a System's Default Printer Destination by
Using LP Print Commands
1
Log in as superuser, lp, or assume an equivalent role on the system where you want to set a
default printer.
2
Set the system's default printer.
# lpadmin -d [printer-name]
-d printer-name specifies the name of the printer you are assigning as the system's default
printer. If you don't specify printer-name, the system is set up with no default printer.
128
System Administration Guide: Solaris Printing • January 2009
Setting Printer Definitions by Using LP Print Commands (Task Map)
3
Check the system's default printer.
# lpstat -d
Example 5–6
Setting a System's Default Printer Destination
The following example shows how to set the printer luna as the system's default printer. The
printer luna is used as the system's default printer if the LPDEST or the PRINTER environment
variables are not set.
# lpadmin -d luna
# lpstat -d
system default destination: luna
Printing Banner Pages by Using LP Print Commands
A banner page identifies who submitted the print request, the print request ID, and when the
request was printed. A banner page also has a modifiable title to help users identify their
printouts.
Banner pages make identifying the owner of a print job easy, which is especially helpful when
many users submit jobs to the same printer. However, printing banner pages uses more paper
and might be unnecessary if a printer has only a few users. In some cases, printing banner pages
is undesirable. For example, if a printer has special paper or forms mounted, such as paycheck
forms, printing banner pages might cause problems.
By default, the print service forces banner pages to be printed. However, you can give users a
choice to turn off printing of a banner page when they submit a print request. You can set this
choice through the lpadmin command or through Solaris Print Manager. If you give the users a
choice, they have to use the -o banner option to turn off banner page printing.
Also, if you don't need or want banner pages, you can turn off banner pages so that they are
never printed. You can turn off banner page printing by using the lpadmin command or
through Solaris Print Manager.
Chapter 5 • Administering Printers by Using Solaris Print Manager and LP Print Commands (Tasks)
129
Setting Printer Definitions by Using LP Print Commands (Task Map)
TABLE 5–2
Banner Page Printing
Command Used
Banner Page Printing
Override?
lpadmin -p printer -o banner OR
Required and printed
If you are a regular user and use p
-o nobanner, the request is
printed. However, the nobanner
argument is ignored.
lpadmin -p printer
-o banner=always
If you are superuser (root), or
another privileged user, the
nobanner argument is honored.
lpadmin -p printer -o nobanner
lpadmin -p printer
-o banner=optional
lpadmin -p printer
-o banner=never
▼
1
2
On by default, but can be disabled
on a per request basis with the lp
-o nobanner command
Not applicable.
Disabled
No, if you are a regular user. If you
are superuser (root), or the lp user,
you can override this option to
cause the generation of a burst
page.
How to Make Banner Pages Optional by Using LP Print
Commands
Log in as superuser, lp, or assume an equivalent role on the print server.
Make banner pages optional.
# lpadmin -p printer-name -o banner=optional
3
-p printer-name
Specifies the name of the printer for which you are making banner
pages optional.
-o banner=optional
Enables users to specify no banner page when they submit a print
request.
Verify that the banner page is optional. The command output contains the line Banner not
required.
# lpstat -p printer-name -l
Example 5–7
Making Banner Pages Optional
The following example shows how to make the banner page optional on the printer luna.
# lpadmin -p luna -o banner=optional
130
System Administration Guide: Solaris Printing • January 2009
Setting Printer Definitions by Using LP Print Commands (Task Map)
▼
1
2
How to Turn Off Banner Pages by Using LP Print
Commands
Log in as superuser, lp, or assume an equivalent role on the print server.
Turn off banner printing.
# lpadmin -p printer-name -o banner=never
3
-p printer-name
Specifies the name of the printer for which you are turning off banner
pages.
-o banner=never
Disables banner page printing under all circumstances.
Verify that banner printing is turned off.
# lpstat -p printer-name -l
The command output contains the line Banner not printed.
4
Example 5–8
Submit a print request to the printer to ensure that a banner page does not print.
Turning Off Printing Banner Pages
The following example shows how to disable the printing of banner pages on the printer luna.
# lpadmin -p luna -o banner=never
Setting Up Printer Classes by Using LP Print
Commands
The LP print service enables you to group several locally attached printers into one class. You
can perform this task only by using the lpadmin -c command.
After you set up a printer class, users can then specify that class, rather than individual printers,
as the destination for a print request. The first printer in the class that is available to print is
used. The result is faster turnaround because printers are kept as busy as possible.
No default printer classes are known to the print service. Printer classes exist only if you define
them.
Here are some ways you could define printer classes:
■
■
By printer type – For example, a PostScript printer.
By location – For example, a printer located on the 5th floor.
Chapter 5 • Administering Printers by Using Solaris Print Manager and LP Print Commands (Tasks)
131
Setting Printer Definitions by Using LP Print Commands (Task Map)
■
By work group or department – For example, the accounting department.
Alternatively, a class might contain several printers that are used in a particular order. The LP
print service always checks for an available printer in the order in which printers were added to
a class. Therefore, if you want a high-speed printer to be accessed first, add the high-speed
printer to the class before you add a low-speed printer. As a result, the high-speed printer
handles as many print requests as possible. The low-speed printer is reserved as a backup
printer when the high-speed printer is in use.
Note – Print requests are balanced between printers in a class only for local printers.
Class names, similar to printer names, must be unique and can contain a maximum of 14
alphanumeric characters and underscores.
You are not obligated to define printer classes. You should add printer classes only if you
determine that using them would benefit users on the network.
▼
How to Define a Class of Printers by Using LP Print
Commands
1
Log in as superuser, lp, or assume an equivalent role on the print server.
2
Define a class of printers.
# lpadmin -p printer-name -c printer-class
3
-p printer-name
Specifies the name of the printer you are adding to a class of printers.
-c printer-class
Specifies the name of a class of printers.
Verify that the printers are in a printer class.
# lpstat -c printer-class
Example 5–9
Defining a Class of Printers
The following example shows how to add the printer luna in the printer class roughdrafts.
# lpadmin -p luna -c roughdrafts
132
System Administration Guide: Solaris Printing • January 2009
Setting Printer Definitions by Using LP Print Commands (Task Map)
Setting Up Printer Fault Alerts by Using LP Print
Commands
If you choose, the LP print service can notify you when it detects a printer fault. With the
lpadmin -A command or with Solaris Print Manager, you can select any of the following
methods to receive printer fault notification:
■
■
■
A message to the terminal on which root is logged in
Electronic mail to root
No notification
However, the lpadmin -A command offers you an additional option of receiving a message
specified by the program of your choice. The lpadmin -A command also enables you to
selectively turn off notification for an error that you already know about.
Unless you specify a program to deliver fault notification, the content of the fault alert is a
predefined message that states that the printer has stopped printing and needs to be fixed.
The following table lists the alert values that you can set for a printer with the lpadmin -A
command. These alert values can also be set for print wheels, font cartridges, and forms.
TABLE 5–3
Values for Printer Fault Alerts
Value for -A alert
Description
'mail [username]'
Sends the alert message by email to root or lp on the print server, or
the specified username, which is a name of a user.
'write [user-name]'
Sends the alert message to the root or lp console window on the
print server, or to the console window of the specified username,
which is a name of a user. The specified user must be logged in to the
print server to get the alert message.
'command'
Runs the specified command file for each alert. The environment
variables and current directory are saved and restored when the file is
executed.
quiet
Stops alerts until the fault is fixed. Use this valve when you, root or a
specified user, receive repeated alerts.
none
Does not send any alerts. This value is the default if you don't specify
fault alerts for a printer.
Chapter 5 • Administering Printers by Using Solaris Print Manager and LP Print Commands (Tasks)
133
Setting Printer Definitions by Using LP Print Commands (Task Map)
▼
How to Set Fault Alerts for a Printer by Using LP Print
Commands
1
Log in as superuser, lp, or assume an equivalent role on the print server.
2
Set fault alerts for a printer.
# lpadmin -p printer-name -A alert [-W minutes]
3
-p printer-name
Specifies the name of the printer for which you are specifying an alert for
printer faults.
-A alert
Specifies what kind of alert occurs when the printer faults. Some valid
values are mail, write, and quiet.
-W minutes
Specifies how often, in minutes, the fault alert occurs. If you don't specify
this option, the alert is sent one time.
Verify that the fault alert has been sent properly.
# lpstat -p printer-name -l
Example 5–10
Setting Fault Alerts for a Printer
The following example shows how to set up the printer mars to send fault alerts by email to a
user named joe. A reminder is sent every 5 minutes.
# lpadmin -p mars -A ’mail joe’ -W 5
The following example shows how to set up the printer venus to send fault alerts to the console
window. A reminder i sent every 10 minutes.
# lpadmin -p venus -A write -W 10
The following example shows how to stop fault alerts for the printer mercury.
# lpadmin -p mercury -A none
The following example shows how to stop fault alerts until the printer venus has been fixed.
# lpadmin -p venus -A quiet
134
System Administration Guide: Solaris Printing • January 2009
Setting Printer Definitions by Using LP Print Commands (Task Map)
Setting Up Printer Fault Recovery by Using LP Print
Commands
If you choose not to send any fault notification, you can still find out about printer faults so that
you can correct the problem. The LP print service will not continue to use a printer that has a
fault. In addition to alerts for printer faults, you can also provide alerts that instruct you to
mount print wheels, font cartridges, and forms when print requests require them.
You can define the fault recovery options for a printer only by using the lpadmin -F command.
This task is not available in Solaris Print Manager.
Printer faults can be as simple as running out of paper or needing to replace a toner cartridge.
More serious problems can include complete printer failure or power failure.
After you fix a printer fault, the print request that was active when the fault occurred begins
printing in one of three ways:
■
Starts printing from the beginning
■
Continues printing from the top of the page where printing stopped
■
After you enable the printer, continues printing from the top of the page where the printing
stopped
The LP print service requires a separate print filter to continue printing from the top of a page
where the printing stopped. This print filter records the control sequences set by the default
print filters. The printer uses these control sequences to track page boundaries. You will be
notified by the LP print service if recovery cannot proceed with the specified print filter. For
information about writing filters, see “How to Create a New Print Filter” on page 195.
If you want printing to resume immediately after a printer fault is fixed, enable the printer by
using the enable command.
The following table lists the fault recovery values that you can set for a printer by using the
lpadmin -F command.
TABLE 5–4
Values for Printer Fault Recovery
Value for -F recover-options
Description
beginning
After a fault recovery, printing restarts from the beginning of the file.
continue
After a fault recovery, printing starts at the top of the page where the
printing stopped. This recovery option requires a print filter.
Chapter 5 • Administering Printers by Using Solaris Print Manager and LP Print Commands (Tasks)
135
Setting Printer Definitions by Using LP Print Commands (Task Map)
TABLE 5–4
▼
Values for Printer Fault Recovery
(Continued)
Value for -F recover-options
Description
wait
After a fault recovery, printing stops until you enable the printer.
After you enable the printer by using the enable command, printing
starts at the top of the page where printing stopped. This recovery
option requires a print filter.
How to Set Printer Fault Recovery by Using LP Print
Commands
1
Log in as superuser, lp, or assume an equivalent role on the print server.
2
Set up fault recovery for the printer.
# lpadmin -p printer-name -F recovery-options
-p printer-name
Specifies the name of the printer for which you are specifying fault
recovery.
-F recovery-options
Specifies one of the three valid recovery options: beginning, continue,
or wait.
For more information, see the lpadmin(1M) man page.
3
Verify that printer fault recovery has been set up properly.
# lpstat -p printer-name -l
Example 5–11
Setting Printer Fault Recovery
The following example shows how to set up the printer luna to continue printing at the top of
the page where printing stopped.
# lpadmin -p luna -F continue
Limiting User Access to a Printer by Using LP Print
Commands
You can control which users can access some printers or all of the available printers. For
example, you can prevent some users from printing on a high-quality printer to minimize
expense. To restrict user access to printers, you create allow and deny lists by using the lpadmin
-u command on the print server. Solaris Print Manager enables you to create only allow lists. If
you create neither list, a printer is available to all users who can access the printer.
136
System Administration Guide: Solaris Printing • January 2009
Setting Printer Definitions by Using LP Print Commands (Task Map)
An allow list contains the names of users who are allowed access to the specified printer. A deny
list contains the names of users denied access to the specified printer.
The rules for allow and deny lists are explained in the following table:
Allow and Deny List Rule
User Consequence
Do not create allow and deny lists. Or, if you leave
both lists empty.
All users can access the printer.
Specify all in the allow list.
All users can access the printer.
Specify all in the deny list
All users, except root and lp user on the server, are
denied access to the printer.
Make any entry in the allow list.
The deny list is ignored. Only users who are listed can
access the printer.
Create a deny list, but you do not create an allow list
or you leave the allow list empty.
Users who are listed in the deny list are denied access
to the printer.
Because the print server is responsible for controlling access to the printer, allow and deny lists
can only be created on the print server. If you create allow and deny lists, the print server will
exclusively control user access to printers.
The following table lists the values that you can add to an allow list or a deny list to limit user
access to a printer.
TABLE 5–5
Values for Allow and Deny Lists
Value for user-list
Description
user
User on any system
all
All users on all systems
none
No user on any system
system!user
User on system only
!user
User on local system only
all!user
User on any system
all!all
All users on all systems
system!all
All users on system
!all
All users on local system
Chapter 5 • Administering Printers by Using Solaris Print Manager and LP Print Commands (Tasks)
137
Setting Printer Definitions by Using LP Print Commands (Task Map)
▼
How to Limit User Access to a Printer by Using LP Print
Commands
1
Log in as superuser, lp, or assume an equivalent role on the print server.
2
Allow or deny users access to a printer.
# lpadmin -p printer-name -u allow:user-list [deny:user-list]
-p printer-name
Specifies the name of the printer to which the allow or deny access list
applies.
-u allow:user-list
Specifies the user names to be added to the allow access list. You can
specify multiple user names with this command. Use a space or a
comma to separate names. If you use spaces, enclose the list of names in
quotation marks.
-u deny:user-list
Specifies user names to be added to the deny user access list. You can
specify multiple user names with this command. Use a space or a
comma to separate names. If you use spaces, enclose the list of names in
quotation marks.
The specified users are added to the allow or deny list for the printer in one of the following files
on the print server:
Note – If you specify none as the value for user-list in the allow list, the following files are not
created on the print server:
3
Verify that information is correct under the Users allowed or the Users denied heading in the
following command output:
# lpstat -p printer-name -l
Example 5–12
Limiting User Access to a Printer
The following example shows how to allow only the users nathan and george access to the
printer luna.
# lpadmin -p luna -u allow:nathan,george
The following example shows how to deny the users nathan and george access to the printer
asteroid.
# lpadmin -p asteroid -u deny:"nathan george"
138
System Administration Guide: Solaris Printing • January 2009
Administering Print Requests by Using the LP Print Commands (Task Map)
Administering Print Requests by Using the LP Print
Commands (Task Map)
Task
Description
Check the status of print requests.
Use the lpstat command to check “How to Check the Status of Print
the status of print requests.
Requests” on page 140
Enable or disable a printer.
Use the enable and disable
commands to control whether a
printer prints requests or stops
printing requests that are in the
print queue.
Accept or reject print requests for a Use the accept and reject
printer.
commands to turn on or turn off a
print queue that stores requests to
be printed.
For Instructions
“How to Enable or Disable a
Printer” on page 142
“How to Accept or Reject Print
Requests for a Printer” on page 144
Cancel a print request.
Use the can use the cancel
“How to Cancel a Print Request”
command to cancel print requests on page 146
in one of the following three ways:
■
Cancel requests by request
identification number (request
ID)
■
Cancel requests from a specific
user on all printers or specific
printers
■
Cancel the job currently
printing
Cancel a print request from a
specific user.
Cancel the request for a user by
“How to Cancel a Print Request
using the cancel -u command and From a Specific User” on page 147
specifying that user.
Move print requests to another
printer.
Move or cancel any requests that
are currently queued to a printer.
You can use the lpmove command
to move individual or all print
requests to another local printer.
“How to Move Print Requests to
Another Printer” on page 148
Chapter 5 • Administering Printers by Using Solaris Print Manager and LP Print Commands (Tasks)
139
Administering Print Requests by Using the LP Print Commands (Task Map)
Task
Description
For Instructions
Change the priority of a print
request.
Change the priority of a print
request in one of the following
ways:
■
Put a print request on hold if it
has not finished printing.
■
Move a print request to the
head of the queue.
■
Change the priority of a job
still waiting to be printed.
“How to Change the Priority of a
Print Request” on page 149
When a user submits a print request from a print client, the print request is added to a queue on
the print server before it is sent to the printer. While a print request is in the queue, you can
cancel or gain status information on the request from a client system. You must log in to the
print server to move, hold, resume, or change the priorities of print requests with LP print
service commands. These actions can help you keep printing services operating smoothly.
The following table lists the values for changing the priority of a print request by using the lp -H
command.
TABLE 5–6
▼
Values for Changing the Priority of a Print Request
Value for -H change-priority
Description
hold
Places the print request on hold until you cancel the request or
instruct the LP print service to resume printing the request.
resume
Places a print request that has been on hold back in the queue.
The request is printed according to its priority and placement in
the queue. If you place on hold a print job that is already
printing, resume places the print request at the head of the queue
so that it becomes the next request printed.
immediate
Places a print request at the head of the queue. If a request is
already printing, you can put the request on hold to allow the
next request to print immediately.
How to Check the Status of Print Requests
1
Log in on any system on the network.
2
Check the status of printers and print requests.
Only the most commonly used options are shown here. For other valid options, see the
lpstat(1) man page.
$ lpstat -o [list] | -u [user-list]
140
System Administration Guide: Solaris Printing • January 2009
Administering Print Requests by Using the LP Print Commands (Task Map)
-o list
Shows the status of print requests on a specific printer. list can be one or more
printer names, printer class names, or print request IDs.
To specify multiple printer names, class names, and IDs for list, use a space or a
comma to separate values. If you use spaces, enclose the list of values in
quotation marks.
If you don't specify list, the status of print requests sent to all printers is
displayed.
-u user-list
Shows the status of print requests for a specific user. user-list can be one or more
user names.
To specify multiple users with this command, use a space or a comma to
separate user names. If you use spaces, enclose the list of names in quotation
marks.
If you don't specify user-list, the status of print requests for all users is displayed.
When used to check the status of print requests, the lpstat command displays one line for each
print request.
From left to right, the line shows the following information:
■
■
■
■
■
Example 5–13
Request ID
User
Output size in bytes
Date and time of the request,
Information about the request, such as “being filtered.”
Checking the Status of Print Requests
The following example shows that user fred has one print request queued on the printer luna.
$ lpstat
luna-1
fred
1261
Jul 12 17:34
The following example shows that the user paul currently has no print requests in queue.
$ lpstat -u paul
The following example shows that two print requests are queued on the printer moon.
$ lpstat -o moon
moon-78
root
moon-79
root
1024
1024
Jul 14 09:07
Jul 14 09:08
Chapter 5 • Administering Printers by Using Solaris Print Manager and LP Print Commands (Tasks)
141
Administering Print Requests by Using the LP Print Commands (Task Map)
Enabling or Disabling a Printer From Printing
The enable and disable commands control whether a printer prints or stops printing requests
that are in the print queue. When you disable a printer, the printer stops printing requests in the
queue. However, requests are still added to the queue. You must set the printer to reject print
requests so that requests are not added to the queue. For information about rejecting print
requests, see “Accepting or Rejecting Print Requests” on page 143.
A printer is enabled to print and accepts print requests when the printer is added by using
Solaris Print Manager. Solaris Print Manager doesn't provide any additional printer processing
management.
You must enable the printer whenever it has been disabled, which can happen when a printer
fault occurs. When you enable a printer, it prints requests from the print queue until the queue
is empty, even if the print service rejects additional requests for the print queue.
The following figure shows the point at which the processing of print requests is interrupted
when a printer is disabled.
Enable
Print client
Print server
Print client
Print server
Reject
FIGURE 5–1
▼
What Happens When a Printer Is Enabled or Disabled
How to Enable or Disable a Printer
1
Log in as superuser, lp, or assume an equivalent role on the print server.
2
Stop printing print requests.
# disable [-c | -W] [-r "reason"] printer-name
142
disable
Cancels the current job, then disables the printer. The current job is saved to
reprint when the printer is enabled.
-c
Cancels the current job, then disables the printer. The current job is not
printed later.
System Administration Guide: Solaris Printing • January 2009
Administering Print Requests by Using the LP Print Commands (Task Map)
-W
Waits until the current job is finished before disabling the printer.
-r "reason"
Provides users with a reason why the printer is disabled. The reason is stored
and displayed whenever a user checks on the status of the printer by using the
lpstat -p command.
printer-name
Specifies the name of the printer that will stop printing print requests.
Note – You cannot enable or disable classes of printers. Only individual printers can be enabled
or disabled.
3
Start printing print requests.
# enable printer-name
4
Verify that the printer is enabled.
# lpstat -p printer-name
Example 5–14
Enabling or Disabling a Printer
The following example shows how to stop the current job on the printer luna, save the job to
print later, and provide a reason why the printer has stopped printing print requests.
# disable -r "changing the form" luna
The following example shows how to start printing print requests on the printer luna.
# enable luna
printer "luna" enabled
Accepting or Rejecting Print Requests
The accept and reject commands enable you to turn on or turn off a print queue that stores
requests to be printed.
When you use the reject command, the print queue for a specified printer is turned off. No
new print requests can enter the queue on the print server. However, all print requests that are
in the queue are still printed. You must disable the printer if you want it to stop printing
requests that are already in the queue. The following table compares the functions of the
accept, reject, enable, and disable commands.
Chapter 5 • Administering Printers by Using Solaris Print Manager and LP Print Commands (Tasks)
143
Administering Print Requests by Using the LP Print Commands (Task Map)
TABLE 5–7
Functions of accept, reject, enable, and disable Print Commands
Command
Function
accept
Accepts print requests that are sent to the print queue.
disable
Stops printing requests that are currently in the print queue.
enable
Prints the requests that are in the print queue.
reject
Rejects print requests that are sent to the print queue.
If a print request is rejected, the LP print service writes or mails a message to the user who
submitted the request. the message states that print requests are not being accepted for the
specified printer.
You can also specify a reason for not accepting requests through the command line. The reason
is displayed on a user's system when a user tries to check the printer's queue. The following
figure shows the point at which the processing of print requests is interrupted when a print
queue rejects print requests.
Accept
Print client
Print server
Reject
Print client
FIGURE 5–2
▼
Print server
What Happens When a Print Queue Accepts or Rejects Requests
How to Accept or Reject Print Requests for a Printer
1
Log in as superuser, lp, or assume an equivalent role on the print server.
2
Stop accepting print requests for the printer.
# reject [-r "reason"] printer-name
144
-r "reason"
Provides users with a reason why the printer is rejecting print requests. The
reason is stored and displayed whenever a user checks on the status of the
printer by using the lpstat -p command.
printer-name
Specifies the name of the printer that will stop accepting print requests.
System Administration Guide: Solaris Printing • January 2009
Administering Print Requests by Using the LP Print Commands (Task Map)
The queued requests continue printing as long as the printer is enabled. For instructions on
disabling a printer so that it stops printing, see “How to Enable or Disable a Printer” on
page 142.
3
Start accepting print requests for the printer.
# accept printer-name
4
Check that the status of the printer to see whether it is accepting or rejecting print requests.
$ lpstat -p printer-name
Example 5–15
Accepting or Rejecting Print Requests for a Printer
The following example shows how to stop the printer luna from accepting print requests.
# reject -r "luna is down for repairs" luna
destination "luna" will no longer accept requests
The following example shows how to set the printer luna to accept print requests.
# accept luna
destination "luna" now accepting requests
Canceling a Print Request
You can use the cancel command to cancel print requests in printer queues or to cancel jobs
that are printing.
Three are three ways to use the cancel command:
■
■
■
Cancel requests by request identification number (request ID)
Cancel requests from a specific user on all printers or specific printers
Cancel the job currently printing
When you use the cancel command, a message tells you the request or requests are canceled,
and the next request in queue is being printed.
You can cancel a print request only under the following conditions:
■
You are the user who submitted the request and you are logged in on the system from which
you submitted the request.
■
You are the user who submitted the request on any client system and the print server has the
“user-equivalence” option configured for the printer in its /etc/printers.conf file.
■
You are logged in as superuser, lp, or have assumed an equivalent role on the print server.
Chapter 5 • Administering Printers by Using Solaris Print Manager and LP Print Commands (Tasks)
145
Administering Print Requests by Using the LP Print Commands (Task Map)
To cancel a specific request, you need to know its request ID. The request ID contains the name
of the printer, a dash, and the number of the print request. For example, luna-185.
When you submit the print request, the request ID is displayed. If you do not remember the
print request ID, you can find it by using the lpstat command with the -o printer option.
▼
How to Cancel a Print Request
1
If you are going to cancel the print requests of other users, then become superuser, lp, or
assume an equivalent role.
2
Determine the request IDs of the print requests to cancel.
# lpstat
For more details, see “How to Check the Status of Print Requests” on page 140.
3
Cancel the print request.
# cancel request-id | printer-name
request-id
Specifies the request ID of a print request to be canceled. You can specify
multiple request IDs with this command. Use a space or a comma to separate
request IDs. If you use spaces, enclose the list of request IDs in quotation
marks.
printer-name
Specifies the printer for which you want to cancel the currently printing print
request.
You can specify multiple printer names with this command. Use a space or a
comma to separate printer names. If you use spaces, enclose the list of printer
names in quotation marks.
4
Verify that the print requests are canceled.
$ lpstat -o printer-name
Example 5–16
Canceling a Print Request
The following example shows how to cancel the luna-3 and luna-4 print requests.
$ cancel luna-3 luna-4
request "luna-3" cancelled
request "luna-4" cancelled
The following example shows how to cancel the print request that is currently printing on the
printer luna.
146
System Administration Guide: Solaris Printing • January 2009
Administering Print Requests by Using the LP Print Commands (Task Map)
# cancel luna
request "luna-9" cancelled
▼
How to Cancel a Print Request From a Specific User
1
(Optional) Become superuser, lp, or assume an equivalent role if you are going to cancel the
print requests of other users.
2
Cancel a print request from a specific user.
$ cancel -u user-list [printer-name]
-u user-list
Cancels the print request for a specified user.
user-list can be one or more user names. Use a space or a comma to separate user
names. If you use spaces, enclose the list of names in quotation marks
printer-name Specifies the printer for which you want to cancel the print requests for a
specified user.
printer-name can be one or more printer names. Use a space or a comma to
separate printer names. If you use spaces, enclose the list of printer names in
quotation marks.
If you don't specify the printer-name, the print requests for the specified user is
canceled on all printers.
Example 5–17
Canceling a Print Request From a Specific User
The following example shows how to cancel all the print requests submitted by the user george
on the printer luna.
# cancel -u george luna
request "luna-23" cancelled
The following example shows how to cancel all the print requests submitted by the user george
on all printers.
# cancel -u george
request "asteroid-3" cancelled
request "luna-8" cancelled
Chapter 5 • Administering Printers by Using Solaris Print Manager and LP Print Commands (Tasks)
147
Administering Print Requests by Using the LP Print Commands (Task Map)
Moving a Print Request
If you plan to change the way a printer is used or decide to take a printer out of service, you
should set up the LP print service to reject additional print requests. Then, move or cancel any
requests that are currently queued to the printer. You can use the lpmove command to move
individual or all print requests to another local printer.
Request IDs are not changed when you move print requests, so users can still find their requests.
Print requests that have requirements, such as a specific file content type or form, that cannot be
met by the newly specified printer cannot be moved. These print requests must be canceled.
▼
How to Move Print Requests to Another Printer
To move all print requests from one printer to another printer, you do not need to know the
request IDs. However, first determine how many print requests are affected before you move
them.
1
Log in as superuser, lp, or assume an equivalent role on the print server.
2
(Optional) Determine if the request IDs of the print requests on the original printer.
# lpstat -o printer-name1
3
(Optional) Check to see if the destination printer is accepting print requests.
# lpstat -a printer-name2
-a printer-name2 reports whether print destinations are accepting requests.
4
Move all the print requests from the original printer to the destination printer.
# lpmove printer-name1 printer-name2
printer-name1
Specifies the name of the printer from which all print requests will be moved.
printer-name2
Specifies the name of the printer to which all print requests will be moved.
For more information, see the lpmove(1M) man page.
If some requests cannot be printed on the destination printer, the requests are left in the original
printer's queue. By using request IDs, you can also move specific print requests to another
printer by using the lpmove command.
148
System Administration Guide: Solaris Printing • January 2009
Administering Print Requests by Using the LP Print Commands (Task Map)
5
(Optional) Start accepting print requests on the original printer.
If you move all the print requests to another printer, the lpmove command automatically stops
accepting print requests for the printer. This step is necessary if you want to begin accepting
new print requests for the printer.
# accept printer-name1
6
Check for any remaining print requests in the original printer's queue.
# lpstat -o printer-name1
Ensure that all specified print requests were moved to the destination printer's queue.
# lpstat -o printer-name2
Example 5–18
Moving Print Requests to Another Printer
The following example shows how to move print requests from the printer luna to the printer
terra. Then, the original printer, luna, is instructed to resume accepting print requests.
# lpmove luna terra
# accept luna
Changing the Priority of Print Requests
After a user has submitted a print request, you can change its priority in the print server's queue
by doing any of the following:
▼
1
■
Putting any print request on hold if it has not finished printing. Putting a request on hold
stops the request, if it is currently printing, and keeps it from printing until you resume
printing it. Other print requests go ahead of the on-hold request.
■
Moving any print request to the head of the queue, where it will become the next job eligible
for printing. If you want a job to start printing immediately, you can interrupt the job that is
currently printing by putting it on hold.
■
Changing the priority of a job still waiting to be printed or moving the job in the queue.
Doing so will move the job ahead of lower priority requests and behind other requests that
are the same priority or higher priority.
How to Change the Priority of a Print Request
Log in as superuser, lp, or assume an equivalent role on the print server that is holding the print
request.
Chapter 5 • Administering Printers by Using Solaris Print Manager and LP Print Commands (Tasks)
149
Administering Printers That Are Associated With PPD Files (Task Map)
2
Determine the request IDs of the print requests whose priority you want to change.
# lpstat
For more information, see “How to Check the Status of Print Requests” on page 140.
3
Change the priority of a print request.
# lp -i request-id -H change-priority
-i request-id
Specifies the request ID of a print request you want to change.
You can specify multiple request IDs with this command. Use a space or
a comma to separate request IDs. If you use spaces, enclose the list of
request IDs in quotation marks.
-H change-priority
Specifies one of the three ways to change the priority of a print request:
hold, resume, immediate.
For detailed information about valid values for change-priority, see
Table 5–6.
You can also use the lp -q command to change the priority level of a specified print request.
You can change the priority level from 0, the highest priority, to 39, the lowest priority.
Example 5–19
Changing the Priority of a Print Request
The following example shows how to change a print request with the request ID asteroid-79,
to priority level 1.
# lp -i asteroid-79 -q 1
Administering Printers That Are Associated With PPD Files
(Task Map)
Task
Description
Set definitions for print queues that Modify the default values that are
use PPD files.
defined in PPD files that are
associated with print queues by
using the lpadmin command with
the -o option.
150
System Administration Guide: Solaris Printing • January 2009
For Instructions
“How to Set Default Values for
Print Queues That Are Associated
With PPD Files” on page 151
Administering Printers That Are Associated With PPD Files (Task Map)
Task
Description
For Instructions
Determine if a PPD file was used to Use the lpstat command to
“Determining Whether a PPD File
create a print queue.
determine if a PPD file was used to Is Associated With a Print Queue”
create a print queue, or if a PPD file on page 154
is associated with a print queue.
During the process of setting up a print queue, a PPD file that describes the print queue's
capabilities can be associated with that print queue. Often, the default values that are described
in the PPD file do not match the preferred settings for your site. For example, you might want
the duplex feature always turned on, or you might want to always print to A4 sized paper. To
modify these default values, you can edit the PPD file directly. However, the easiest and fastest
method is to make the changes by using the lpadmin command with the -o option.
Some common PPD file values include:
■
PageSize
Examples of available choices include:
■
■
■
■
■
■
Letter
Legal
A4
B5
Env10
InputSlot
Examples of available choices include:
■
■
■
■
■
Tray1
Tray2
Tray3
Manual
Duplex
Examples of available choices include:
■
■
■
▼
None
DuplexNoTumble
DuplexTumble
How to Set Default Values for Print Queues That Are
Associated With PPD Files
This procedure shows how to set default values for a print queue that uses PPD files to describe
its capabilities.
Chapter 5 • Administering Printers by Using Solaris Print Manager and LP Print Commands (Tasks)
151
Administering Printers That Are Associated With PPD Files (Task Map)
Before You Begin
Check the PPD file first to determine which values can be overridden. To view the PPD file, use
the more or less command, or open the file in a text editor.
For example:
% more /etc/lp/ppd/print-queue.ppd
1
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see
“Configuring RBAC (Task Map)” in System Administration Guide: Security Services.
2
Set the desired option.
# lpadmin -p print-queue -o key=value
-p
Specifies the printer name or print queue where the value is to be changed.
-o
Specifies the options for adjusting printer capabilities, adjusting printer port
characteristics, configuring network printers, and controlling the use of banner.
key=value
Specifies the key/value pair for the option.
The set of key/value pairs that can be used for a particular printer depends on the
content of the PPD file that is associated with the print queue.
For example, to set the duplex feature, type:
# lpadmin -p print-queue -o Duplex=DuplexNoTumble
To change the input tray setting, type:
# lpadmin -p print-queue -o InputSlot=Tray2
You can set the default value this way for any PPD file/foomatic option.
3
Verify that the option was set to the correct value by checking the print queue's capabilities.
# lpstat -p print-queue -l
Example 5–20
Setting Values for Print Queues That Use PPD Files
# lpadmin -p hp4550 -o Media=A4 -o InputSlot=Tray2
# lpadmin -p hp4550 -o PageSize=A4
# lpstat -p hp4550 -l
printer hp4550 idle. enabled since December 5, 2006 6:38:50 PM CET. available.
Form mounted:
Content types: application/postscript
Description:
Connection:
152
System Administration Guide: Solaris Printing • January 2009
Administering Printers That Are Associated With PPD Files (Task Map)
Interface: /usr/lib/lp/model/netstandard_foomatic
PPD: /usr/lib/lp/model/ppd/system/foomatic/ \
HP/HP-Color_LaserJet_4550-Postscript.ppd.gz
On fault: write root
After fault: continue
Users allowed:
(all)
Forms allowed:
(none)
Media supported:
Letter
A4
11x17
A3
A5
B5
Env10
EnvC5
EnvDL
EnvISOB5
EnvMonarch
Executive
Legal
Banner not required
Character sets:
(none)
Default pitch:
Default page size:
Default port setting:
Options: PageSize=A4, Media=A4, InputSlot=Tray2, \
dest=192.168.245.62:9100, protocol=tcp
uname -a
SunOS shuttle 5.11 snv_52 i86pc i386 i86pc
# lpstat -p hp4550 -l
printer hp4550 idle. enabled since December 5, 2006 6:38:50 PM CET. available.
Form mounted:
Content types: application/postscript
Description:
Connection:
Interface: /usr/lib/lp/model/netstandard_foomatic
PPD: /usr/lib/lp/model/ppd/system/foomatic/ \
HP/HP-Color_LaserJet_4550-Postscript.ppd.gz
On fault: write root
After fault: continue
Users allowed:
(all)
Forms allowed:
Chapter 5 • Administering Printers by Using Solaris Print Manager and LP Print Commands (Tasks)
153
Administering Printers That Are Associated With PPD Files (Task Map)
(none)
Media supported:
Letter
A4
11x17
A3
A5
B5
Env10
EnvC5
EnvDL
EnvISOB5
EnvMonarch
Executive
Legal
Banner not required
Character sets:
(none)
Default pitch:
Default page size:
Default port setting:
Options: dest=192.168.245.62:9100, protocol=tcp
Determining Whether a PPD File Is Associated With a
Print Queue
If a PPD file was used during the creation of a print queue, the PPD file that the specified queue
is configured to use is listed in the lpstat command output. If you do not specify a PPD file
when creating a new print queue, the lpstat command continues to display the same output as
it did previously. For an example of the lpstat command output that shows the use of PPD
files, see “How to Check the Status of Printers” on page 120.
You can use Solaris Print Manager to modify queues that were created without the use of PPD
files. In such cases, Solaris Print Manager uses the previous printer definitions, which do not
include the printer make, printer model, and printer driver definitions.
For tasks that are associated with expanded printer support, see“Setting Up Printers That are
Associated With PPD Files” on page 107.
EXAMPLE 5–21
lpstat Command Output When Using PPD Files
In this example, the lpstat command output indicates that the print queue was configured by
using the PPD file, Mitsubishi-CP50_Color_Printer-cp50.ppd.gz.
154
System Administration Guide: Solaris Printing • January 2009
Administering Printers That Are Associated With PPD Files (Task Map)
EXAMPLE 5–21
lpstat Command Output When Using PPD Files
(Continued)
# lpstat -l -p paper
printer paper is idle. enabled since Tue 30 Mar 2004 01:48:38 PM PST
available.
Form mounted:
Content types: any
Printer types: unknown
Description:
Connection: direct
Interface: /usr/lib/lp/model/standard_foomatic
PPD:
/path/Mitsubishi-CP50_Color_Printer-cp50.ppd.gz
After fault: continue
Users allowed:
(all)
Forms allowed:
(none)
Banner required
Character sets:
(none)
Default pitch:
Default page size:
Default port settings# lpstat l p <queue>
Chapter 5 • Administering Printers by Using Solaris Print Manager and LP Print Commands (Tasks)
155
156
6
C H A P T E R
6
Administering Printers That Use Network
Printing Protocols (Tasks)
This chapter explains how to administer printers and perform basic printing tasks when using
the IPP, RFC-1179, and SMB protocols. For information about setting up printing services,
including IPP server and client configuration, see Chapter 3, “Setting Up Printing Services
(Tasks).”
The following is a list of information that is in this chapter:
■
■
■
“Administering Printers by Using the Internet Printing Protocol (Task Map)” on page 158
“Administering Printers by Using the RFC-1179 Printing Protocol (Task Map)” on page 164
“Administering Printers by Using the SMB Protocol” on page 165
For IPP background information, see Appendix A, “Using the Internet Printing Protocol.”
For overview information about printing services and printers, see Chapter 1, “Introduction to
Printing in the Solaris Operating System.”
For information about how to set up printing services see Chapter 3, “Setting Up Printing
Services (Tasks).”
For information about setting up printers, see Chapter 4, “Setting Up Printers (Tasks)”
For information about administering printers and printing services by using Solaris Print
Manager or LP print commands, see Chapter 5, “Administering Printers by Using Solaris Print
Manager and LP Print Commands (Tasks).”
157
Administering Printers by Using the Internet Printing Protocol (Task Map)
Administering Printers by Using the Internet Printing
Protocol (Task Map)
TABLE 6–1
Administering Printers by Using IPP: Task Map
Task
Description
For Instructions
Check printer status and
obtain information about a
printer when using IPP.
The lpset command is used to check
printer status when IPP is in use.
“How to Obtain Information About
Printers When Using IPP” on
page 158
Move a remote print request
when using IPP.
The lpmove command is used to move
print jobs to a new destination when
IPP is in use.
“How to Move Remote Print
Requests Between Print Queues on a
Print Server When Using IPP” on
page 160
Modify a remote print request The lp command is used to modify
when using IPP.
remote print requests when IPP is in
use.
“How to Move Remote Print
Requests Between Print Queues on a
Print Server When Using IPP” on
page 160
Share printers when using
IPP.
To share printers when IPP is in use,
you need to modify the default file
configuration.
“Sharing Printers When Using IPP”
on page 161
Turn on IPP authentication
mechanisms.
In the Solaris Express release, client
authentication is required to access
some uri-path and operation
combinations.
“Turning On IPP Authentication
Mechanisms” on page 162
Set authorizations that enable The proper authentication information “How to Set Authorizations That
you to accept print queues
is required to enable an operation to be Enable You to Accept Print Queues
when using IPP.
processed for the uri path.
When Using IPP?” on page 163
Add a user to the IPP
AuthUser file.
▼
1
Adding a user to the IPP AuthUser file
requires modification of the
httpd-standalone-ipp.conf file by
using the htpasswd command:
“ How to Add a User to the IPP
AuthUser File” on page 163
How to Obtain Information About Printers When
Using IPP
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see
“Configuring RBAC (Task Map)” in System Administration Guide: Security Services.
158
System Administration Guide: Solaris Printing • January 2009
Administering Printers by Using the Internet Printing Protocol (Task Map)
2
To obtain information about a printer when IPP is in use, you would type:
# lpset -a printer-uri-supported=ipp://server/printers/server queue
3
To see the return output for the printer, you would type:
# lpstat -p test -l
Example 6–1
Obtaining Information About Printers When IPP Is in Use
# lpset -a printer-uri-supported=ipp://server/printers/test test
# lpstat -p test -l
printer test disabled since Fri Nov 03 11:48:53 2006. available.
new printer
Form mounted:
Content types: application/postscript
Description:
Connection:
Interface: /usr/lib/lp/model/uri
PPD: /usr/lib/lp/model/ppd/system/foomatic \
/HP/HP-Color_LaserJet_4600-Postscript.ppd.gz
On fault: write root
After fault: continue
Users allowed:
(all)
Forms allowed:
(none)
Media supported:
Letter
A4
11x17
A3
A5
B5
Env10
EnvC5
EnvDL
EnvISOB5
EnvMonarch
Executive
Legal
Banner required
Character sets:
(none)
Default pitch:
Default page size:
Default port setting:
Options:
Chapter 6 • Administering Printers That Use Network Printing Protocols (Tasks)
159
Administering Printers by Using the Internet Printing Protocol (Task Map)
▼
How to Move Remote Print Requests Between Print
Queues on a Print Server When Using IPP
You can remotely move print jobs between print queues when IPP is in use by using the lpmove
command. Print jobs can be moved to the new destination by request ID or by the destination.
●
To move a remote print request from one print queue to another print queue when using IPP,
type the following command:
$ lpmove request-id old-destination new-destination
Example 6–2
Moving Remote Print Requests by Request ID
This example shows how to move a remote print request luna-185 to the new destination
printer lucille by using the request ID.
$ lpmove luna-185 lucille
Example 6–3
Moving Remote Print Requests by Destination
This example shows how to move all of the print requests from the printer luna to the new
destination printer lucille.
$ lpmove luna luciille
▼
How to Modify Remote Print Requests When Using IPP
You can use the lp command to perform a variety of tasks when IPP is in use. For more
information about using the lp command, see the lp(1) man page.
●
Use the lp command with the appropriate command options to modify remote print jobs.
$ lp [-d] [-H] [-i] [-n] [-o]
160
-d
Specifies the destination for the print request.
-H
Specifies special-handling. Prints the request according to the value of the
special-handling.
-i
Specifies the request ID.
-n
Specifies number of copies. Specify this option as a digit. The default for number is 1.
-o
Specifies printer dependent options.
System Administration Guide: Solaris Printing • January 2009
Administering Printers by Using the Internet Printing Protocol (Task Map)
Example 6–4
Submitting Previously Held Print Requests
This example shows how to submit previously held print requests for the printer lucille.
$ lp -d lucille -H hold /etc/motd
Example 6–5
Changing the Number of Copies Requested
This example shows how to change the number of copies requested for the request ID
lucille-233.
$ lp -i lucille-233 -n 5
Example 6–6
Turning on and Releasing the Duplex Feature
This example shows how to turn on and release the duplex feature for a specified request ID.
$ lp -i lucille-233 -o Duplex=DuplexNoTumble -H resume
Sharing Printers When Using IPP
When you install the Solaris OS, the IPP listening service is automatically enabled on a print
server when you add the first print queue. the listening service is also disabled when the last
print queue has been removed. The default configuration in some releases of Solaris 9 and
Solaris 10 is fairly permissive. If you have security concerns, you might want to modify the
default configuration to make it more restrictive. The set of unauthenticated IPP operations
that is supported by the service should be limited to operations that are the least destructive.
Operations include:
■
■
■
■
■
■
■
■
■
■
■
■
print-job
validate-job
create-job
get-jobs
get-printer-attributes
send-document
cancel-job
get-job-attributes
cups-get-default
cups-get-printers
cups-get-classes
cups-move-job
Chapter 6 • Administering Printers That Use Network Printing Protocols (Tasks)
161
Administering Printers by Using the Internet Printing Protocol (Task Map)
IPP Authentication Mechanisms
IPP is layered on top of HTTP. As a result, the protocol uses the authentication mechanisms that
are built into HTTP and the Apache software. The default configuration that is shipped in the
Solaris OS doesn't make use of these authentication mechanisms in some releases of Solaris 9,
Solaris 10, as well as the Solaris Express release. In the Solaris Express release, client
authentication is required to access some uri-path and operation combinations.
For example, the more common form of printer-uri that is used by client systems is:
ipp://server/printers/queue
When printing on a system that is running a version Windows, specify the URI by using the
following syntax:
http://server:631/printers/queue
More information about printing in a heterogeneous environment can be found at
http://opensolaris.org/os/community/printing/.
Turning On IPP Authentication Mechanisms
To authenticate, use the accept command as follows:
$ accept ipp://server/admin/queue
For example, to authenticate the print queue masterly on the server noreaster type:
$ accept ipp://noreaster/admin/masterly
You are prompted for authentication.
Enter the proper authentication information to enable the operation to be processed for the uri
path.
For example:
system% accept ipp://printing/printers/wspe
accept: ipp://printing/printers/wspe: operation-not-supported
system% accept ipp://printing/admin/wspe
passphrase for user-name to access ipp://printing/admin/wspe:
accept: ipp://printing/admin/wspe: not-authorized
system%
162
System Administration Guide: Solaris Printing • January 2009
Administering Printers by Using the Internet Printing Protocol (Task Map)
Note – The following command will fail under the default configuration for IPP, because the
operation is not enabled for that uri path
$ accept ipp://server/printers/queue
How to Set Authorizations That Enable You to Accept
Print Queues When Using IPP?
To set authorizations for accepting print queues when IPP is in use, edit the
/etc/apache/httpd-standalone-ipp.conf file.
Add the following entries to set up authentication:
■
■
■
AuthType
AuthName
AuthUserFile
For an example, see the /etc/apache/httpd-standalone-ipp.conf file.
In the Solaris Express release, the /printers patch turns on the following operations:
■
■
■
■
■
■
■
■
■
■
■
■
▼
1
print-job
validate-job
create-job
get-jobs
get-printer-attributes
send-document
cancel-job
get-job-attributes
cups-get-default
cups-get-printers
cups-get-classes
cups-move-job
How to Add a User to the IPP AuthUser File
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see
“Configuring RBAC (Task Map)” in System Administration Guide: Security Services.
Chapter 6 • Administering Printers That Use Network Printing Protocols (Tasks)
163
Administering Printers by Using the RFC-1179 Printing Protocol (Task Map)
2
Update the /etc/apache/httpd-standalone-ipp.conf file by using the htpasswd command:
# /usr/sfw/bin/htpasswd /etc/ipp-users user-name
3
Verify the user was added, check the /etc/ipp-users file.
# grep user-name /etc/ipp-users
Administering Printers by Using the RFC-1179 Printing
Protocol (Task Map)
TABLE 6–2
▼
Administering Printers by Using the RFC–1179 Printing Protocol: Task Map
Task
Description
For Instructions
Use the RFC-1179 protocol to
cascade print requests.
Use this procedure to remove the
dependency on the printer
scheduler service, if the print host
is used to cascade print requests.
“How to Use the RFC-1179
Protocol Listener to Cascade Print
Requests” on page 164
Share printers when the RFC-1179
printing protocol is in use.
Printer sharing when the
“Enabling and Disabling Printing
RFC-1179 printing protocol is in
Services (Task Map)” on page 72
use, is accomplished by enabling
and disabling the network listening
service.
How to Use the RFC-1179 Protocol Listener to Cascade
Print Requests
The RFC-1179 protocol listener is represented by the FMRI,
svc:/application/print/rfc1179 (in.lpd). By default, this FMRI is dependent on the print
scheduler service, svc:/application/print/server, and will only run if the host is running
the print scheduler service.
Normally, the RFC-1179 protocol listener is not needed when the print scheduler is not
running. However, if the host is used to cascade print requests, the dependency on the print
scheduler service should be removed.
1
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see
“Configuring RBAC (Task Map)” in System Administration Guide: Security Services.
164
System Administration Guide: Solaris Printing • January 2009
Administering Printers by Using the SMB Protocol
2
Remove the dependency on the print scheduler service.
# cat <<EOF | svccfg
>
select application/print/rfc1179
>
delpg lpsched
>
end
>
EOF
3
After you have removed the dependency, run the following command for the changes to take
effect immediately:
# svcadm refresh application/print/rfc1179
Administering Printers by Using the SMB Protocol
Often, a system that is running the Solaris OS provides file and print services to a variety of
systems on a network, including Windows systems. In a network of where only Windows
systems exist, the SMB protocol is commonly used to share printers. In the Solaris OS,
server-side support for SMB is provided through Samba. and managed through the Service
Management Facility (SMF). Client-side printing support is also available through Samba. To
access a Windows hosted printer, setup of a local print queue is required. This requirement is
due to differences in UNIX and Windows printing models.
The SMB service is controlled by the contents of the /etc/sfw/smb.conf file. An example of
this file, /etc/sfw/smb.conf-example, is provided when you install the Solaris software on
your system. To share printers by using the SMB protocol, you must first enable the service.
To start using this service, follow these steps:
■
Create an /etc/sfw/smb.conf file.
■
Set the workgroup string within the file to a value that is appropriate for your network.
The WORKGROUP value is typically used for Windows installations. However, the MSHOME value
is also sometimes used. Check your Windows client systems to determine the value to use.
For more information about sharing printers between the Solaris OS and the Windows, Linux,
and Mac OS X operating environments, see the OpenSolaris printing FAQ at
http://opensolaris.org/os/community/printing/faq/.
Chapter 6 • Administering Printers That Use Network Printing Protocols (Tasks)
165
166
7
C H A P T E R
7
Customizing Printing Services and Printers
(Tasks)
This chapter provides overview information and procedures for customizing printing services
and printers.
Customizing Printing Services (Task Map)
Task
Description
For Instructions
Add a terminfo entry of an
unsupported printer.
Add an entry to the terminfo
database to initialize an
unsupported printer and establish
required settings.
“How to Add a terminfo Entry for
an Unsupported Printer” on
page 172
Set up a custom printer interface
program.
You can furnish a custom printer
“How to Set Up a Custom Printer
interface program if you have a
Interface Program” on page 176
printer that is not supported by the
standard printer interface
program.
Adjust the printer port
characteristics.
Make printer port characteristics
the are set by the LP print service
compatible with the printer
communication settings.
“How to Adjust the Printer Port
Characteristics” on page 168
Adjusting Printer Port Characteristics
The printer port characteristics set by the LP print service must be compatible with the printer
communication settings. If the default printer port settings provided by the LP print service do
not work with a printer, refer to the printer manual from the manufacturer to determine what
settings the printer requires from the LP print service. Use the stty command to set and display
printer communication settings.
167
Customizing Printing Services (Task Map)
The following table shows the default stty settings that are used by the LP print service.
TABLE 7–1
Default stty Settings Used by the LP Print Service
Option
Description
-9600
Sets baud to 9600
-cs8
Sets 8-bit bytes
-cstopb
Sends one stop bit per byte
-parity
Does not generate parity
-ixon
Enables XON/XOFF (also known as START/STOP or DC1/DC3)
-opost
Does “output post-processing” using all the settings that follow in this table
-olcuc
Do not map lowercase to uppercase
-onlcr
Changes linefeed to carriage return/linefeed
-ocrnl
Does not change carriage returns into linefeeds
-onocr
Outputs carriage returns even at column 0
-n10
Provides no delay after linefeeds
-cr0
Provides no delay after carriage returns
-tab0
Provides no delay after tabs
-bs0
Provides no delay after backspace characters
-vt0
Provides no delay after vertical tabs
-ff0
Provides no delay after form feeds
▼ How to Adjust the Printer Port Characteristics
1
Log in as superuser, lp, or assume an equivalent role on the print server.
2
Adjust the printer port characteristics.
# lpadmin -p printer-name -o "stty=options"
168
-p
Specifies the name of the printer for which you are adjusting the port
characteristics.
-o “stty=options”
Sets the port characteristic (stty option) specified by options. You can
change more than one stty option setting with this command. Enclose
each option in single quotation marks, and use a space to separate the
options. For a complete list of options, see thestty(1) man page.
Table 7–1 shows the default stty settings used by the LP print service.
System Administration Guide: Solaris Printing • January 2009
Customizing Printing Services (Task Map)
3
Verify that the printer port characteristics have been changed.
# lpstat -p printer-name -l
Example 7–1
Adjusting the Printer Port Characteristics
This example shows how to set the port characteristics for the printer luna. The parenb option
enables parity checking/generation. The parodd option sets odd parity generation. The cs7
option sets the character size to 7 bits.
# lpadmin -p luna -o "stty=’parenb parodd cs7’"
Example 7–2
Setting the Terminal Baud Rate
This example shows how to set the terminal baud rate to 19200 for the printer venus.
# lpadmin -p venus -o "stty=19200"
Adding a terminfo Entry for an Unsupported Printer
The LP print service uses an interface program and the terminfo database to initialize each
printer and establish the following:
■
■
■
■
Selected page size
Character pitch
Line pitch
Character set
Each printer is identified in the terminfo database with a short name. The short name required
by the terminfo database is identical to the name used to set the TERM shell variable. This name
is also the printer type that you specify when setting up a printer. For example, the entries for
different types of PostScript printers are in the /usr/share/lib/terminfo/P directory. The
default entries provided with the SunOS software release are PS (for PostScript) and PSR (for
PostScript Reverse).
If you cannot find a terminfo entry for your printer, you still might be able to use the printer
with the LP print service without the automatic selection of page size, pitch, and character sets.
However, you might have trouble keeping the printer set in the correct modes for each print
request.
If no terminfo entry exists for your type of printer and you want to keep the printer set in the
correct modes, you can do one of the following:
■
■
Customize the interface program used with the printer.
Add an entry to the terminfo database.
Chapter 7 • Customizing Printing Services and Printers (Tasks)
169
Customizing Printing Services (Task Map)
A terminal or printer entry in the terminfo database contains and defines hundreds of items.
The LP print service, however, uses fewer than 50 of these items. The following table lists the
required terminfo items for a printer.
TABLE 7–2
Required terminfo Items for a Printer (Booleans)
Item
Description
Booleans:
TABLE 7–3
cpix
Changing character pitch changes resolution
daisy
Printer requires an operator to change character set
lpix
Changing line pitch changes resolution
Required terminfo Items for a Printer (Numbers)
Item
Description
Numbers:
TABLE 7–4
bufsx
Number of bytes buffered before printing
cols
Number of columns in a line
cps
Average print rate in characters per second
it
Tabs initially every n spaces
lines
Number of lines on a page
orc
Horizontal resolution, in units per character
orhi
Horizontal resolution, in units per inch
orl
Vertical resolution, in units per line
orvi
Vertical resolution, in units per inch
Required terminfo Items for a Printer (Strings)
Item
Description
Strings:
170
chr
Changes horizontal resolution
cpi
Changes number of characters per inch
cr
Carriage return
csnm
List of character set names
System Administration Guide: Solaris Printing • January 2009
Customizing Printing Services (Task Map)
TABLE 7–4
Required terminfo Items for a Printer (Strings)
Item
(Continued)
Description
cudl
Moves carriage down one line
cud
Moves carriage down n lines
cuf
Moves carriage to the right n columns
cvr
Changes vertical resolution
ff
Ejects page
hpa
Horizontal position absolute
ht
Tabs to next 8-space tab stop
if
Is the name of initialization file
iprog
Is the path name of initialization program
is1
Is a printer initialization string
is2
Is a printer initialization string
is3
Is a printer initialization string
lpi
Changes number of lines per inch
mgc
Clears all margins (top, bottom, and sides)
rep
Repeats a character n times
rwidm
Disables double-wide printing
scs
Selects character set
scsd
Starts definition of a character set
slines
Set page length to n lines per page
smgl
Sets left margin at current column
smglp
Set left margin
smgr
Sets right margin at current column
smgrp
Sets right margin
smglr
Sets both left and right margins
msgt
Sets top margin at current line
smgtp
Sets top margin
smgb
Sets bottom margin at current line
smgbp
Sets bottom margin
Chapter 7 • Customizing Printing Services and Printers (Tasks)
171
Customizing Printing Services (Task Map)
TABLE 7–4
Required terminfo Items for a Printer (Strings)
Item
(Continued)
Description
smgtb
Sets both top and bottom margins
swidm
Enables double-wide printing
vpa
Sets vertical position to absolute
▼ How to Add a terminfo Entry for an Unsupported Printer
Note – Before you create a terminfo entry for a printer, make sure that none of the existing
terminfo entries will support the printer. To do so, try to set up the printer with an entry for a
similar printer, if a similar printer exists.
1
Log in as superuser, lp, or assume an equivalent role on the print server.
2
Determine a terminfo entry name for the printer.
The directories in the /usr/share/lib/terminfo directory contain all the valid terminfo
entries. Use these entries as a guide for choosing a name for the printer.
3
Create a terminfo entry file for the printer.
Table 7–2 shows the items you must define in the terminfo entry to add a new printer to the LP
print service. For more details about the structure of the terminfo database, see the
terminfo(4) man page.
To help you start writing a new terminfo entry, use the infocmp command to save an existing
terminfo entry to a file. This command is helpful if there is a terminfo entry that is similar to
entry you want to create. For example, the following command saves the ps entry to the
ps_cust file, which will become the new terminfo entry.
infocmp ps > ps_cust
4
Compile the terminfo entry file into the terminfo database.
# tic terminfo_entry
where terminfo-entry variable is the terminfo entry file you created.
5
Check for the new terminfo entry file in the /usr/share/lib/terminfo directory.
Customizing the Printer Interface Program
If you have a printer that is not supported by the standard printer interface program, you can
furnish your own printer interface program. You can copy the standard program and then tell
172
System Administration Guide: Solaris Printing • January 2009
Customizing Printing Services (Task Map)
the LP print service to use it for a specified printer. First, you need to understand what is in the
standard program. The following section describes the standard program.
A printer interface program should perform the following tasks:
■
Initialize the printer port, if necessary. The standard printer interface program uses the stty
command to initialize the printer port.
■
Initialize the printer hardware. The standard printer interface program receives the control
sequences from the terminfo database and the TERM shell variable.
■
Print a banner page, if necessary.
■
Print the number of copies that are specified by the print request.
Caution – If you have a printer interface program from a release of UNIX System V prior to
release 3.2, it will probably work with the Solaris Express, SunOS 5.10, or compatible LP print
service. However, several -o options have been standardized in the Solaris Express, SunOS 5.10,
or compatible LP print service. These options will be passed to every printer interface program.
These options might interfere with similarly named options used by the old interface.
The LP print service, not a printer interface program, is responsible for opening the printer
port. The printer port is given to the printer interface program as standard output. In addition,
the printer is identified as the “controlling terminal” for the printer interface program so that a
“hang-up” of the port causes a SIGHUP signal to be sent to the printer interface program.
The Standard Printer Interface Program
The standard (model) printer interface program is /usr/lib/lp/model/standard. This
program is used by the LP print service to set the printing defaults shown in the following table.
TABLE 7–5
Default Printer Port Characteristics
Characteristic
Default Setting
Default filter
None
Character pitch
None
Line pitch
None
Page width
None
Page length
None
Character set
None
stty options
9600 cs8 -cstopb -parenb -parodd ixon -ixany opost -olcuc onlcr
-ocrnl -onocr -onlret -ofill nl0 cr0 tab0 bs0 vt0 ff0
Chapter 7 • Customizing Printing Services and Printers (Tasks)
173
Customizing Printing Services (Task Map)
TABLE 7–5
Default Printer Port Characteristics
Characteristic
Default Setting
Exit code
0
(Continued)
Customizing stty Modes
If you need to change the terminal characteristics, such as baud rate or output options, find the
section of the standard printer interface program that begins with the following comment:
## Initialize the printer port
For more information, see the “Adjusting Printer Port Characteristics” on page 167.
Exit Codes
When printing is complete, your interface program should exit with a code that shows the
status of the print job. The exit code is the last entry in the printer interface program.
The following table shows the exit codes and how they are interpreted by the LP print service.
TABLE 7–6
Printer Interface Program Exit Codes
Exit Code
Meaning to the LP Print Service
0
The print request has been successfully completed. If a printer fault occurred, it has
been cleared.
1 to 127
A problem was encountered when printing a request. For example, there were too
many nonprintable characters or the request exceeds the printer's capabilities. The LP
print service notifies the person who submitted the request that an error occurred when
printing it. This error does not affect future print requests. If a printer fault has
occurred, it has been cleared.
128
This code is reserved for use by the LP print service. Interface programs must not exit
with this code.
129
A printer fault was encountered when printing the request. This fault does affect future
print requests. If the fault recovery for the printer directs the LP print service to wait for
the administrator to correct the problem, the LP print service disables the printer. If the
fault recovery is to continue printing, the LP print service does not disable the printer.
However, the print service will try printing again in a few minutes.
>129
These codes are reserved for use by the LP print service. Interface programs must not
exit with codes in this range.
If the program exits with a code of 129, root is alerted of a printer fault. The LP print service
must also reprint the request from the beginning, after the fault has been cleared. If you do not
want the entire request to be reprinted, you can have the interface program send a fault message
to the LP print service. (First wait for the fault to be cleared.) When the fault is cleared, the
174
System Administration Guide: Solaris Printing • January 2009
Customizing Printing Services (Task Map)
interface program can resume printing the file. When printing is finished, the printer interface
program can give a 0 exit code, just as if the fault had never occurred. An added advantage of
this approach: The interface program can detect when the fault is cleared automatically. Thus,
the administrator does not need to re-enable the printer.
Fault Messages
You can use the lp.tell program to send fault messages to the LP print service. This program
is referenced by the LPTELL shell variable in the standard printer interface code. The program
takes standard input and sends it to the LP print service. The LP print service puts standard
input into the message that alerts the administrator to the printer fault. If its standard input is
empty, the lp.tell program does not initiate an alert. For an example of how the lp.tell
program is used, examine the standard printer interface code immediately after the following
comment:
# Set up the $LPTELL program to capture fault messages here
If you use the special exit code 129 or the lp.tell program, the printer interface program does
not need to disable the printer itself. The interface program can disable the printer directly.
However, doing so overrides the fault-alerting mechanism. Alerts are sent only if the LP print
service detects that the printer has a fault, and the special exit code and the lp.tell program
are its main detection tools.
If the LP print service has to interrupt printing of a file at any time, it kills the interface program
with a signal TERM (trap number 15). For more information, see the kill(1) and signal(3C)
man pages. If the printer interface program dies from receipt of any other signal, the LP print
service assumes that future print requests are not be affected. As a result, the LP print service
continues to use the printer. The LP print service notifies the user who submitted the request
that the request has not been finished successfully.
When the interface is first invoked, the signals HUP, INT, QUIT, and PIPE (trap numbers 1, 2,
3, and 13) are ignored. The standard interface changes this default behavior, so that the signals
are trapped at appropriate times. The standard interface interprets receipt of these signals as
warnings that the printer has a problem. When the standard interface receives a signal, it issues
a fault alert.
Using a Customized Printer Interface Program
You can create a customized printer interface program and use it instead of the standard printer
interface program on the print server. To do so, you use the lpadmin command to register the
program with the LP print service for a specific printer.
Chapter 7 • Customizing Printing Services and Printers (Tasks)
175
Customizing Printing Services (Task Map)
▼ How to Set Up a Custom Printer Interface Program
1
Log in as superuser, lp, or assume an equivalent role on the print server.
2
Copy the standard printer interface program.
# cp /var/spool/lp/model/standard custom-interface
3
(Optional) If you already have a custom printer interface program, go to Step 5
4
Change the copy of the standard printer interface program to meet your needs.
Refer to the description of the program in “The Standard Printer Interface Program” on
page 173 to determine what you need to change.
5
Set up the custom printer interface program for a specific printer.
# lpadmin -p printer-name -i custom-interface
-p
Specifies the printer that will use the custom printer interface program.
-i
Is the name of the custom printer interface program.
The custom printer interface program is registered with the LP print service, and will be used by
that printer when users submit print requests.
6
Example 7–3
Verify that the custom printer interface program has been added in the
/etc/lp/printers/printer-name/configuration file.
Setting Up a Custom Printer Interface Program
This example shows how to set up a custom printer interface program named custom for the
printer luna.
# lpadmin -p luna -i custom
Example 7–4
Copying a Custom Printer Interface Program
This example shows how to copy a custom printer interface program from the printer venus to
the printer asteroid.
# lpadmin -p asteroid -e venus
176
System Administration Guide: Solaris Printing • January 2009
8
C H A P T E R
8
Administering Character Sets, Filters, Forms,
and Fonts (Tasks)
This chapter provides overview information and procedures for administering character sets,
filters, forms, and fonts on a system.
This is a list of the information that is included in this chapter:
■
■
■
■
“Administering Character Sets (Task Map)” on page 177
“Administering Print Filters (Task Map)” on page 185
“Administering Forms (Task Map)” on page 201
“Administering Fonts (Task Map)” on page 214
Administering Character Sets (Task Map)
Task
Description
For Instructions
Define a print wheel or font
cartridge.
Define a print wheel or font
cartridge that can be used with a
printer.
“How to Set an Alert to Mount a
Print Wheel or Font Cartridge” on
page 182
Unmount and mount a print wheel Delete a current print wheel or font “How to Unmount and Mount a
or font cartridge.
cartridge from the print server's
Print Wheel or Font Cartridge” on
configuration file. Adds a new print page 181
wheel or font cartridge to the print
server's configuration file.
Set up alerts to mount a print wheel Set up email alerts for print
or font cartridge.
requests.
“How to Set an Alert to Mount a
Print Wheel or Font Cartridge” on
page 182
Set up an alias for a selectable
character set.
“How to Set Up an Alias for a
Selectable Character Set” on
page 184
Set up aliases when terminfo
names for the selectable character
sets are inadequate.
177
Administering Character Sets
Administering Character Sets
Printers differ in the method that they use to print text in various font styles. For example,
PostScript printers treat text as graphics. These printers can generate text in different fonts.
They can also place the text in any position, size, or orientation on the page. Other types of
printers support a more limited number of font styles and sizes. These printers use either print
wheels, font cartridges, or preprogrammed selectable character sets. Usually, only one printing
method applies to a given printer type.
From the perspective of the LP print service, print wheels and font cartridges are similar. In
both cases, someone must intervene and mount the hardware on the printer, when needed.
Character sets that require you to physically mount a print wheel or font cartridge are referred
to as hardware character sets. Character sets that do not require hardware mounting, come
preprogrammed with the printer. These character sets can be selected by a print request. They
are referred to as software character sets.
When you set up a non-PostScript printer, you need to tell the LP print service which print
wheels or selectable character sets are available to users. When users submit print requests, the
lp -S command enables them to specify a print wheel or selectable character set to use for the
print job. Users do not have to know which type of character set applies. They just refer to the
font style by the name you have defined. For example, you can define a print wheel as gothic.
To request the gothic print wheel, the user would use the following command:
% lp -S gothic filename
Selectable Character Sets
The selectable character sets supported by a printer are listed in the terminfo entry for that
printer. For example, the entry for the ln03 printer is /usr/share/lib/terminfo/l/ln03. You
can find the names of selectable character sets for any printer type in the terminfo database by
using the tput command. The syntax for the tput command is as follows:
tput -T printer-type csn
The csn option is an abbreviation for character set number. The number starts with 0, which is
always the default character set number after the printer is initialized. To display the names of
the other character sets, you can repeat the command by using -1, -2, -3, and so on, in place of
the -0. For each selectable character set, a terminfo name, for example, usascii, english,
finnish, and so forth, is returned.
In general, the terminfo character set names should closely match the character set names that
are used in the manufacturer's documentation for the printer. Because all manufacturers do not
use the same character set names, the terminfo character set names can differ from one printer
type to the next printer type.
178
System Administration Guide: Solaris Printing • January 2009
Administering Character Sets
You do not have to register the selectable character set names with the LP print service.
However, you can give them more meaningful names or aliases.
Note – If you do not specify the selectable character sets that can be used with a printer, the LP
print service assumes that the printer can accept any character set name, such as cs0, cs1, or
cs2, or the terminfo name known for the printer.
Character sets for PostScript printers are not listed when you use the lpstat -p -l command.
The PostScript fonts are controlled by PostScript filters, not by entries in the terminfo database.
For information about how to administer PostScript fonts, see “Administering Fonts” on
page 214.
Users can use the lpstat -p -l command to display the names of the selectable character sets
that you have defined for each printer on a print server.
Hardware Character Sets
Another method to obtain alternative character sets is to use removable print wheels or font
cartridges that you physically attach, or mount, in a printer.
To administer hardware-mounted character sets, you inform the LP print service of the
following:
■
■
The names you want to use for the available print wheels
How you want to be alerted when a printer needs a different print wheel
Then, when a user requests a particular character set by using the lp -S command, the print
scheduler sends an alert to mount the print wheel. In addition, the print request is placed in the
print queue. When you mount the correct print wheel and tell the LP print service that the print
wheel is mounted, the job is printed. For more information, see “How to Unmount and Mount
a Print Wheel or Font Cartridge” on page 181.
If you do not specify multiple print wheels or font cartridges for a printer, the LP print service
assumes that the printer has a single, fixed print wheel or font cartridge. As such, users cannot
specify a special print wheel or font cartridge when using that printer.
Unlike selectable character sets, the names you use for print wheels or font cartridges are not
tied to entries in the terminfo database. Print wheel names or font cartridge names are used
only for the purpose of communicating with the LP print service and its users.
However, the names you choose for print wheels or font cartridges should have meaning to the
users. The names should refer to font styles. In addition, the names should be the same across
printers that have similar print wheels, font cartridges, or selectable character sets. That way,
users can specify a font style (character set), without regard to which printer will be used, or
whether a print wheel, font cartridges, or a selectable character set will be used.
Chapter 8 • Administering Character Sets, Filters, Forms, and Fonts (Tasks)
179
Administering Character Sets
You and the printer users should agree on the meanings of print wheel names or font cartridge
names. Otherwise, what a user asks for and what you mount might not be the same character
set.
Tracking Print Wheels
The procedure for tracking print wheels is similar to the procedure for tracking forms. Some
printers, usually letter-quality printers, have removable print heads that provide a particular
font or character set. Removable print heads include print wheels and print cartridges. A user
can request a named character set. If that character set is not available, the LP print service
notifies root of the request. The job is stored in the print queue until the print wheel is changed.
Alerts for Mounting Print Wheels or Font Cartridges
You request alerts for mounting print wheels or font cartridges in the same way that you request
other alerts from the LP print service. For general information about alerts, see “Setting Up
Printer Fault Recovery by Using LP Print Commands” on page 135.
▼
How to Define a Print Wheel or Font Cartridge
These procedure shows how to define a print wheel or font cartridge that can be used with the
printer.
1
Log in as superuser, lp, or assume an equivalent role on the print server.
2
Define a print wheel or font cartridge.
# print-server lpadmin -p printer-name -S hard-charset1[,hard-charset2...]
-p printer-name
Specifies the name of the printer for which you are defining a print wheel
or font cartridge.
-s hard-charset
Specifies the hardware character set name of the print wheel or font
cartridge.
You can specify multiple hardware character sets with this command. Use
commas or spaces to separate character set names. If you use spaces,
enclose the list of character set names in quotation marks.
Define names that are meaningful to users. Inform the users of these
names.
The print wheel or font cartridge definition is specified in the print server's
/etc/lp/printers/printer-name/configuration file.
180
System Administration Guide: Solaris Printing • January 2009
Administering Character Sets
3
Log in as superuser, lp, or assume an equivalent role on a print client of the print server.
4
Define the same print wheel or font cartridge for the print client.
# print-client lpadmin -p printer-name -S hard-charset1, hard-charset2...
In this command, the variables are the same as the variables in Step 2.
The print wheel or font cartridge definition is added to the print client's
/etc/lp/printers/printer-name/configuration file.
5
Repeat Step 3 and Step 4 for each print client that might need to use the print wheel or font
cartridge.
6
Verify that the print wheel or font cartridge is defined.
You should see the name of the character set and the notation (mounted).
# lpstat -p printer-name -l
Example 8–1
Defining a Print Wheel
The following example shows how to define the pica print wheel on the printer luna. The print
client is named asteroid.
asteroid# lpadmin -p luna -S pica
▼
1
2
How to Unmount and Mount a Print Wheel or Font
Cartridge
Log in as superuser, lp, or assume an equivalent role on the print server.
Unmount the print wheel or font cartridge that is mounted in the printer.
# lpadmin -p printer-name -M -S none
-p printer-name
Specifies the printer on which you are unmounting a print wheel or font
cartridge.
-M -S none
Indicates that you want to unmount the current print wheel or font
cartridge.
For more information, see the lpadmin(1M) man page.
The current print wheel or font cartridge is deleted from the print server's
/etc/lp/printers/printer-name/configuration file.
Chapter 8 • Administering Character Sets, Filters, Forms, and Fonts (Tasks)
181
Administering Character Sets
3
Remove the print wheel or font cartridge from the printer.
4
Put the new print wheel or font cartridge in the printer.
5
Mount the new print wheel or font cartridge.
# lpadmin -p printer-name -M -S hard-charset...
-p printer-name
Specifies the printer on which you are mounting a print wheel or font
cartridge.
-M -S hard-charset
Specifies the hardware character set name of the print wheel or font
cartridge you want to mount.
The print wheel or font cartridge is added to the print server's
/etc/lp/printers/printer-name/configuration file. The mounted print wheel or font
cartridge remains active until it is unmounted or until a new print wheel or font cartridge is
mounted.
6
Check the information under the Print wheels or Character set heading in the output of the
following command.
You should see the name of the print wheel or character set and the notation (mounted).
# lpstat -p printer-name -l
Example 8–2
Unmounting and Mounting a Print Wheel
The following example shows how to unmount the current print wheel on the printer luna and
mount the pica print wheel.
# lpadmin -p luna -M -S none
# lpadmin -p luna -M -S pica
▼
1
2
How to Set an Alert to Mount a Print Wheel or Font
Cartridge
Log in as superuser, lp, or assume an equivalent role on the print server.
Set an alert to mount a print wheel or font cartridge.
# lpadmin -S hard-charset -A alert [-Q requests] [-W minutes]
-S hard-charset
182
Specifies the hardware character set name of the print wheel or font
cartridge for which you want to set an alert.
System Administration Guide: Solaris Printing • January 2009
Administering Character Sets
-A alert
Specifies what kind of alert will occur when a print wheel or font cartridge is
requested. For detailed information about the valid values for alert, see
Table 5–4. Some valid values are mail, write, and quiet.
If you specify mail or write, a predefined alert message says to mount the
specified print wheel or font cartridge. The message includes the names of
one or more printers that have been set up to use such a print wheel or font
cartridge.
-Q requests
Specifies the number of print requests that require the print wheel or font
cartridge that must be in the queue before an alert occurs. If you don't
specify this option, only one print request in the queue triggers an alert.
-W minutes
Specifies how often (in minutes) the alert occurs If you don't specify this
option, the alert is sent one time.
For more information, see the lpadmin(1M) man page.
The alert is added to the print server's /etc/lp/pwheels/charset-name/alert.sh file.
3
Verify that the alert has been added for the print wheel or font cartridge by checking the output
of the following command.
# lpadmin -S hard-charset -A list
Alternately, if you have set a low number of print requests to trigger the alert, submit enough
print requests to meet the minimum requirements. Ensure that you receive an alert to mount
the print wheel or font cartridge.
Example 8–3
Setting an Alert to Mount a Print Wheel
The following example shows how to set email alerts to occur every 5 minutes for the elite
print wheel when the print queue contains 10 print requests for the elite.
# lpadmin -S elite -A mail -Q 10 -W 5
Example 8–4
Setting an Alert to Mount a Font Cartridge
The following example shows how to set email alerts to occur every minute for the finnish font
cartridge when the print queue contains 5 print requests for the finnish.
# lpadmin -S finnish -A mail -Q 5 -W 1
Chapter 8 • Administering Character Sets, Filters, Forms, and Fonts (Tasks)
183
Administering Character Sets
Example 8–5
Setting Up No Alerts for a Print Wheel
The following example shows how to set up no alerts for the elite print wheel.
# lpadmin -S elite -A none
▼
How to Set Up an Alias for a Selectable Character Set
You do not need to perform this procedure if the terminfo names for the selectable character
sets are adequate. For more information on using the terminfo database, see “Adding a
terminfo Entry for an Unsupported Printer” on page 169.
1
Log in as superuser, lp, or assume an equivalent role on the print server.
2
Display the names of the selectable character sets for the specified printer type.
# tput -T printer-type csn
-T printer-type
Specifies the printer type found in the terminfo database. For information
on entries in the terminfo database, see “Printer Type” on page 52.
n
Specifies the number (0, 1, 2, 3, 4, 5, and so on) that represents a selectable
character set for the specified printer type. The system displays the selectable
character set name followed by the prompt symbol. For example, cs1 could
cause the system to display english#.
For more information, see the tput(1) man page.
3
Set up an alias for a selectable character set.
# lpadmin -p printer-name -S select-charset1=alias1,select-charset2=alias2...
-p printer-name
Specifies the printer on which you are setting up aliases for selectable
character sets.
-Sselect-charset
Specifies the electable character set name. The name can be found in Step 2.
alias
Is the alias for the specified selectable character set. This alias can be used in
addition to the selectable character set name.
You can set up more than one alias with this command. Use commas or
spaces to separate the aliases. If you use spaces, enclose the list of aliases in
quotation marks.
The alias is added to the print server's /etc/lp/printers/printer-name/configuration file.
4
184
Log in as superuser, lp, or assume an equivalent role on a system that is a print client of the print
server.
System Administration Guide: Solaris Printing • January 2009
Administering Print Filters (Task Map)
5
Set up an alias for the selectable character set.
# lpadmin -p printer-name -S select-charset1=alias1,select-charset2=alias2...
In this command, the variables are the same as the variables in Step 3.
The alias is added to the print client's /etc/lp/printers/printer-name/configuration file.
6
Repeat Step 4 and Step 5 for each print client that might need to use the alias.
7
On the print server and print clients, verify that the selectable character set alias is listed in the
output of the following command.
# lpstat -p printer-name -l
Alternately, submit a print request that uses the alias for the selectable character set and check
for output.
Example 8–6
Setting Up an Alias for a Selectable Character Set
The following example shows how to display the names of selectable character sets for the
usascii selectable character set on the printer luna. The printer luna is a ln03 printer type.
This example also shows how to specify text as an alias for the usascii selectable character set.
# tput -T ln03 cs0
usascii# tput -T ln03 cs1
english# tput -T ln03 csn2
finnish# tput -T ln03 csn3
japanese# tput -T ln03 cs4
norwegian#
# lpadmin -p luna -S usascii=text
Administering Print Filters (Task Map)
Task
Description
For Instructions
Create a new print filter.
Create a new print filter for file
types that the LP print service
cannot interpret.
“How to Create a New Print Filter”
on page 195
Add a print filter.
Add information about print
filters, which are programs that
convert the content type of a file to
a content type that is acceptable to
the destination printer.
“How to Add a Print Filter” on
page 198
Chapter 8 • Administering Character Sets, Filters, Forms, and Fonts (Tasks)
185
Creating a New Print Filter
Task
Description
For Instructions
Delete a print filter.
Delete information about print
filters, which are programs that
convert the content type of a file to
a content type that is acceptable to
the destination printer.
“How to Delete a Print Filter” on
page 199
View information about a print
filter.
Delete information about print
filters, which are programs that
convert the content type of a file to
a content type that is acceptable to
the destination printer.
“How to View Information About a
Print Filter” on page 200
Creating a New Print Filter
A filter is used by the LP print service each time it has to print a type of file that the printer
cannot interpret. Creating a new print filter is not easy, and it usually requires extensive
experimentation.
The process of defining a new print filter consists of two steps:
■
■
Writing a print filter program
Creating a print filter definition
A print filter can be as simple or as complex as needed. Filters contain input types, output types,
and complex options that provide a language to process command-line arguments within the
filter.
If you have nonPostScript printers, you have to create and add print filters as required. First,
you need to understand what print filters are and the requirements that must be met by a filter
program.
Writing a Print Filter Program
The LP print service provides filter programs in the /usr/lib/lp/postscript directory. These
filters cover most PostScript printing situations, where the destination printer requires the data
to be in PostScript format. A print filter program must be a binary executable file.
Types of Filters
There are two types of print filters: fast filters and slow filters.
Fast filters do not require much processing time to prepare a file for printing. They must have
access to the printer when they run. To be capable of detecting printer faults, a print filter must
be a fast filter. Any filter that uses the PRINTER keyword as a filter option must be installed as a
fast filter.
186
System Administration Guide: Solaris Printing • January 2009
Creating a New Print Filter
Slow filters require a great deal of processing time to prepare a file for printing. They do not
require access to the printer when they run. Slow filters are run in the background so they do
not tie up the printer, allowing other files that do not need slow filtering to be printed.
Converting Files
The LP print service uses print filters to convert files from one content type to another content
type. You can specify the accepted file content types for each printer. The user specifies the file
content type when submitting a print request. Then, the LP print service finds a printer that can
print files of that content type. Because many applications can generate files for various printers,
this method is often sufficient. However, some applications can generate files that cannot be
printed on any available printers.
Each time the LP print service receives a request to print a type of file that is in a format that
cannot be accepted directly by a printer, the LP print service tries to match the content type of
the print request with the content type of the available (or specified) printer. If there is a match,
the file can be sent directly to the printer without filtering. If no match is found, or if the content
type specifies that a filter be used, the LP print service tries to match the content type of the file
with the input content type of available filters. In addition, the LP print service tries to match
the output type of the filter with the content type of the printer. When an appropriate filter is
found, the print request is passed through the filter.
Handling Special Printing Modes
A print filter handles special printing modes and requests to print specific pages. A special
printing mode is needed to print any characteristics of print requests that require a customized
filter.
Filters handle the following characteristics:
■
■
■
■
■
■
■
■
■
Printer type
Character pitch
Line pitch
Page length
Page width
Pages to print
Character set
Form name
Number of copies
The LP print service provides default settings for these characteristics. However, a print filter
can handle some characteristics more efficiently. For example, some printers can handle
multiple copies more efficiently than the LP print service. So, in this case, you can provide a
filter for multiple-copy page control.
Chapter 8 • Administering Character Sets, Filters, Forms, and Fonts (Tasks)
187
Creating a New Print Filter
Detecting Printer Faults
Each printer has its own way of detecting printer faults and transmitting fault signals to the LP
print service. The LP print service only checks for hang-ups (loss of carrier) and excessive delays
in printing.
Some printers provide good fault coverage and can send a message that describes the reason for
a fault. Other printers indicate a fault by using signals other than the signals for loss of carrier
signal or shut off of data flow. A filter is required to interpret this additional printer fault
information.
A filter can also put a print request on hold, wait for a printer fault to clear, and then resume
printing. With this capability, the print request that was interrupted does not need to be
reprinted in its entirety. Only a filter that knows the control sequences used by a printer can
determine where to break a file into pages. Consequently, only such a filter can find the place in
the file where printing should start after a fault is cleared.
When a print filter generates messages, those messages are handled by the LP print service. If
alerts are enabled, the LP print service sends alerts to the system administrator. For further
information, see “Setting Up Printer Fault Alerts by Using LP Print Commands” on page 133.
Requirements for a Print Filter Program
A print filter can be simple or complex, but it has to meet the following requirements:
188
■
The filter should get the contents of a file from its standard input and send the converted file
to the standard output.
■
A program cannot be used as a filter if it references external files. You might be tempted to
use a program such astroff, nroff, or a similar word processing program as a filter. The LP
print service does not recognize references to other files, known as include files, from a filter
program. Because troff and nroff programs allow include files, they can fail when used as
filters. If the program needs other files to complete its processing. The program t should not
be used as a filter.
■
The filter should not depend on files that normally would not be accessible to a user. If a
filter fails when run directly by a user, it will fail when run by the LP print service.
■
A slow filter can send messages about errors in the file to standard error. a fast filter should
not. Error messages from a slow filter are collected and sent to the user who submitted the
print request.
■
If a slow filter dies because it received a signal, the print request is stopped and the user who
submitted the request is notified. Likewise, if a slow filter exits with a nonzero exit code, the
print request is stopped and the user is notified. The exit codes from fast filters are treated
differently.
System Administration Guide: Solaris Printing • January 2009
Creating a New Print Filter
If you want the filter to detect printer faults, it should also meet the following requirements:
■
If possible, the filter should wait for a fault to be cleared before exiting. The filter should also
continue to print at the top of the page where printing stopped after the fault is cleared. If
you do not want use the continuation feature, the LP print service stops the filter before
alerting the administrator.
■
The filter should send printer fault messages to its standard error as soon as the fault is
recognized. The filter does not have to exit, but can wait for the fault to be cleared.
■
The filter should not send messages about errors in the file to standard error. These
messages should be included in the standard output, where they can be read by the user.
■
The filter should exit with a zero exit code if the file is finished printing (even if errors in the
file have prevented it from being printed correctly).
■
The filter should exit with a nonzero exit code, only if a printer fault has prevented the filter
from finishing a print request.
■
When added to the filter table, the filter must be added as a fast filter.
Creating a Print Filter Definition
A print filter definition tells the LP print service about the filter, what print filter program to
run, what kind of conversion the print filter does, and so on. A set of filter descriptor files are
provided in the /etc/lp/fd directory. These files describe the characteristics of the filters (for
example, fast filter or slow filter), and point to the filter programs (for example,
/usr/lib/lp/postscript/postdaisy).
When defining a new print filter, you must create a print filter definition.
A print filter definition contains the following information used by the LP print service:
■
■
■
■
■
■
■
Name of the filter program to run
Input types the filter program accepts
Output types the filter program produces
Printer types to which the filter program can send jobs
Names of specific printers to which the filter program can send jobs
Filter types (either fast or slow)
Options
You can type the characteristics as direct input to the lpfilter command. You also can create a
file that specifies the filter's characteristics, and use the file name as input to the lpfilter
command arguments. Such a file is called a filter descriptor file and should be located in the
/etc/lp/fd directory. These files are not the filters themselves. Rather, these files point to the
filters.
Whether you store the information in a file, or type the information directly on the command
line, use the following format:
Chapter 8 • Administering Character Sets, Filters, Forms, and Fonts (Tasks)
189
Creating a New Print Filter
Command: command-pathname [options]
Input types: input-type-list
Output types: output-type-list
Printer types: printer-type-list
Printers: printer-list
Filter type: fast or slow
Options: template-list
Note – If you provide more than one definition (that is, more than one line) for any filter
characteristic other than Options, only the second definition is used by the print service.
The information can be arranged in any order, and not all the information is required. When
you do not specify values, the values shown in the following table are assigned by default. These
values are not very useful, which is why you should specify values.
TABLE 8–1
Default Values for lpfilter Command
Item
Default Value
Input types
any
Output type
any
Printer types
any
Printers
any
Filter type
slow
lpfilter Command
Use the full path of the filter program. If there are any fixed options that the program always
needs, include them here.
lpfilter Input Types Argument
Input types is a list of file content types that the print filter can process. The LP print service
does limit the number of input types, but most filters can accept only one input type. Several file
types can be similar enough, such that the filter can deal with them. You can use whatever
names you prefer, with a maximum of 14 alphanumeric characters and dashes. Do not use
underscores as part of the input type name.
The LP print service uses these names to match a filter to a file type, so follow a consistent
naming convention. For example, if more than one filter can accept the same input type, use the
same name for that input type when you specify it for each filter. Inform your users of these
names so that they know how to identify the file type when submitting a file for printing.
190
System Administration Guide: Solaris Printing • January 2009
Creating a New Print Filter
lpfilter Output Types Argument
Output types is list of file types that the filter can produce as output. For each input type, the
filter produces a single output type. The output type can vary, however, from job to job. The
name of the output type is restricted to 14 alphanumeric characters and dashes.
The output type names should either match the types of available (local or remote) printers, or
match the input types handled by other filters. The LP print service groups filters in a shell
pipeline if it finds that several passes by different filters are needed to convert a file. You will
unlikely need this level of sophistication, but the LP print service allows it. Try to find a set of
filters that takes as input types all the different files the users might want printed, and that
converts those files directly into file types the printer can handle.
lpfilter Printer Types Argument
Printer types is a list of the types of printers into which the print filter can convert files. For most
printers and filters, you can leave this part of the filter definition blank, because this list is
identical to the list of output types. However, this list can be different. For example, you could
have a printer with a single printer type for purposes of initialization. However, that printer can
recognize several different file content types. Essentially, this printer has an internal filter that
converts the various file types into a filter type that it can handle. Thus, a filter might produce
one of several output types that match the file types that the printer can handle. The print filter
should be marked as working with that printer type.
As another example, you might have two different models of printers that are listed as accepting
the same file types. Due to slight differences in manufacture, however, one printer deviates in
the results it produces. You label the printers as being of different printer types, say A and B,
where B is the printer that deviates. You create a filter that adjusts files to account for the
deviation produced by printers of type B. Because this filter is needed only for those printer
types, you would list this filter as working only on type B printers.
lpfilter Printers Argument
A print filter normally can work with all printers that accept its output, so you can usually skip
this part of the filter definition.
You might, however, have some printers that are inappropriate for the output that the filter
produces. For example, you might want to dedicate one printer for fast turnaround, only
sending files that require no filtering to that printer. Other printers of identical type can be used
for files that need extensive filtering before they can be printed.
lpfilter Filter Type Argument
The LP print service recognizes fast filters and slow filters, as described in “Types of Filters” on
page 186.
Chapter 8 • Administering Character Sets, Filters, Forms, and Fonts (Tasks)
191
Creating a New Print Filter
Slow filters that are invoked by printing modes, by using the lp -y command, must be run on
the system from which the print request originated. The LP print service cannot pass values for
modes to print servers. It can, however, match a file content type (specified after the -T option of
the lp command) to a content type on a print server. Therefore, if you want to activate special
modes on a print server, you must specify content types that permit the LP print service to
match input types and output types.
lpfilter Options Argument
Options specify how different types of information are converted into command-line
arguments to the filter command. This information can include specifications from a user (with
the print request), the printer definition, and the specifications implemented by any filters that
are used to process the request.
Defining Print Filter Options With Templates
There are 13 sources of information for defining print filter options, each of which is
represented by a keyword. Each option is defined in a template. A template is a statement in a
filter definition that defines an option to be passed to the filter command, based on the value of
one of the filter characteristics
The options specified in a filter definition can include none, all, or any subset of the 13
keywords. In addition, a single keyword can be defined more than once, if multiple definitions
are required for a complete filter definition. The following table contains descriptions of the 13
keywords available for defining options in a print filter definition.
TABLE 8–2
192
Keywords for Print Filter Options
Option Characteristic
Keyword
Patterns
Example
Content type (input)
INPUT
content-type
troff
Content type (output)
OUTPUT
content-type
postscript, impress
Printer type
TERM
printer-type
att495
Printer name
PRINTER
printer-name
lp1
Character pitch
CPI
scaled-decimal
10
Line pitch
LPI
scaled-decimal
6
Page length
LENGTH
scaled-decimal
66
Page width
WIDTH
scaled-decimal
80
Pages to print
PAGES
page-list
1-5,13-20
Character set
CHARSET
character-set
finnish
System Administration Guide: Solaris Printing • January 2009
Creating a New Print Filter
TABLE 8–2
Keywords for Print Filter Options
(Continued)
Option Characteristic
Keyword
Patterns
Example
Form name
FORM
form-name
invoice2
Number of copies
COPIES
integer
3
Special modes
MODES
mode
landscape
A print filter definition can include more than one template. Multiple templates are entered on
a single line and separated with commas, or they are entered on separate lines, preceded by the
Options: prefix.
The format of a template is as follows: keywordpattern = replacement
The keyword identifies the type of option being registered for a particular characteristic of the
filter.
The pattern is a specific option for the keyword.
The replacement is what happens when the keyword has the noted value.
For an example of how an option is defined for a particular filter, suppose you want to have the
print service scheduler assign print requests to filters following this criteria:
■
If the type of OUTPUT to be produced by the filter is impress, then pass the -I option to the
filter.
■
If the type of OUTPUT to be produced by the filter is postscript, then pass the -P option to
the filter.
To specify these criteria, provide the following templates as options to the lpfilter command:
Options: OUTPUT impress=-I, OUTPUT postscript=-P
If the Options line becomes too long, put each template on a separate line, as follows:
Options: OUTPUT impress=-I
Options: OUTPUT postscript=-P
In both templates, the keyword is defined as OUTPUT. In the first template, the pattern is impress,
and the value of the replacement is --I. In the second template, the value of pattern is
postscript, and the value of replacement is -P.
Chapter 8 • Administering Character Sets, Filters, Forms, and Fonts (Tasks)
193
Creating a New Print Filter
To determine which values to supply for each type of template (that is, for the pattern and
replacement arguments for each keyword), consider the following:
■
The values for the INPUT templates come from the file content type that needs to be
converted by the filter.
■
The values for the OUTPUT templates come from the output type that has to be produced by
the filter.
■
The value for the TERM template is the printer type.
■
The value for the PRINTER template is the name of the printer that will print the final output.
■
The values for the CPI, LPI, LENGTH, and WIDTH templates come from the user's print request,
the form being used, or the default values for the printer.
■
The value for the PAGES template is a list of pages that should be printed. Typically, the value
consists of a list of page ranges separated by commas. Each page range consists of a pair of
numbers separated by a dash, or a single number. (For example, 1–5,6,8,10 indicates pages 1
through 5, plus pages 6, 8, and 10.) However, whatever value was given in the -P option to a
print request is passed unchanged.
■
The value for the CHARSET template is the name of the character set to be used.
■
The value for the FORM template is the name of the form requested by the lp -f command
(the command used to submit a print request).
■
The value of the COPIES template is the number of copies of the file to print. If the filter uses
this template, the LP print service reduces to one the number of copies of the filtered file it
prints. This “single copy” includes the multiple copies that are produced by the filter.
■
The value of the MODES template comes from the lp -y command. Because a user can specify
several -y options, the MODES template might have several values. The values are applied in
the left-to-right order given by the user.
The replacement option shows how the value of a template should be given to the filter program.
This part typically a literal option, sometimes with the placeholder asterisk (*) included to show
where the value goes. The pattern and replacement options also can use the regular expression
syntax of the ed command for more complex conversion of user input options into filter
options. All regular expression syntax of ed is supported, including the \( ... \) and \n
constructions. These constructions can be used to extract portions of the pattern option for
copying into the replacement option, and the & option, which can be used to copy the entire
pattern option into the replacement option. For more information, see the ed(1) man page.
Note – If a comma or an equal sign (=) is included in a pattern or a replacement option, precede it
with a backslash (\). A backslash in front of any of these characters is removed when the pattern
or replacement option is used.
194
System Administration Guide: Solaris Printing • January 2009
Creating a New Print Filter
▼
How to Create a New Print Filter
1
Log in as superuser, lp, or assume an equivalent role on the print server.
2
Create a print filter program.
For information on print filter programs, see “Writing a Print Filter Program” on page 186. By
convention, filter programs for PostScript printers are located in the /usr/lib/lp/postscript
directory. You should put programs you create under the /usr/lib/lp directory in a directory
of your choosing.
3
Create a print filter definition.
For information on print filter definitions, see “Creating a Print Filter Definition” on page 189.
You should save the print filter definition in a text file. By convention, filter definitions are
located in the /etc/lp/fd directory and are identified with the .fd suffix.
4
Add the print filter to a print server.
For instructions, see “How to Add a Print Filter” on page 198.
Example 8–7
Creating a New Print Filter
This example shows a print filter definition that is used to convert N37 or Nlp to simple.
Input types: N37, Nlp, simple
Output types: simple
Command: /usr/bin/col
Options: MODES expand = -x
Options: INPUT simple = -p -f
In this example, the print filter program is named col. Once you add the new print filter to a
print server, a user's print requests are handled as follows:
When a user types the following command:
$ lp -y expand report.doc
The print filter program is run with the following arguments to convert the file:
/usr/bin/col -x -p -f
When a user types the following command:
$ lp -T N37 -y expand report.doc
The print filter program is run with the following arguments to convert the file:
/usr/bin/col -x
Chapter 8 • Administering Character Sets, Filters, Forms, and Fonts (Tasks)
195
Administering Print Filters
Example 8–8
Creating a New Print Filter by Converting One Input Type to Another Output Type
This example shows a print filter definition that is used to convert from troff to a PostScript
file.
Input types: troff
Output types: postscript
Printer types: PS
Filter type: slow
Command: /usr/lib/lp/postscript/dpost
Options: LENGTH * = -l*
Options: MODES port = -pp, MODES land = -pl
Options: MODES group \=\([1-9]\) = -n\l
In this example, the filter program is named dpost. The filter program takes one input type,
troff, produces a postscript output, and works with any printer of type PS (PostScript). Users
need to give just the abbreviation port or land when they ask for the paper orientation to be in
either portrait mode or landscape mode. Because these options are not intrinsic to the LP print
service, users must specify them by using the lp -y command.
After you add the new print filter to a print server, print requests will be handled as follows:
■
When a user types the following command to submit a troff file type for printing on a
PostScript printer (type PS), with requests for landscape orientation and a page length of 60
lines:
$ lp -T troff -o length=60 -y land -d luna ch1.doc
The print filter program dpost is run with the following arguments to convert the file:
/usr/lib/lp/postscript/dpost -l60 -pl
■
When a user enters the following command:
$ lp -T troff -y group=4 -d luna ch1.doc
The print filter program dpost is run with the following arguments to convert the file:
/usr/lib/lp/postscript/dpost -n4
Administering Print Filters
Print filters are programs that convert the content type of a file to a content type that is
acceptable to the destination printer.
196
System Administration Guide: Solaris Printing • January 2009
Administering Print Filters
The LP print service uses filters to complete the following tasks:
■
Convert a file from one data format to another format so that it can be printed properly on a
specific type of printer
■
Handle the special modes of printing, such as two-sided printing, landscape printing,
draft-quality, and letter-quality printing
■
Detect printer faults and notify the LP print service, so that the print service can alert users
and system administrators
Not every print filter can perform all these tasks. Because each task is printer-specific, the tasks
can be implemented separately.
The LP print service provides the PostScript filters listed in Table 8–3. The filter programs are
located in the /usr/lib/lp/postscript directory. For PostScript printing, you usually only
need to install the filter programs when setting up a print server. Solaris Print Manager
automatically enables the supplied filters. However, if you administer other printers, you might
need to administer print filters for them.
Creating Print Filters
To create a new print filter, you must write a print filter program and create a print filter
definition. Filters contain input types, output types, and complex options that provide a
language to process command-line arguments within the filter. For more information and
step-by-step instructions, see “Creating a New Print Filter” on page 186.
Adding, Changing, Deleting, and Restoring Print
Filters
Print filters are added, changed, deleted, or restored on the print server only.
You can use the lpfilter command to manage the list of available filters. System information
about filters is stored in the /etc/lp/filter.table file. The lpfilter command gets the
information about filters to write to the table from filter descriptor files. The filter descriptor
files that are supplied (PostScript only) are located in the /etc/lp/fd directory. The actual filter
programs are located in the /usr/lib/lp directory.
The LP print service imposes no fixed limit on the number of print filters you can define. You
can remove filters that are no longer used to avoid extra processing by the LP print service. (LP
examines all filters to find a filter that works for a specific print request.) If in doubt, do not
remove a filter.
As you add, change, or delete filters, you can overwrite or remove some of the original filters
provided by the LP print service. You can restore the original set of filters, if necessary. You can
also remove any filters you have added.
Chapter 8 • Administering Character Sets, Filters, Forms, and Fonts (Tasks)
197
Administering Print Filters
SunOS software provides a default set of PostScript filters. Solaris Print Manager automatically
adds these filters to a print server. Some of the TranScript filters used with LPD-based print
services have SunOS equivalents, but other TranScript filters do not. The following table lists
the default PostScript filters and identifies the equivalent TranScript filters, where applicable.
TABLE 8–3
Default PostScript Filters
PostScript Filter
Action
TranScript Equivalent
download
Used to download fonts
dpost
Changes ditroff to PostScript
postdaisy
Changes daisy to PostScript
postdmd
Changes dmd to PostScript
postio
Used for serial interface for PostScript printer
postior
Used to communicate with printer
postmd
Changes matrix gray scales to PostScript
postplot
Changes plot to PostScript
psplot
postprint
Changes simple to PostScript
enscript
postreverse
Used to reverse or select pages
psrev
posttek
Changes TEK4014 to PostScript
ps4014
psdit
pscomm
The SunOS software does not provide the following filters:
■
■
■
TEX
oscat (NeWSprint opost)
Enscript
The postreverse, postprint, postio, and dpost filters are provided in place of Enscript.
Solaris Print Manager adds the default PostScript filters to a print server. If you have printing
needs that are not met by these filters, see “How to Create a New Print Filter” on page 195. This
section provides information about writing a custom print filter.
▼
How to Add a Print Filter
1
Log in as superuser, lp, or assume an equivalent role on the print server.
2
Add a print filter that is based on a print filter definition.
# lpfilter -f filter-name -F filter-definition
198
System Administration Guide: Solaris Printing • January 2009
Administering Print Filters
-f filter-name
Specifies the name you choose for the print filter.
-F filter-definition
Specifies the name of the print filter definition.
For more information, see the lpfilter(1M) man page.
The print filter is added in the print server's /etc/lp/filter.table file.
3
Verify that the print filter was added.
# lpfilter -f filter-name -l
Example 8–9
Adding a Print Filter
The following example shows how to add the daisytroff print filter that has the
daisytroff.fd print filter definition.
# lpfilter -f daisytroff -F /etc/lp/fd/daisytroff.fd
▼
How to Delete a Print Filter
1
Log in as superuser, lp, or assume an equivalent role on the print server.
2
Delete the print filter.
# lpfilter -f filter-name -x
-f
filter-name
Specifies the name of the print filter to be deleted.
-x
Deletes the specified filter.
The print filter is deleted from the print server's /etc/lp/filter.table file.
3
Verify that the filter was deleted.
# lpfilter -f filter-name -l
You should receive an error indicating that no filter by the specified name exists.
Example 8–10
Deleting a Print Filter
The following example shows how to delete the daisytroff print filter.
# lpfilter -f daisytroff -x
Chapter 8 • Administering Character Sets, Filters, Forms, and Fonts (Tasks)
199
Administering Print Filters
▼
How to View Information About a Print Filter
1
Log in as superuser, lp, or assume an equivalent role on the print server.
2
Request information about a print filter.
# lpfilter -f filter-name -l
-f
Specifies the print filter for which you want to view information. Specify all for
filter-name to view information about all available print filters.
-l
Displays information about the specified filter.
Information about the specified print filter or filters is displayed.
Example 8–11
Viewing Information About a Print Filter
This example shows how to request information for the postdaisy print filter. Sample
command output follows.
# lpfilter -f postdaisy -l
Input types: daisy
Output types: postscript
Printer types: any
Printers: any
Filter type: slow
Command: /usr/lib/lp/postscript/postdaisy
Options: PAGES * = -o*
Options: COPIES * = -c*
Options: MODES group = -n2
Options: MODES group\=\([2-9]\) = -n\1
Options: MODES portrait = -pp
Options: MODES landscape = -pl
Options: MODES x\=\(\-*[\.0-9]*\) = -x\1
Options: MODES y\=\(\-*[\.0-9]*\) = -y\1
Options: MODES magnify\=\([\.0-9]*\) = -m\1
Example 8–12
Viewing Information About All Print Filters on a System
This example shows how to display all the print filters that have been added to the system.
Sample command output follows.
# lpfilter -f all -l | grep Filter
(Filter "download")
Filter type: fast
(Filter "postio")
Filter type: fast
200
System Administration Guide: Solaris Printing • January 2009
Administering Forms (Task Map)
(Filter "postior")
Filter type: fast
(Filter "postreverse")
Filter type: slow
Example 8–13
Redirecting Information About a Print Filter
This example shows how to redirect information about the daisytroff filter to a file. This task
is useful if a filter definition is removed unintentionally.
# lpfilter -f daisytroff -l > daisytroff.fd
Administering Forms (Task Map)
Task
Description
For Instructions
Create a new form definition.
Provide a new form definition by
specifying information for nine
required printer characteristics.
“How to Create a New Printer
Form Definition” on page 204
Limit user access to a form.
Control user access to printers and “How to Limit User Access to a
forms that are available on the
Form” on page 212
network.
Add a form.
Add the definition of a form to the “How to Add a Form” on page 205
list of available forms, so that the
LP print service can recognize the
form.
Delete a form.
Remove the definition of a form
“How to Delete a Form” on
from the list of available forms that page 206
are recognized by the LP print
service.
Mount a form.
Use the mount command to notify “How to Unmount and Mount a
the LP print service to accept print Form” on page 207
requests for a form with a specific
definition.
Set an alert to mount a form.
Set alerts for forms that are
mounted to a printer.
View information about a form.
View form names and other form “How to View Information About
information by listing the contents a Form” on page 211
of the /etc/lp/forms directory.
Chapter 8 • Administering Character Sets, Filters, Forms, and Fonts (Tasks)
“How to Set an Alert to Mount a
Form” on page 209
201
Creating a New Printer Form
Task
Description
For Instructions
View the current status of a form.
Use the lpforms command to
display the current status of a
form.
“How to View the Current Status
of a Form” on page 211
Limit printer access to a form.
Control what forms printers have
access to.
“How to Limit Printer Access to a
Form” on page 213
Creating a New Printer Form
When you want to provide a new form, you must define its characteristics by specifying
information for nine required printer characteristics (such as page length and page width) as
input to the lpforms command.
The LP print service uses this information to perform the following tasks:
■
■
Initialize the printer so that printing is done properly on the form
Send reminders to the system administrator about how to handle the form
The form name can be anything you choose, as long as it does not contain more than 14
alphanumeric characters or any underscores. The information must use the following format:
Page length: scaled-number
Page width: scaled-number
Number of pages: integer
Line pitch: scaled-number
Character pitch: scaled-number
Character set choice: character-set-name [,mandatory]
Ribbon color: ribbon-color
Comment:
informal notes about the form
Alignment pattern: [content-type] alignment pattern
The optional word [,mandatory], means that the user cannot override the character set choice
in the form. The content-type can be given, although this information is optional, with an
alignment pattern. If this value is given, the print service uses it to determine, as necessary, how
to filter and print the file.
202
System Administration Guide: Solaris Printing • January 2009
Creating a New Printer Form
Aside from following two exceptions, the information can appear in any order:
■
The Alignment pattern (which must always be last).
■
The comment (which must always follow the line with the Comment: prompt).
If the comment contains a line that begins with a key phrase, such as Page length, Page
width, and so on, precede that line with a > character so that the key phrase is not at the
beginning of the line. The initial > character is stripped from the comment and is not
displayed.
Not all of the information must be given. When you do not specify values, the default values in
the following table are assigned. Before running the lpforms command, gather the following
information about the new form that is described in this table.
TABLE 8–4
Default Values for Printer Forms
Value
Default
Description
Page length
66 lines
The length of the form, or the length of each page in
a multipage form. This information can be the
number of lines, or the size in inches or centimeters.
Page width
80 columns
The width of the form, in characters, inches, or
centimeters.
Number of pages
1
The number of pages in a multipage form. The LP
print service uses this number with a print filter (if
available) to restrict the alignment pattern to a length
of one form. See the description of alignment pattern
below. If no filter is available, the LP print service
does not truncate the output.
Line pitch
6 lines per inch
A measurement of how close lines appear on the
form. Line pitch is also called leading. Character
pitch is the distance between two lines, from baseline
to baseline, measured by either lines per inch or lines
per centimeter.
Character pitch
10 characters per inch
A measurement of how close together characters
appear on the form. It is the distance between
characters, measured by either characters per inch or
characters per centimeter.
Character set choice
Any
The character set, print wheel, or font cartridge that
should be used when this form is used. Users can
choose a different character set for their own print
requests when using this form. Or, you can require
that only one character set be used.
Chapter 8 • Administering Character Sets, Filters, Forms, and Fonts (Tasks)
203
Creating a New Printer Form
TABLE 8–4
Default Values for Printer Forms
(Continued)
Value
Default
Description
Ribbon color
Any
If the form should always be printed using a certain
color ribbon, the LP print service can give a mount
alert message indicating which color to use.
Comment
(No default)
Any remarks that might help users understand the
form. For example, the remarks could indicate the
name of the form, its revision, its purpose, or
restrictions on its use.
Alignment pattern
(No default)
A sample file that the LP print service uses to fill one
blank form. When mounting the form, you can print
this pattern on the form to align it properly. You can
also define a content type for this pattern so that the
print service knows how to print it.
Note – The LP print service does not try to mask sensitive information in the alignment pattern.
If you do not want sensitive information printed on sample forms, for example when you align
checks, then you should mask the appropriate data. The LP print service keeps the alignment
pattern stored in a safe place, where only users logged in as superuser or lp user can read it.
When you have gathered the information for the form, specify it as input to the lpforms
command. You should record this information first in a separate file so that you can edit it
before specifying it with the lpforms command. You can then use the file as input instead of
typing each piece of information separately after a prompt.
▼
How to Create a New Printer Form Definition
1
Log in as superuser, lp, or assume an equivalent role on the print server.
2
Create a form definition file.
For a description on creating printer forms, see “Creating a New Printer Form” on page 202.
You should save the printer definition in a text file.
3
Add the form to the LP print service.
# lpadmin -p printer-name -M -f form-name
4
Add the form to a print server.
For instructions, see “How to Add a Form” on page 205.
204
System Administration Guide: Solaris Printing • January 2009
Administering Forms
Administering Forms
A form is a sheet of paper on which information is printed in a predetermined format. Unlike
plain paper stock, forms usually have text or graphics preprinted on them. Common examples
of forms are company letterhead, invoices, blank checks, receipts, and labels.
The term form has two meanings: the physical medium (the paper) and the software that defines
a form to the LP print service.
The LP print service allows you to control the use of forms. This section provides information
about adding, changing, deleting, mounting, and limiting access to forms.
Adding, Changing, or Deleting Forms
When you add a form, you tell the LP print service to include the form in its list of available
forms. You also have to supply the information required to describe or define the form.
Although you can specify such definitions when you add the form, it helps to create the
definitions first and save them in files. You can then change the form definition by editing the
file.
Note – No form definitions are supplied with the LP print service.
To change a form, you must re-add the form with a different definition.
The LP print service imposes no limit on the number of forms you can define. However, you
should delete forms that are no longer appropriate. Obsolete forms can result in unnecessary
processing by the print service.
▼
How to Add a Form
1
Log in as superuser, lp, or assume an equivalent role on the print server.
2
Add a form that is based on a form definition.
# lpforms -f form-name -F /etc/lp/forms/form
-f
Specifies the name you choose for the form
-F /etc/lp/forms/ form
Specifies the name of the form definition.
For more information, see the lpforms(1M) man page.
The form is added to the print server's /etc/lp/forms/form-name/describe file.
Chapter 8 • Administering Character Sets, Filters, Forms, and Fonts (Tasks)
205
Administering Forms
3
Verify that the form was added by checking the output of the following command:
# lpforms -f form-name -l
Example 8–14
Adding a Form
The following example shows how to add the medical form that uses the medical.fmd form
definition.
# lpforms -f medical -F /etc/lp/forms/medical.fmd
See Also
▼
Before the form can be used, one or more printers must be given access to the form. For more
information, see “How to Limit Printer Access to a Form” on page 213.
How to Delete a Form
1
Log in as superuser, lp, or assume an equivalent role on the print server.
2
Delete the form.
# lpforms -f form-name -x
-f
Is the form to be deleted.
-x
Deletes the specified form
The form is deleted from /etc/lp/forms/form-name file.
For more information, see the lpforms(1M) man page.
3
Verify that the form was deleted.
# lpforms -f form-name -l
You should receive an error indicating that a form by the specified name does not exist.
Example 8–15
Deleting a Form
The following example shows how to delete the medical form.
# lpforms -f medical -x
206
System Administration Guide: Solaris Printing • January 2009
Administering Forms
Mounting Forms
To print a form, you must load the paper in the printer and use a command to mount the form.
This command notifies the LP print service that print requests submitted to the printer are to be
printed using the form definition.
If you use one printer for different types of printing, including forms, you should do the
following:
■
Disable the printer before you load the paper and mount the form.
■
Re-enable the printer when the form is ready. Otherwise, the LP print service will continue
to print files that do not need the form on the printer.
When you mount a form, ensure that it is aligned properly. If an alignment pattern has been
defined for the form, you can request that the pattern print repeatedly after you have mounted
the form. Let the pattern print repeatedly until you have adjusted the printer so the alignment is
correct.
When you want to change or discontinue using a form on a printer, you must notify the LP
print service by unmounting the form.
▼
How to Unmount and Mount a Form
1
Log in as superuser, lp, or assume an equivalent role on the print server.
2
Stop accepting print requests on the printer on which you are unmounting the current form.
# reject printer-name
printer-name is the name of the printer on which you are unmounting a form.
New print requests (which might not require the form) are not allowed to enter the printer's
queue.
3
Unmount the current form.
# lpadmin -p printer-name -M -f none
In this command, the variable printer-name is the same variable that is used in Step 2.
The current form is deleted from the print server's
/etc/lp/printers/printer-name/configuration file.
4
Remove the form paper from the printer.
5
Load the new form paper for the next print request.
Chapter 8 • Administering Character Sets, Filters, Forms, and Fonts (Tasks)
207
Administering Forms
6
Mount the form.
# lpadmin -p printer-name -M -f form-name[-a -o filebreak]
-p
Specifies the printer on which you are mounting a form.
-M
Specifies the name of the form to be mounted.
-a -o filebreak
Optionally enables you to print a copy of the alignment pattern defined for
the form, if this definition exists.
-p printer-name
Printer on which you are mounting a form.
-M -f form-name
Name of the form to be mounted.
The specified form is added in the print server's
/etc/lp/printers/printer-name/configuration file.
7
Start accepting print requests on the printer.
# accept printer-name
The printer is ready to print the form you just mounted.
8
Verify that the form has been mounted.
# lpstat -p printer-name -l
Otherwise, submit a print request that requires the new form and check the printer for output.
Example 8–16
Unmounting a Form
The following example shows the process of unmounting the currently mounted form on the
printer luna.
# reject luna
destination "luna" will no longer accept requests
# lpadmin -p luna -M f none
# accept luna
destination "luna" now accepting requests
Example 8–17
Mounting a Form
The following example shows the process of mounting the medical form on the printer luna.
# reject luna
destination "luna" will no longer accept requests
# lpadmin -p luna -M f medical -a -o filebreak
# accept luna
destination "luna" now accepting requests
208
System Administration Guide: Solaris Printing • January 2009
Administering Forms
Tracking Forms
The LP print service helps you track which forms are mounted on each printer. The print
service also notifies you when it cannot find a description it needs to print a form. You are
responsible for creating form descriptions, and mounting and unmounting form paper in each
printer. You complete this task either as part of setting up a printer or in response to alerts from
the LP print service.
Users can specify the form on which they want a job to print. As superuser, you can mount a
specific form, then tell the LP print service that the form is available and on which printer it is
mounted. Users can submit print requests specifying a particular form. When the LP print
service receives the request, it sends an alert message to root requesting that you mount the
form.
Defining Alerts for Mounting Forms
You request alerts for mounting forms in the same way that you request other alerts from the LP
print service. For general information about alerts, see “Setting Up Printer Fault Recovery by
Using LP Print Commands” on page 135.
▼
1
2
How to Set an Alert to Mount a Form
Log in as superuser, lp, or assume an equivalent role on the print server.
Set a request alert for mounting a form.
# lpforms -f form-name -A alert [-Q requests] [-W minutes]
-f
Specifies the form for which you want to set a request alert.
-A alert
Specifies what kind of alert will occur when a form is requested. Some valid
values are mail, write, and quiet. If you choose mail or write, a predefined
alert message says to mount the specified form. The message includes names of
one or more printers that have been set up to use the form.
-Q requests
Specifies how many print requests that require the form must be in the queue to
trigger an alert. If you don't specify this option, an alert occurs with just one
print request in the queue.
-W minutes
Specifies how often (in minutes) the alert will occur. If you don't specify this
option, the alert is sent one time.
The request alert is added to the print server's /etc/lp/forms/form-name/alert.sh file.
Chapter 8 • Administering Character Sets, Filters, Forms, and Fonts (Tasks)
209
Administering Forms
3
Verify that the alert has been added for the form.
# lpforms -f form-name -A list
Alternately, if you have set a low number of print requests to trigger the alert, submit print
requests to meet the minimum requirement. Ensure that you receive an alert to mount the
form.
Example 8–18
Setting an Alert to Mount a Form
This example shows how to set email alerts to occur every 5 minutes for the letterhead form
when 10 print requests for letterhead reside in the print queue.
# lpforms -f letterhead -A mail -Q 10 -W 5
Example 8–19
Setting a Console Window Alert
This example shows how to set console window alerts to occur every 10 minutes for the
letterhead form when 5 requests for letterheadreside in the print queue.
# lpforms -f letterhead -A write -Q 5 -W 10
Example 8–20
Setting up No Request Alerts
This example shows how to set no request alerts for the invoice form.
# lpforms -f invoice -A none
Checking Forms
When you have defined a form for the LP print service, you can check the form with either of
two commands. Which command you choose depends on the type of information you want to
check.
■
To show the attributes of the form, use the lpforms command. You can also redirect the
output of the command into a file to save it for future reference.
■
To display the current status of the form, use the lpstat command. To protect potentially
sensitive content, the alignment pattern is not shown.
If you are not sure about the name of an existing form, you can view the form names by listing
the contents of the /etc/lp/forms directory.
210
System Administration Guide: Solaris Printing • January 2009
Administering Forms
▼
How to View Information About a Form
1
Log in as superuser, lp, or assume an equivalent role on the print server.
2
Request information about a form.
# lpforms -f form-name -l
-f
Specifies the form for which you want to view information. Specify all for form-name to
view information about all the available forms.
-l
Lists the specified form.
Information about the specified form or forms is displayed.
Example 8–21
Viewing Information About a Form
The following example shows how to display information about the medical form.
# lpforms -f medical -l
Page length: 62
Page width: 72
Number of pages: 2
Line pitch: 6
Character pitch: 12
Character set choice: pica
Ribbon color: black
Comment:
Medical claim form
The following example shows how to redirect the information about the medical form to a file.
This command creates the form definition for the form. This command is useful if a form
definition is removed unintentionally.
# lpforms -f medical -l > medical.fmd
▼
How to View the Current Status of a Form
1
Log in on the print server.
2
Request information about the current status of a form.
$ lpstat -f form-name
The -f option specifies the form for which you want to view the current status. Specify all for
form-name to view the current status of all the forms.
Chapter 8 • Administering Character Sets, Filters, Forms, and Fonts (Tasks)
211
Administering Forms
Information about the current status of the specified form or forms is displayed.
Example 8–22
Viewing the Current Status of a Form
This example shows how to display the status of the medical form.
$ lpstat -f medical
form medical is available to you
Limiting Access to Forms
You can control which printers and which users have access to some or all of the forms available
on the network. For example, you might want only the people in the payroll or accounts payable
department to be able to print check forms. In addition, you might want the check forms to be
available only on certain printers.
For more information, see “How to Limit User Access to a Form” on page 212. To limit printer
access to a form, see “How to Limit Printer Access to a Form” on page 213.
▼
How to Limit User Access to a Form
1
Log in as superuser, lp, or assume an equivalent role on the print server.
2
Allow or deny users access to a form.
# lpforms -f form-name -u allow:user-list | deny:user-list
-f
Specifies the name of the form for which the allow user access lists or the
deny user access list is being created.
-u allow:user-list
Represents users to be added to the allow user access list. Use a comma
or a space to separate user login IDs. If you use spaces, enclose the list of
IDs in quotation marks.
Table 5–5 provides the valid values for user-list.
-u deny:user-list
Represents users to be added to the deny user access list. Use a comma or
a space to separate user login IDs. If you use spaces, enclose the list of
IDs in quotation marks. Table 5–5 provides the valid values for user-list.
The specified users are added to the appropriate user access list for the specified form in one of
the following files on the print server:
■
■
212
/etc/lp/forms/form-name/allow
/etc/lp/forms/form-name/deny
System Administration Guide: Solaris Printing • January 2009
Administering Forms
3
Verify that the allow user access list and deny user access list are set up correctly.
# lpforms -f form-name -l
Example 8–23
Allowing User Access to a Form
This example shows how to allow only the users nathan and marcia access to the check form.
# lpforms -f check -u allow:nathan,marcia
Example 8–24
Denying User Access to a Form
This example shows how to deny users jones and smith access to the dental form.
# lpforms -f dental -u deny:jones,smith
▼
1
2
How to Limit Printer Access to a Form
Log in as superuser, lp, or assume an equivalent role on the print server.
Allow or deny use of forms on a printer.
# lpadmin -p printer-name -f allow:form-list | deny:form-list
-p
Specifies the name of the printer for which the allow forms list or deny
forms list is being created.
-f allow: form-list
Specifies the form name to be added to the allow list. Use a space or a
comma to separate multiple form names. If you use spaces to separate
form names, enclose the list of form names in quotation marks.
-f deny: form-list
Is the form name to be added to the deny list. Use a space or a comma to
separate multiple form names. If you use spaces to separate form names,
enclose the list of form names in quotation marks.
The specified form or forms are added to the allow forms list or the deny forms list in one of the
following files on the print server:
■
■
3
/etc/lp/printers/printer-name/form.allow
/etc/lp/printers/printer-name/form.deny
Verify that the allow forms list and the deny forms list are set up correctly.
# lpstat -p printer-name -l
Chapter 8 • Administering Character Sets, Filters, Forms, and Fonts (Tasks)
213
Administering Fonts (Task Map)
Example 8–25
Allowing Printer Access to a Form
This example shows how to allow the printer luna to access only the medical, dental, and
check forms.
# lpadmin -p luna -f allow:medical,dental,check
Example 8–26
Limiting Printer Access to a Form
This example shows how to deny the printer luna from accessing the medical, dental, and
check forms.
# lpadmin -p luna -f deny:"medical dental check"
Administering Fonts (Task Map)
Task
Description
For Instructions
Install downloaded PostScript
fonts.
Permanently download a font if
most print requests serviced by the
printer use that font. To avoid
transmitting fonts across the
network, add all the
printer-resident fonts.
“How to Install Downloaded
PostScript Fonts” on page 217
Install host-resident PostScript
fonts.
Install host-resident fonts on a
“How to Install Host-Resident
system that is shared by many
PostScript Fonts” on page 217
users. Use this method when
numerous fonts are available, or
when these fonts are not used by all
print requests.
Administering Fonts
If you have a laser printer, you might need to install and maintain PostScript fonts. For many
printers, the fonts are set up as part of the printer installation process.
PostScript fonts are stored in outline form, either on the printer or on a system that
communicates with the printer. When a document is printed, the PostScript interpreter
generates each character as needed in the appropriate size from the outline description of it. If a
font required for a document is not stored on the printer being used, the font must be
transmitted to that printer before the document can be printed. This transmission process is
called downloading fonts.
214
System Administration Guide: Solaris Printing • January 2009
Administering Fonts
Fonts are stored and accessed in several ways:
■
Printer-resident fonts are stored permanently on a printer. These fonts are installed in
read-only memory (ROM) on the printer by the manufacturer. If the printer has a disk, you
can install fonts on that disk. Most PostScript printers are shipped with 35 standard fonts.
■
A permanently downloaded font is transmitted to a printer with a PostScript exitserver
program. A permanently downloaded font remains in printer memory until the printer is
turned off. Memory allocated to a downloaded font reduces the memory available on the
server for PostScript print requests. Use of an exitserver program requires the printer
system password and can be reserved for the printer administrator. You should
permanently download a font if most print requests serviced by the printer use that font.
■
Fonts that are used infrequently or for special purposes can be stored on a user's system. The
user can specify these fonts when submitting the print request. The fonts are appended to
the print request and transmitted to the printer. When the print request is processed, the
space allocated for the font is freed for other print requests.
■
Host-resident fonts are stored on a system that is shared by many users. The system that
stores the fonts can be a print server or a print client. Each user can request fonts in the
document to be printed. This method is useful when numerous fonts are available, or when
these fonts are not used by all print requests. If the fonts will be used only on printers
attached to a print server, they should be stored on the print server. If the fonts will be used
by the users on one system and those users can submit requests to multiple printers on a
network, the fonts should be stored on the users' system.
The LP print service provides a special download filter to manage host-resident fonts. The
LP print service also supplies troff width tables for the 35 standard PostScript fonts that
reside on many PostScript printers. For more information about the troff program, see the
troff(1) man page.
Managing Printer-Resident Fonts
Most PostScript printers come equipped with fonts that are resident in the printer ROM. Some
printers have a disk on which additional fonts are stored. When a printer is installed, you
should add the list of printer-resident fonts to the font list for that printer. By identifying
printer-resident fonts, you prevent fonts from being transmitted unnecessarily across a
network. Each printer has its own list of resident fonts, which is contained in this file:
/etc/lp/printers/printer-name/residentfonts
When the printer is attached to a print server, ensure that the list in the residentfonts file
includes fonts that are on the print server. The file must also include fonts that are available for
downloading to the printer.
You must edit the files that contain the list of printer-resident fonts by using a text editor such as
vi.
Chapter 8 • Administering Character Sets, Filters, Forms, and Fonts (Tasks)
215
Administering Fonts
Downloading Host-Resident Fonts
When a PostScript document contains a request for fonts not loaded on the printer, the
download filter manages this request. The download filter uses PostScript document
structuring conventions to determine which fonts to download.
LP print filters are either fast or slow. A fast filter quickly prepares a file for printing. Also, a fast
filter must have access to the printer while the filter is processing. A slow filter takes longer to
convert a file. However, a slow filter does not need to access the printer while the filter is
processing. An example of a slow filter is a filter that converts an ASCII document to a
PostScript document.
The download filter is a fast filter. This filter downloads fonts automatically if the fonts are on
the print server. The download filter can also be used to send fonts to a print server. To do so,
you can create a new filter table entry that calls the download filter as a slow filter by using the lp
-y command. Alternatively, you can force selection of this filter by changing the input type.
The download filter performs five tasks:
1. The filter searches the PostScript document to determine which fonts are requested. These
requests are documented with the following PostScript structuring comments:
%%DocumentFonts: font1 font2 … in the header comments.
2. The download filter searches the list of printer-resident fonts to determine if the requested
font must be downloaded.
3. If the font is not resident on the printer, the download filter searches the host-resident font
directory table to determine if the requested font is available. This filter performs this search
by getting the appropriate file name from the map.
4. If the font is available, the download filter takes the file for that font and appends it to the file
to be printed.
5. The download filter sends the font definition file and the source file to the PostScript printer.
The source file is the file to be printed.
Installing and Maintaining Host-Resident Fonts
Some fonts reside on the host system and are transmitted to the printer as needed for particular
print requests. As the administrator, you make PostScript fonts available to all users on a
system. To do so, you must know how and where to install these fonts. Because fonts are
requested by name and stored in files, the LP print service keeps a map file. A map file shows the
correspondence between the names of fonts and the names of the files that contain those fonts.
Both the map file and the font list must be updated when you install host-resident fonts.
216
System Administration Guide: Solaris Printing • January 2009
Administering Fonts
The fonts available for use with PostScript printers are stored in directories that you create.
These directories are called /usr/share/lib/hostfontdir/typeface/font. The variable
typeface is replaced by a name, such as palatino or helvetica. The variable font is replaced by
a an attribute name, such as bold or italic.
▼
1
2
How to Install Downloaded PostScript Fonts
Log in as superuser, lp user, or assume an equivalent role on the print server or print client.
Change directory to the /etc/lp/printers/printer-name directory.
# cd /etc/lp/printers/printer-name
The variable printer-name specifies the name of the printer on which you want to install
downloaded PostScript fonts.
3
Create the residentfonts file, if this file does not already exist.
# touch residentfonts
This file might not exist if you are adding permanently downloaded fonts for the first time.
4
▼
1
2
Edit the residentfonts file. Add all the printer-resident fonts and the fonts to be permanently
downloaded.
How to Install Host-Resident PostScript Fonts
Log in as superuser, lp, or assume an equivalent role on the print server or print client.
Create the hostfontdir directory.
# cd /usr/share/lib
a. Change to the /usr/share/libdirectory.
# cd /usr/share/lib
b. Create the hostfontdir directory, if this directory does not already exist.
# mkdir hostfontdir
c. Change the permissions on the hostfontdir directory to 775.
# chmod 775 hostfontdir
3
Create a directory for a new typeface, if the directory does not already exist.
# mkdir typeface
Chapter 8 • Administering Character Sets, Filters, Forms, and Fonts (Tasks)
217
Administering Fonts
4
Copy the font file to the appropriate directory.
# cp filename /usr/share/lib/hostfontdir/typeface/font
5
Add to the map file the name of the font and the name of the file in which it resides.
a. Change to the /usr/share/lib/hostfontdir directory.
b. Edit the map file by using a text editor such as the vi editor.
Add a one-line entry for each font that you want to add to the file. Put the font name first,
followed by a space, followed by the name of the file where the font resides. For example:
Palatino-Bold /usr/share/lib/hostfontdir/palatino/bold
c. Save the file.
When an example entry exists in the map file on the appropriate system, users can apply the
font (for example, Palatino Bold) to their print jobs. When users submit a print request that
contains this font, the LP print service appends a copy of the
/usr/share/lib/hostfontdir/palatino/bold file to that file before sending it to the
printer.
6
218
If you are using the troff program, you must create new width tables for this font in the
standard troff font directory.
System Administration Guide: Solaris Printing • January 2009
9
C H A P T E R
9
Administering Printers by Using the PPD File
Management Utility (Tasks)
This chapter describes how to use the PPD File Manager, /usr/sbin/ppdmgr, utility to
administer PostScript Printer Description (PPD) files that are used with the Solaris print
subsystem. The ppdmgr utility enables you to customize printers and automates a variety of
administrative printing tasks.
This is a list of information in this chapter:
■
■
■
“Administering PPD Files by Using the PPD File Management Utility (Task Map)” on
page 219
“Overview of the PPD File Management Utility” on page 220
“Using the PPD File Manager (ppdmgr) Utility” on page 223
For reference information, see “PPD File Management Utility” on page 277.
Administering PPD Files by Using the PPD File Management
Utility (Task Map)
TABLE 9–1
Administering PPD Files by using ppdmgr: Task Map
Task
Description
For Instructions
Add a PPD file to a system by
using the ppdmgr utility.
Use the ppdmgr utility to add a
PPD file to the system.
“How to Add a PPD File to a System by
Using the ppdmgr Utility” on page 223
Add a PPD file to a system by
using the lpadmin -n
command.
Use the lpadmin -n command to
modify an existing print queue to
associate a PPD file with it.
“How to Add a PPD File to a System by
Using the lpadmin -n Command” on
page 226
219
Overview of the PPD File Management Utility
TABLE 9–1
Administering PPD Files by using ppdmgr: Task Map
(Continued)
Task
Description
Request an update or a rebuild
of the PPD cache file that is
associated with a specific label
or all labels.
“How to Update or Rebuild the PPD
Use the ppdmgr utility to request
an update of the PPD cache file, if Cache File by Using the ppdmgr Utility”
you added a PPD file manually or on page 228
by using the pkgadd command.
If you suspect the PPD cache file
has become corrupted, you can
request a rebuild of the PPD cache
file information for PPD files in
these locations:
■
In a specified label directory
within a specified repository
on a system
■
Within all the repositories on
a system
Note – Depending on the
number of PPD files to
process, a rebuild of the PPD
cache file can be
time-consuming.
For Instructions
Enable the
application/print
/ppd-cache-update service.
The application/print
“How to Enable or Disable the
/ppd-cache-update service must ppd-cache-update Service” on page 230
be online to reflect changes made
to PPD file repositories in the PPD
cache. This service is enabled by
default. You can enable the service
by using the svcadm command, if
necessary.
Disable the
application/print
/ppd-cache-update service.
Use the svcadm command to
disable the application/print
/ppd-cache-update service.
“How to Enable or Disable the
ppd-cache-update Service” on page 230
Overview of the PPD File Management Utility
To provide support for a wide range of printers, the Solaris print system has the ability to use
PostScript Printer Description (PPD) files. The PPD File Manager (/usr/sbin/ppdmgr)
provides a means of administering PPD files on a system. This utility enables you to add PPD
files to the system and update printer information for printers that are not yet supported in the
running Solaris OS.
With the ppdmgr utility, you can perform the following tasks:
220
■
Add a PPD file to a PPD file repository on a system.
■
Supply a label that groups PPD files within a PPD file repository.
■
Update the information in the PPD cache file Solaris Print Manager uses to display
supported printer information.
System Administration Guide: Solaris Printing • January 2009
Overview of the PPD File Management Utility
Adding PPD Files to a System
When you add or modify a printer by using Solaris Print Manager, a PPD cache file, ppdcache, is
referenced to display printer driver information. See “Description of the Printer Driver Field in
Solaris Print Manager” on page 280. The PPD File Management utility generates the cache file
by gathering printer information from the PPD files in all of the PPD file repositories on a
system. To reflect any changes that are made in Solaris Print Manager, the PPD cache file must
be updated.
You can use the following methods to add a PPD file to a system:
■
■
■
ppdmgr utility
lpadmin command with the -n option
pkgadd command
When you add a PPD file to a system by using the ppdmgr utility or the lpadmin -n command,
the changes are reflected in Solaris Print Manager. If the PPD file is manually copied to the
system or added by using the pkgadd command, you can use the ppdmgr utility to make sure that
the new PPD files are reflected in the cache file that is used by Solaris Print Manager.
Using the ppdmgr utility to add a PPD file to the system provides more flexibility because you
can specify what label is used and where the file is stored. The -L and -R options of the ppdmgr
utility enable you to specify a label and repository of your own choosing. See “Specifying a PPD
File Label” on page 221. If you add a PPD files to a system by using the lpadmin -n command or
the ppdmgr utility and do not specify a label or repository, the PPD file is stored in the user label
directory within the user repository. Similarly, if the source path to the PPD file that you
provide is not from an existing PPD file label within an existing PPD file repository on the
system, then the file is copied to the user label within the user repository.
Specifying a PPD File Label
A PPD file label describes a grouping of PPD files and refers to a user-selected or default
directory name within a PPD file repository. When you use the ppdmgr utility to add a PPD file
to the system, you can optionally specify a label. Using labels allows for easier organization of
PPD files, which makes for easier identification of PPD files when you add or modify a printer
by using Solaris Print Manager.
You can also specify a file label when you request an update or a rebuild of the PPD cache file by
using the -u or the -r option . If you do not specify a label, the user default label is assigned to
the PPD file. If you request an update or a rebuild of the PPD cache file, the default label is all,
which specifies all PPD file repositories.
Chapter 9 • Administering Printers by Using the PPD File Management Utility (Tasks)
221
Overview of the PPD File Management Utility
Note – You cannot specify the all label when adding a PPD file to a system by using the ppdmgr
utility with the -a option. See “PPD File Labels” on page 279 for more information.
Specifying a PPD File Repository
You can specify a repository when adding a PPD file to a system by using the ppdmgr utility or
when requesting an update of the PPD cache file. A repository is a directory where PPD file
information is stored. More than one PPD file repository can exist on a system. PPD files that
are supplied by third-party vendors are stored in the vendor repository. PPD files that are added
by system administrators can be stored in the admin repository.
The following are locations where PPD files are stored on a system:
■
The PPD files that are delivered with the Solaris OS are stored in the system repository.
■
PPD files that are added manually by using the ppdmgr -a command or the lpadmin
-n command are stored in the user repository.
■
PPD files that are added manually by using the ppdmgr utility with the -R option are stored
in the repository that you specify with this option.
■
The all repository is used to specify all the repositories on a system. You can specify the all
repository when requesting an update or a rebuild of the PPD cache file by using the -u or -r
option of the ppdmgr command. If no repository is specified, the default repository is user.
For more information, see “How to Update or Rebuild the PPD Cache File by Using the
ppdmgr Utility” on page 228.
Note – You cannot specify the all repository when adding a PPD file to a system by using the
ppdmgr utility with the -a option. See “PPD File Repositories” on page 278 for more
information.
Locating PPD File Label and Repository Information in
Solaris Print Manager
The Printer Driver field in Solaris Print Manager now displays the PPD file label and the PPD
file repository abbreviation, in addition to the printer driver information. The addition of the
label and repository information assists in the selection of the correct printer driver. This
information is especially useful in situations where multiple PPD files with identical names are
located on a system, within various label directories and repositories.
For more information, see “Description of the Printer Driver Field in Solaris Print Manager” on
page 280.
222
System Administration Guide: Solaris Printing • January 2009
Using the PPD File Manager (ppdmgr) Utility
Using the PPD File Manager (ppdmgr) Utility
▼
How to Add a PPD File to a System by Using the ppdmgr
Utility
This procedure describes how to use the ppdmgr utility to add a new PPD file to the system. You
can also specify a PPD file label, PPD repository, or the source path of the PPD file, by using the
appropriate arguments with the ppdmgr -a command. Note that when you add a PPD file to the
system by using the ppdmgr command, the file is copied to the label and repository that you
specify and then compressed.
1
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see
“Configuring RBAC (Task Map)” in System Administration Guide: Security Services.
2
Add the PPD file to the system.
# ppdmgr -a ppd-file-path [ -L label ] [ -R repository ] [-w]
-a
Copies the PPD file that is specified in ppd-file-path to the PPD repository,
then updates the information in the cache file to reflect the change.
If the -L option is not specified, the default label that is assigned to the PPD file
is user.
If the -R option is not specified, the default repository that is assigned to the
PPD file is user.
ppd-file-path
Specifies the source path to the PPD file and the name of that file. This file is
used with the -a option to add a copy of ppd-file-path to the specified label
within the specified repository with the specified label. The ppdmgr utility
accepts a valid PPD file that has either a .ppd or .ppd.gz extension.
-L label
Specifies a PPD file label. The default label is user. Label names must contain
characters that are in the portable file name character set. Label names must
not begin with a hyphen (-) or contain a semicolon (:). Label names cannot
be a reserved label name.
The following label names are reserved and cannot be used with the -a option:
■
■
■
■
caches
ppdcache
manufaliases
all
Chapter 9 • Administering Printers by Using the PPD File Management Utility (Tasks)
223
Using the PPD File Manager (ppdmgr) Utility
-R repository
Specifies the name of a PPD file repository that represents one of the PPD file
installation locations. When using this option, one of the following PPD file
repositories can be specified:
■
■
-w
3
user (default)
admin
Displays the full path where the PPD file was copied. The -w option is only
valid if it is used with the -a option. Otherwise, this option is ignored.
Verify that the PPD file was added by using one of the following methods:
■
Check that the file is displayed in Solaris Print Manager:
a. Launch Solaris Printer Manager. See “How to Start Solaris Print Manager”on page 67.
b. Select Modify Printer Attributes (attached or network).
c. Select the printer for which you added the PPD file.
If the PPD file that you specified was added successfully, the information is displayed in
the Printer Driver field. See “Description of the Printer Driver Field in Solaris Print
Manager” on page 280.
Example 9–1
Adding a PPD File to a System by Using the ppdmgr utility
This example shows how to add a PPD file, myHPprinter.ppd, to the system.
Note that in this example and the examples that follow the path that is specified varies.
# ppdmgr -a /net/somesystem/myHPprinter.ppd
The path to where the copy of the PPD file can be found on the system is
/var/lp/ppd/user/HP/myHPprinter.ppd.gz.
Using this command, with the -a option, copies the file to the user label within the user
repository.
Example 9–2
Adding a PPD File to a System With a Specified Label by Using the ppdmgr utility
This example shows how to add the PPD file myHPprinter.ppd, with the specified label, Photos,
to the system.
# ppdmgr -a /net/somesystem/myHPprinter.ppd -L Photos
224
System Administration Guide: Solaris Printing • January 2009
Using the PPD File Manager (ppdmgr) Utility
The path to where the copy of the PPD file can be found on the system is
/var/lp/ppd/Photos/HP/myHPprinter.ppd.gz.
Using this command, with the -a and the -L options, copies the PPD file to the Photos label
within the user repository.
Example 9–3
Adding a PPD File to a System to a Specified Repository by Using the ppdmgr Utility
This example shows how to add a PPD file, myHPprinter.ppd, to the admin repository on a
system.
# ppdmgr -a /net/somesystem/myHPprinter.ppd -R admin
The path to where the copy of the PPD file can be found on the system is
/usr/local/share/ppd/user/HP/myHPprinter.ppd.gz.
Using this command with the -a and -R options, copies the file to the user label directory
within the admin repository.
Example 9–4
Adding a PPD File to a System With a Specified Label to a Specified Repository by
Using the ppdmgr Utility
This example shows how to add a PPD file, myHPprinter.ppd, to a system, specifying the
Photos label and the admin repository.
# ppdmgr -a /net/somesystem/myHPprinter.ppd -L Photos -R admin
The path to where the copy of the PPD file can be found on the system is
/usr/local/share/ppd/Photos/HP/myHPprinter.ppd.gz.
Using this command with the -a, -L and -R options copies the file to the Photos label within the
admin repository.
Example 9–5
Adding a PPD File to a System and Displaying the Full Path to Where the File Was
Copied by Using the ppdmgr Utility
This example shows how to add a PPD file, myHPprinter.ppd, to a system, displaying the
destination path of the PPD file. Use the ppdmgr command with this option to determine where
on the system the PPD file was copied.
# ppdmgr -a /net/somesystem/myHPprinter.ppd -w
The path to where the copy of the PPD file can be found on the system is
/var/lp/ppd/user/HP/myHPprinter.ppd.gz.
Chapter 9 • Administering Printers by Using the PPD File Management Utility (Tasks)
225
Using the PPD File Manager (ppdmgr) Utility
Using this command with the -a and -w options copies the specified file to the user label within
the user repository.
The -w option is only valid when used in combination with the -a option. Otherwise, this
option is ignored.
See Also
▼
For a detailed description of the ppdmgr command-line options and for guidelines on adding
PPD files, see “Description of the Command-Line Options for the ppdmgr Utility” on page 282.
How to Add a PPD File to a System by Using the
lpadmin -n Command
This procedure shows how to use the lpadmin command to modify an existing print queue
configuration to associate a specified PPD file with the print queue.
If you use the lpadmin command with the -n option to add a PPD file to a system, you cannot
specify a label or a repository. Instead, the user label is assigned to the file, and the file is then
copied to the user repository. If you want to specify a user-defined label or repository, use the
ppdmgr utility to add the PPD file. See “How to Add a PPD File to a System by Using the ppdmgr
Utility” on page 223.
1
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see
“Configuring RBAC (Task Map)” in System Administration Guide: Security Services.
2
Modify an existing print queue by associating it with a PPD file.
# lpadmin -p print-queue -n ppd-file-path
226
lpadmin
Administrative command that is used to configure the LP print service.
-p print-queue
Specifies the print queue. Note that the print queue sometimes referred to as
the printer-name.
-n
Copies the PPD file that is specified in the ppd-file-path to the default user
label directory that is located within the default user PPD file repository.
ppd-file-path
Specifies the source path to the PPD file and the name of that file. This file is
used with the -a option to add a copy of ppd-file-path to the system to the
specified label within the specified repository. The ppdmgr utility accepts a
valid PPD file with either a .ppd or .ppd.gz extension.
System Administration Guide: Solaris Printing • January 2009
Using the PPD File Manager (ppdmgr) Utility
3
Verify that the PPD file was added by using one of the following methods:
■
Check that the file is displayed in Solaris Print Manager:
a. Launch Solaris Printer Manager. See “How to Start Solaris Print Manager”on page 67
b. Select Modify Printer Attributes (attached or network).
c. Select the print queue that you specified in Step 2 of this procedure.
If the PPD file that is associated with the print queue was added successfully, it is
displayed in the Printer Driver field. See “Description of the Printer Driver Field in
Solaris Print Manager” on page 280.
■
Use the lpstat command to verify the PPD file was added:
% lpstat -p print-queue -l
If the PPD file was added to the print queue successfully, the PPD file name is included in the
PPD field of the lpstat command's output.
Example 9–6
Adding a PPD File to an Existing Print Queue by Using the lpadmin -n Command
This example shows how to modify the print queue, printer1, to associate it with a copy of the
specified PPD file.
# lpadmin -p printer1 -n /path/mynewHPppdfile.ppd
The specified PPD file is stored in /var/lp/ppd/user/HP/mynewHPppdfile.ppd.gz.
Updating the PPD Cache File
An update of the PPD cache file on a system updates the existing information in the PPD cache
file.
You might the request and update of the PPD cache file on a system in the following instances:
■
If you add a PPD file to the system by using the pkgadd command.
■
If you copied a PPD file to a label directory, within a known PPD file repository manually.
Any changes that you make are reflected in Solaris Print Manager after the update has
completed.
Chapter 9 • Administering Printers by Using the PPD File Management Utility (Tasks)
227
Using the PPD File Manager (ppdmgr) Utility
Rebuilding the PPD Cache File
A rebuild of the PPD cache file removes the existing cache and builds a completely new cache.
This process can be time-consuming, especially if many PPD files are on the system. Therefore,
only request a rebuild of the PPD cache file in troubleshooting situations. For guidelines that
pertain to updating and rebuilding the PPD cache file, see “Description of the Command-Line
Options for the ppdmgr Utility” on page 282.
▼
How to Update or Rebuild the PPD Cache File by Using
the ppdmgr Utility
This procedure describes how to update or rebuild the PPD cache file by using either the -u or
the -r option of the ppdmgr utility.
■
■
To update the PPD cache file, use the ppdmgr command with the -u option.
To rebuild the PPD cache file, use the ppdmgr command with the -r option.
1
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see
“Configuring RBAC (Task Map)” in System Administration Guide: Security Services.
2
Update or rebuild the PPD cache file to reflect any recent changes.
# ppdmgr -u | -r [ -R repository ] [ -L label ]
-u
Updates the PPD cache file with information about the PPD file, or files, that
are assigned to the specified label within the specified repository. The default
label is user. The default repository is also user. If no changes are identified,
no changes are made to the cache file.
-r
Removes the existing PPD cache file, then rebuilds the file with the PPD file
information for the PPD file, or files, within the specified label.
If no label is specified, the default label is user, within the specified repository.
If a repository is not specified, the default repository is also user.
Under normal circumstances, you do not need to request a rebuild of the PPD
cache file. Use this option only if you suspect that the PPD cache file has
become corrupted.
-R repository
Specifies a PPD file repository to update. You can specify one of the following
PPD file repositories:
■
■
228
admin
all (Specifies all available PPD file repositories on a system)
System Administration Guide: Solaris Printing • January 2009
Using the PPD File Manager (ppdmgr) Utility
■
■
■
-L label
system
user (default)
vendor
Specifies a PPD file label.
The default label is user. Label names must contain characters that are in the
portable file name character set. Label names must not begin with a hyphen
(-) or contain a semicolon (:). Label names cannot be a reserved label name.
The following label names are reserved:
■
■
■
■
3
caches
ppdcache
manufaliases
all
Verify that the PPD file was added by using one of the following methods:
■
Check that the file is displayed in Solaris Print Manager:
a. Launch Solaris Printer Manager. See “How to Start Solaris Print Manager”on page 67.
b. Select Modify Printer Attributes (attached or network).
c. Select the print queue for which you added the PPD file in Step 2 of this procedure.
If the PPD file that you specified was added successfully, the information is displayed in
the Printer Driver field. See “Description of the Printer Driver Field in Solaris Print
Manager” on page 280.
■
Use the lpstat command to verify the PPD file was added:
% lpstat -p printer-name -l
If the PPD file was added to the system successfully, the PPD file name is included in the
PPD field of the lpstat command's output.
Example 9–7
Updating the PPD Cache File by Using the ppdmgr Utility
This example shows how to update the PPD cache file to reflect information from the PPD files
that are assigned in all the labels within the user repository.
# ppdmgr -u
This example shows how to update the PPD cache file to reflect information from the PPD files
that are assigned in the Photos label within the user repository.
Chapter 9 • Administering Printers by Using the PPD File Management Utility (Tasks)
229
Using the PPD File Manager (ppdmgr) Utility
# ppdmgr -u -L Photos
This example shows how to update the PPD cache file to reflect the information from the PPD
files that are assigned in all the labels within the admin repository.
# ppdmgr -u -R system
This example shows how to update the PPD cache file to reflect information from the PPD files
that are assigned in the Photos label within the admin repository.
# ppdmgr -u -L Photos -R admin
Managing the ppd-cache-update Service
The Service Management Facility (SMF) service for updating the PPD cache file,
application/print/ppd-cache-update, is run once during system reboot to ensure that
modifications made to any PPD file repositories on a system are reflected in the ppdcache file.
The service instance is svc:/application/print/ppd-cache-update. This service is enabled
by default when you install the Solaris software. To enable or disable the service, use the svcadm
command.
Note – During a software installation or an upgrade, the cache file entries are generated for all
PPD files that are delivered to the system repository, /var/lp/ppd. As a result, when the system
reboots, it might take longer for the service to make the transition to an online state.
For instructions, see “How to Enable or Disable the ppd-cache-update Service” on page 230.
For information about using SMF and the svcadm command, see the smf(5) and svcadm(1M)
man pages.
▼
How to Enable or Disable the ppd-cache-update
Service
1
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see
“Configuring RBAC (Task Map)” in System Administration Guide: Security Services.
2
To enable or disable the application/print/ppd-cache-update service, type:
# svcadm enable|disable application/print/ppd-cache-update
230
System Administration Guide: Solaris Printing • January 2009
Using the PPD File Manager (ppdmgr) Utility
3
To verify that the service is enabled or disabled, type:
% svcs application/print/ppd-cache-update
If the service is enabled, the output is as follows:
% svcs application/print/ppd-cache-update
STATE
STIME
FMRI
online
Apr_26 svc:/application/print/ppd-cache-update:default
If the service is disabled, the output is as follows:
% svcs application/print/ppd-cache-update
STATE
STIME
FMRI
diabled
Apr_26 svc:/application/print/ppd-cache-update:default
See Also
For step-by-step instructions on using the ppdmgr utility with the -u option to update the PPD
cache file, see “How to Update or Rebuild the PPD Cache File by Using the ppdmgr Utility” on
page 228.
Chapter 9 • Administering Printers by Using the PPD File Management Utility (Tasks)
231
232
10
C H A P T E R
1 0
Setting Up and Administering Printers From the
Desktop (Tasks)
This chapter describes how to set up and manage printers by using the OpenSolarisTM Print
Manager graphical user interface (GUI). For more information about using the OpenSolaris
Print Manager, see the online help.
Note – The OpenSolaris Print Manager GUI and the Solaris Print Manager Java-based GUI are
two different applications. Both applications can be accessed from the desktop and can be used
to manage printers. Using Solaris Print Manager requires superuser privileges. For information
about using Solaris Print Manager, see Chapter 5, “Administering Printers by Using Solaris
Print Manager and LP Print Commands (Tasks).”
This is a list of information in this chapter:
■
■
■
■
■
“Introduction to the OpenSolaris Print Manager” on page 234
“Managing Network Device Discovery Services (Task Map)” on page 235
“Managing Printers and Printer Queues (Task Map)” on page 241
“Managing Printer Groups and Print Jobs (Task Map)” on page 250
“Managing Print Manager and Printer Preferences (Task Map)” on page 255
For information about how to set up printing services see Chapter 3, “Setting Up Printing
Services (Tasks).”
For information about setting up printers, see Chapter 4, “Setting Up Printers (Tasks)”
For information about how to administer printers after you have set them up, see Chapter 5,
“Administering Printers by Using Solaris Print Manager and LP Print Commands (Tasks).”
For overview information about printing services and printers, see Chapter 1, “Introduction to
Printing in the Solaris Operating System.”
233
Introduction to the OpenSolaris Print Manager
Introduction to the OpenSolaris Print Manager
The OpenSolaris Print Manager application is a GUI that you can use to manage local and
remote printer queues, printer groups, and print jobs from the desktop. Print Manager enables
you to perform many aspects of printer administration. You can launch the OpenSolaris Print
Manager from the Main Menubar on the desktop panel. See “Getting Started With the
OpenSolaris Print Manager” on page 242 for instructions.
When you launch the Print Manager application, the Print Manager window opens. In some
instances, you can open the Print Manager window by clicking the panel notification icon that
appears in the desktop panel or by choosing Printers from the panel notification icon's context
menu. From here, you can create and manage printer queues, groups, and jobs, as well as view
or change printer preferences and perform searches. See “About the Print Manager Window”
on page 243.
When you plug a new USB printer into your computer, or when a new network printer is
discovered by the system, a notification is displayed on the desktop and a configuration dialog
automatically opens. This dialog allows you to finish configuring the new printer. For more
information about the auto-discovery feature, see “Adding Newly Discovered Printers From the
Desktop” on page 236.
Common Tasks That You Can Perform With
OpenSolaris Print Manager
In an office:
■
■
■
■
■
Add a new local or network printer
Print to a preconfigured network printer.
Customize and change your printer settings.
Monitor your print jobs
Cancel your print jobs
At home or on the road:
234
■
At home, plug in and configure a USB printer.
■
In the office, print to network printers, depending on your location and the task.
■
At customer site, identify and print to nearby network printer with suitable capabilities.
■
On the road, submit print jobs to an offline printer queue.
■
Monitor or cancel your print jobs
System Administration Guide: Solaris Printing • January 2009
Managing Network Device Discovery Services (Task Map)
Managing Network Device Discovery Services (Task Map)
Task
Description
For Information
Initiate the HAL add-on module
for network device discovery.
Before the system can actively scan
the network for network-attached
printers, you must first initiate the
HAL add-on module that discovers
devices on a network. You can
enable this service from the
desktop or by using the svcadm
command.
“How to Enable the Network
Device Discovery Service” on
page 238
You might need to obtain
information about printers that
have been discovered by your
system. You can obtain this
information by using the
command line. The output shows
all of the devices that have been
discovered by the system.
“How to Determine Which
Printers Are Known to the System”
on page 240
Obtain information about printers
that are discovered by the system
by using the command line.
“How to Initiate the Network
Device Discovery Services by Using
SMF” on page 239
How Auto-Discovery of Devices Works
Discovery of devices, including printers, is accomplished through the Hardware Abstraction
Layer (HAL) device registry (database) component. HAL uses D-BUS messaging to notify
interested applications about changes to its registry. D-BUS is a messaging bus that passes
messages between applications and broadcasts signals that interested applications are able to
detect. This messaging service is used by HAL and a number of other applications. HAL
provides the framework for device discovery and notification of device configuration changes
on a system. In the Solaris release, this support has been extended to detecting printers that are
added or removed from a local system.
The HAL daemon, hald, provides a view of devices that are attached to a local system. This view
is updated automatically, as a system's hardware configuration changes, by hotplugging or by
other methods. HAL's internal database, also called the HAL device tree, is where device
information is stored and maintained. HAL devices are uniquely identified in the HAL database
through a Universal Device Identifier (UDI). This database is populated with properties of each
device in the HAL database.
The automatic printing configuration feature works with the HAL daemon by listening for
sysevents. When a hotplug-capable printer is added to a system, HAL creates a new node in the
HAL device tree, as shown in the following example:
/org/freedesktop/Hal/devices/pci_0_0/pci1022_74606/pci108e_534d_3_1/printer_2_0_if0/print
Chapter 10 • Setting Up and Administering Printers From the Desktop (Tasks)
235
Managing Network Device Discovery Services (Task Map)
When the device node has been successfully registered in the HAL database, HAL signals
interested applications that the device is available. Device removal works similarly.
For more information about HAL, see http://opensolaris.org/os/project/tamarack/.
The network device discovery components are standard service interfaces that are offered by
classes of network-attached devices. This module is capable of actively scanning a network for
new devices. The service is directly controlled through the svcadm interface. For more
information, see the svcadm(1M) man page. svcadm(1M). To determine the device type, an
active scan is performed through a Simple Network Management Protocol version 1 (SNMPv1)
broadcast. Be default, the SNMP based network-attached printer discovery service probes the
network for printers every 60 seconds. This property is configurable. See “Configuring
Auto-Discovery Settings for Network&hyphen;Attached Printers” on page 259. During this
active scan, SNMP determines the device type by attempting to connect to the device.
Note – Only active device discovery is available in this Solaris OS. Passive device discovery
through the Multicast DNS (mDNS) is not available.
Adding Newly Discovered Printers From the Desktop
You can use OpenSolaris Print Manager to configure newly discovered directly attached or
newly discovered network-attached printers from the desktop. By default, the system
automatically discovers directly attached USB printers. The system also discovers
network-attached printers, if the network device discovery service has been enabled. See “How
to Enable the Network Device Discovery Service” on page 238.
■
Adding a Directly Attached USB Printer
When a new USB printer is connected to the system and discovered , the Add Printer Queue
dialog, populated with printer configuration data, automatically opens on the desktop.
From here, you can modify the existing configuration information and then create the new
printer queue. After the new printer queue is created, it appears in the Queue pane of the
Print Manager window. For more information, see “How To Set Up Auto-Discovered
Printers by Using the OpenSolaris Print Manager” on page 244.
■
Adding a Network-Attached Printer
Network-attached printers are auto-discovered the same way as directly attached printers.
This support is designed and implemented through a HAL add-on module,
/usr/lib/hal/hald-addon-network-discovery. When a new network-attached printer is
discovered by the system, a printer queue is automatically created. At the same time, a
notification message is displayed next to a printer icon located in the panel notification area
of the desktop. Clicking this notification message launches the OpenSolaris Print Manager
application. From here, you can view or change the configuration data for the newly
discovered network-attached printer. To do so, select the printer queue in the Queue pane
236
System Administration Guide: Solaris Printing • January 2009
Managing Network Device Discovery Services (Task Map)
of the Print Manager window and choose Properties from the Printer menu. For more
information, see “How To Set Up Auto-Discovered Printers by Using the OpenSolaris Print
Manager” on page 244.
To utilize the network device discovery feature, the following conditions must be met:
■
The network device discovery service, network/device-discovery/printers:snmp,
must be enabled.
You can enable this service from the desktop or by using SMF commands. For more
information, see “Managing Network Device Discovery Services (Task Map)” on
page 235.
■
Network-attached printers must support SNMP queries, which means the device must
be “known” to the system.
For more information, see “How to Determine Which Printers Are Known to the
System” on page 240.
■
Network-attached printers must be on the same subnet as the system that is querying the
network.
The service is not capable of discovering network-attached printers that are more than
one hop away.
■
OpenSolaris Print Manager Preferences for desktop notifications of network printing
events must be turned on.
For more information, see “Managing Print Manager and Printer Preferences” on
page 256.
Note – In the OpenSolaris 2008.11 release, attempts to enable the HAL add-on module from the
desktop or by using SMF commands, cause the system to revert to maintenance state. This
problem does not occur if you are running a supported Solaris Express Community Edition
release. To enable this service in the OpenSolaris 2008.11 release, you must first install the
SUNWSmmgr package. For detailed instructions, go to
http://www.opensolaris.org/os/project/indiana/resources/relnotes/200811/x86/.
Notification of Printing Events in the Desktop
The panel notification icon is a printer icon that is displayed in panel notification area of the
desktop to notify you when:
■
■
One or more print jobs are processing
One or more printers have been discovered
Chapter 10 • Setting Up and Administering Printers From the Desktop (Tasks)
237
Managing Network Device Discovery Services (Task Map)
To get more information, click the printer icon.
■
If one or more print jobs are processing normally, a Job List window opens for each printer
queue that has a pending print job.
■
If one or more printer queues have been discovered, the Printer Queue Properties dialog or
the Print Manager application opens, allowing you to check the configuration of the new
printer queues.
Note – Notification messages that are not manually closed disappear after 5 seconds.
Preferences for notification messages can be viewed and changed in the Printer Preferences
dialog. For more information, see “Managing Print Manager and Printer Preferences” on
page 256.
Panel Notification Icon Context Menu
The following table describes the menu items that are available when you right-click the panel
notification icon.
When Print Jobs Are Processing Normally
When Printers/Queues Are Discovered
Show Queue: Opens a Job List window for each
queue in which you have a pending print job.
Open Print Manager: opens the Print Manager
window, with the All Printers group selected, and all
new queues selected within the group.
queuename Properties: Opens the associated Printer
Properties window.
queue-name Properties: Opens the associated Printer
Properties window. Hidden if more than one new
queue was discovered.
Print Manager Preferences: Opens the Print
Manager Preferences dialog.
Print Manager Preferences: Opens the Print Manager
Preferences dialog.
For more information about viewing or changes preferences for notifications, see “Managing
Print Manager and Printer Preferences” on page 256.
▼
How to Enable the Network Device Discovery Service
By default, the OpenSolaris Print Manager automatically discovers and configures USB printers
that are directly connected to your system. Print Manager also has the ability to discover and
configure printers that are on a network after the network device discovery service has been
enabled.
238
System Administration Guide: Solaris Printing • January 2009
Managing Network Device Discovery Services (Task Map)
Note – Note that in the OpenSolaris 2008.11 release, this service cannot be enabled from the
desktop until you install the SUNWSmmgr package. If you attempt to enable the service before
installing this package, the system reverts to maintenance state. For detailed instructions, go to
http://www.opensolaris.org/os/project/indiana/resources/relnotes/200811/x86/.
1
From the Main Menubar, select:
System-> Administration-> Services
The Services settings window is displayed.
2
To initiate the device discovery add-on module, select the Hardware Abstraction Layer
network-attached printer discovery (network/device-discovery/printers:snmp) option.
3
Save your changes.
To disable auto-discovery of devices, deselect this option.
▼
How to Initiate the Network Device Discovery Services
by Using SMF
This procedure describes how to initiate, as well as disable, the network
device-discovery/printers service (the HAL add-on module) by using the SMF.
1
Become superuser or assume an equivalent role.
2
Determine whether the SMF device-discovery/printers service is online.
# svcs device-discovery/printers
If the service is online, the following output is displayed:
STATE
online
STIME
FMRI
13:30:22 svc:/network/device-discovery/printers:snmp
If the service is offline, the following output is displayed:
STATE
disabled
3
STIME
Dec_12
FMRI
svc:/network/device-discovery/printers:snmp
To enable or disable the service instance, use the appropriate command.
■
To enable the service, type:
# svcadm enable printers:snmp
Chapter 10 • Setting Up and Administering Printers From the Desktop (Tasks)
239
Managing Network Device Discovery Services (Task Map)
■
To disable the service, type:
# svcadm disable printers:snmp
4
Verify that the HAL add-on module has been enabled or disabled.
If the module has been successfully enabled, the output is as follows:
# svcs device-discovery/printers
STATE
STIME
FMRI
online
13:30:22 svc:/network/device-discovery/printers:snmp
If the module has been successfully disabled, the output is as follows:
# svcs device-discovery/printers
STATE
STIME
FMRI
disabled
Dec_12 svc:/network/device-discovery/printers:snmp
▼
How to Determine Which Printers Are Known to the
System
●
On the system that you want to get information about discovered printers, type:
system% hal-find-by-capability --capability printer
The output shows you all of the printers that have been discovered by the system.
■
To obtain additional details about discovered printers, type:
zsh% for udi in $(hal-find-by-capability --capability printer) ;
do ; lshal --show $udi --long ; done
Or, if you are using a shell that does not support the use of $(command), type:
sh% for udi in ‘hal-find-by-capability --capability printer‘ ;
do ; lshal --show $udi --long ; done
Example 10–1
Determining Which Printers Are Known to the System
This example shows all of the devices discovered by the system, snoopy.
snoopy% hal-find-by-capability --capability printer
/org/freedesktop/Hal/devices/pci_0_0/pci1022_7460_6/pci108e_534d_3_1/printer_2_printer_0
snoopy%
240
System Administration Guide: Solaris Printing • January 2009
Managing Printers and Printer Queues (Task Map)
Example 10–2
Obtaining Additional Details about Printers That Are Known to the System
zsh% for udi in $(hal-find-by-capability --capability printer) ; \
do ; lshal --show $udi --long ; done udi = \
’/org/freedesktop/Hal/devices/pci_0_0/pci1022_\
7460_6/pci108e_534d_3_1/printer_2_printer_0’
info.claimed.uid = 24656 (0x6050) (int)
info.claimed.service = ’gnome-volume-manager’ (string)
info.claimed = true (bool)
printer.commandset = {’PJL’, ’MLC’, ’BIDI-ECP’, ’PCLXL’, ’PCL’,
’PDF’, ’PJL’, ’MIME’, ’POSTSCRIPT’} (string list)
printer.description = ’Hewlett-Packard color LaserJet 4650’ (string)
printer.serial = ’00000D920NSL’ (string)
printer.product = ’hp color LaserJet 4650’ (string)
printer.vendor = ’Hewlett-Packard’ (string)
printer.device = ’/dev/printers/1’ (string)
info.capabilities = {’printer’} (string list)
info.category = ’printer’ (string)
info.solaris.driver = ’usbprn’ (string)
solaris.devfs_path =
’/pci@0,0/pci1022,7460@6/pci108e,534d@3,1/printer@2:printer’ (string)
info.product = ’printer’ (string)
info.udi =
’/org/freedesktop/Hal/devices/pci_0_0/pci1022_7460_6/pci108e_534d_3_1/printer_2_printer_0’...)
info.parent =
’/org/freedesktop/Hal/devices/pci_0_0/pci1022_7460_6/pci108e_534d_3_1/printer_2_if0_0’...)
zsh%
Managing Printers and Printer Queues (Task Map)
Task
Description
Launch the OpenSolaris Print
Manager GUI.
You can set up and manage printer “Getting Started With the
queues, printer groups, and print
OpenSolaris Print Manager” on
jobs by using the OpenSolaris Print page 242
Manager. This application is
accessible from the desktop.
Chapter 10 • Setting Up and Administering Printers From the Desktop (Tasks)
For Information
241
Getting Started With the OpenSolaris Print Manager
Task
Description
For Information
Configure newly discovered
printers by using the OpenSolaris
Print Manager.
When the system discovers a new
“How To Set Up Auto-Discovered
printer, you are notified that the
Printers by Using the OpenSolaris
printer has been discovered. In
Print Manager” on page 244
addition, the printer queue process
begins. The Add Printer Queue
dialog enables you to check and
change printer configuration
information. This dialog is
displayed on the desktop when a
new printer is discovered.
Manually set up printers by using
the OpenSolaris Print Manager.
If, for any reason, a printer is not
discovered by the system, you use
manually add the printer by using
the OpenSolaris Print Manager.
“How to Manually Add a Printer by
Using the OpenSolaris Print
Manager” on page 246
Check or change preferences for an You can view or change
existing printer queue.
preferences for an existing printer
queue by using the OpenSolaris
Print Manager.
“How to View or Change Printer
Queue Properties” on page 247
Delete a printer queue.
You can delete existing printer
queues in the Queue pane of the
Print Manager window.
“How to Delete a Printer Queue”
on page 249
Pause or resume a printer queue.
You can pause and resume printer
queues in the Queue pane of the
Print Manager window.
“How to Pause or Resume a Printer
Queue” on page 249
Getting Started With the OpenSolaris Print Manager
From theMain Menubar on the desktop panel, choose:
System > Administration > Print Manager
The Print Manager application launches, and the Print Manager window opens.
242
System Administration Guide: Solaris Printing • January 2009
Setting Up Printers by Using the OpenSolaris Print Manager
About the Print Manager Window
The Print Manager window is divided into three panes: Queue, Group, and Job.
■
Queue Pane (Top right pane)
Shows the printers and printer queues in the currently-selected group and their current
status. When you launch Print Manager, the Job pane for the default printer queue is
displayed. To display the Job pane for another printer queue, select the printer in the Queue
pane.
■
Group Pane (Left pane)
Allows you to organize printers into arbitrary collections, or by criteria, such as name,
location, manufacturer and capability.
■
Job Pane (Bottom right pane when a printer queue is selected)
Shows the status of print jobs in the currently-selected printer queue.
Tip – You can have more than one Print Manager window open at any given time. Having more
than one Print Manager window open at the same time can be useful to compare the contents of
different groups or to drag and drop (move or copy) printer queues between various windows.
You can open a new Print Manager window in one of the following ways:
■
■
■
By choosing New Window from the View menu.
By double-clicking a group in the Group pane.
By right-clicking in the Group pane, then choosing Open in New Window.
When you close a single Print Manager window, any other open Print Manager windows
remain open until you manually close them or quit the Print Manager application.
Setting Up Printers by Using the OpenSolaris Print Manager
When you connect a new local USB printer to your computer, the printer is auto-discovered,
and the Add Printer Queue dialog opens automatically. This dialog contains configuration
information about the printer. If you choose, you can provide additional configuration
information for the printer in this dialog.
The Add Printer Queue dialog allows you to check or change the configuration information for
a newly discovered local or network printer. You can also use this dialog to manually add a
printer that, for any reason, was not automatically discovered.
The Add Printer Queue dialog is opened from the Printer menu or by clicking the Add icon on
the toolbar. The Add Printer Queue dialog looks and behaves almost the same as the Printer
Queue Properties dialog, with a few minor differences.
Chapter 10 • Setting Up and Administering Printers From the Desktop (Tasks)
243
Setting Up Printers by Using the OpenSolaris Print Manager
Note – In the Print Manager Preferences dialog, you can turn off the automatic appearance of the
configuration dialog when you connect a new local USB printer.
When a new network printer is auto-discovered, a printer queue is automatically created for the
new printer. At the same time, a notification message appears on the desktop in the panel
notification area. Clicking the message launches Print Manager. From here, you can customize
the configuration information for the new network printer queue.
To enable the automatic detection of network printers, first select the Auto-detect network
printers option in the Network tab of the Print Manager Preferences dialog.
▼
How To Set Up Auto-Discovered Printers by Using the
OpenSolaris Print Manager
Use this procedure to complete the setup of a new local or a new network printer queue that has
been auto-discovered.
1
244
To configure the new printer queue, enter all the appropriate information for the printer in the
dialog.
System Administration Guide: Solaris Printing • January 2009
Setting Up Printers by Using the OpenSolaris Print Manager
a. In the Connection section of the dialog, select the connection type from the drop-down
menu.
If you are adding a local printer queue, the connection type is Local Device.
b. Enter the name or IP address of the print server. (Applies to network printer queues only)
Note – For a local printer queue, no print server or IP address is required.
2
In the Printer Details section of the dialog, enter all the appropriate information.
3
To set the printer queue as the default, select the Set as default printer queue check box.
4
To add the new printer queue, click Add.
The new printer queue is displayed in the Queue pane of the Print Manager window.
5
(Optional) To print a test page, click the Print Test Page button.
Chapter 10 • Setting Up and Administering Printers From the Desktop (Tasks)
245
Setting Up Printers by Using the OpenSolaris Print Manager
▼
How to Manually Add a Printer by Using the
OpenSolaris Print Manager
Use this procedure to manually add a new printer queue for a local or a network printer, if for
some reason, the printer is not auto-discovered.
1
From the Printer Menu, choose Add Printer Queue.
The Add Printer Queue dialog opens.
2
To configure the new printer queue, enter all the appropriate information for the printer in the
dialog:
a. In the Connection section of the dialog, select the connection type from the drop-down
menu.
If you are adding a local printer queue, the connection type is Local Device.
b. Enter the name or IP address of the print server. (Applies to network printer queues only)
Note – For local printer queues, no print server or IP address is required.
3
246
In the Printer Details section of the dialog, enter all the appropriate information.
System Administration Guide: Solaris Printing • January 2009
Setting Up Printers by Using the OpenSolaris Print Manager
4
To set the printer as the default, select the Set Printer as Default checkbox.
5
To add the printer queue, click Add.
The new printer queue is displayed in the Queue pane of the Print Manager window.
6
(Optional) To print a test page, click the Print Test Page button.
Managing Printer Queues
The Print Manager Queue pane lists all the printers in the currently selected group. You can
manage printer queues in the Queue pane of the Print Manager window or from the
application's Printer menu.
The Queue pane shows the type, name, and current status of each printer queue. The default
printer queue is marked, if the queue is in the currently-selected group. Double-clicking a
printer queue icon opens its job list in a new Job List window, where you can view the status of
any pending print jobs.
From the View menu, you can choose to view the printer queues in the Queue pane as icons or
as a list.
From the Sort by menu item, you can choose from the following sort options:
▼
Name
Sorts printer queues by name, in the locale's sort order. This is the default
sort order.
Description
Sorts printer queues by description, in the locale's alphabetical order.
Status
Sorts printer queues by Ready printers first (alphabetical), then by printers
with one or more pending print jobs.
Number of Jobs
Sorts printer queues by number of pending print jobs, from lowest to
highest.
How to View or Change Printer Queue Properties
The properties dialog for a printer queue allows you to edit the properties of an existing printer
queue. Open this dialog from the Properties menu item in the Printer menu. This dialog looks
and behaves almost the same as the Add Printer Queue dialog.
1
In the Queue pane, select the printer queue in which to view or change properties.
2
From the Printer menu, choose Properties.
The properties dialog for the printer queue is displayed.
Chapter 10 • Setting Up and Administering Printers From the Desktop (Tasks)
247
Setting Up Printers by Using the OpenSolaris Print Manager
■
3
248
You can also right-click the printer, then choose Properties from the popup menu that is
shown.
To change settings for the printer queue, type or select the new information, then click OK.
Type
Connection type: Internet Printing Protocol (IPP), Remote IPP, Line
Printer Daemon (LPD), Remote LPD, Socket or Local Device
Printer Name or IP
Hostname or IP address of the remote printer. (IPP, LPD, Socket only)
Print Server
Hostname or IP address of the print server. (Remote IPP, Remote LPD
only)
Queue Name
Name of the remote printer queue. (IPP, Remote IPP, LPD, Remote LPD
only)
Port
Port number through which to communicate with the printer queue,
default = 9100. (Socket only)
Device
Path to the local printer device, default = /dev/printers/0. (Local
Device only)
Local queue name
Local name for the printer queue.
Description
Optional text description of the printer queue.
Manufacturer
List of printer manufacturers for which PostScript Printer Description
(PPD) files are installed.
Model
List of printer models that are available for the selected manufacturer.
System Administration Guide: Solaris Printing • January 2009
Setting Up Printers by Using the OpenSolaris Print Manager
Note – The printer manufacturer and model is discovered. If the exact
model is not available, a similar model is provided.
Driver
List of drivers that are available for the selected printer model.
Note that this field is blank until you have entered the minimum amount
of information about the printer queue.
To print a test page, click the Print Test Page button.
To add the printer queue, click the OK button.
To set the printer queue as the default in the application print dialogs, select the Set as default
printer queue checkbox.
Note – Some printer queue settings cannot be changed after a printer queue has been created.
▼
How to Delete a Printer Queue
To permanently delete a printer queue, you must first select the All Printers group in the Group
pane. If you delete a printer queue when another printer group is selected, the queue is deleted
only from that printer group.
1
In the Group pane of the Print Manager window, select the All Printers group.
■
To delete a printer queue from a specific printer group only, select the group from which to
delete the queue.
2
In the Queue pane, select the printer queue that you want to delete.
3
From the Edit menu, choose Delete.
■
4
▼
You can also right-click the printer, then choose Delete from the submenu that is shown.
To delete the printer, click Yes in the confirmation alert that is displayed. To cancel the operation,
click No.
How to Pause or Resume a Printer Queue
Pausing a printer queue suspends the processing of any documents for the queue.
Chapter 10 • Setting Up and Administering Printers From the Desktop (Tasks)
249
Managing Printer Groups and Print Jobs (Task Map)
Note – You can only pause printer queues that you own.
1
In the Queue pane, select the printer queue you want to pause.
2
From the Printer menu, choose Pause.
The queue icon and status text are updated to indicate the queue is online, but that processing of
the queue has been paused.
3
To resume processing of the printer queue, from the Printer menu, choose Resume.
The Resume menu item is only available when a printer queue is paused.
Managing Printer Groups and Print Jobs (Task Map)
TABLE 10–1
250
Managing Printer Groups and Print Jobs by Using the OpenSolaris Print Manager
Task
Description
Create a new printer group.
You can create custom printer
“How to Create a New Printer
groups that contain printers that
Group” on page 252
meet various criteria. Printer
groups are created and managed in
the Group pane of the Print
Manager window.
Create a new search group.
Search groups are printer groups
“How to Create a New Search
that you create, based on the results Group” on page 252
of a search.
Create a new search group from
filtered data.
You can create a new search group
by using a filter in the Queue Pane
of the Print Manager. A search
group created in this manner
contains only those printers that
meet the search criteria for the
filter.
“How to Create a New Search
Group by Using a Queue Pane
Filter” on page 253
View or change properties of an
existing search group.
You can view or change the
properties of an existing search
group that you created.
“How to View or Change an
Existing Search Group's
Properties” on page 253
Delete a printer group.
You can use the OpenSolaris Print “How to Delete a Printer Group”
Manager to delete printer groups
on page 253
that you have created. Printer
groups are managed in the Group
pane of the Print Manager window.
System Administration Guide: Solaris Printing • January 2009
For Information
Managing Printer Groups
Managing Printer Groups and Print Jobs by Using the OpenSolaris Print Manager
(Continued)
TABLE 10–1
Task
Description
For Information
Delete a print job.
Print jobs can be managed and
deleted in the Job pane of the Print
Manager window.
“How to Delete a Print Job” on
page 254
Managing Printer Groups
Print Manager has three types of printer groups:
System groups
These groups cannot be created or deleted. However you can edit the
contents of these groups. By default, there are two system groups, All
Printers and Favorites.
■
All Printers
This group contains all the printer queues that are currently known to
the system. All other groups are views of the All Printers group.
To delete a printer queue permanently, you must delete it from the All
Printers group. Deleting a printer queue from another group only
removes the queue from that group. The printer queue remains on the
system until it is deleted from the All Printers group.
■
Favorites
You can use the Favorites group to store the printer queues that you use
most often.
Note – When you print a document from an application, only the printer
queues in your Favorites group are shown in the application's Print
dialog. If your Favorites group is empty, the printer queues in the All
Printers group are shown in the application's Print dialog instead.
Regular groups
These groups are named groups to which you can copy or drag any printer
that is known to the system. For example, you might have a Home or an
Office printer group.
Search groups
These groups contain the results of searches that you perform. The contents
of search groups are updated dynamically. For example, when a new local
printer is connected, or a new network printer is discovered, its printer
queue is automatically added to all of the search groups that have matching
search criteria.
Chapter 10 • Setting Up and Administering Printers From the Desktop (Tasks)
251
Managing Printer Groups
▼
1
How to Create a New Printer Group
From the Group menu, choose New Group.
A new group with the default name, Untitled N, is created in the Group pane of the Print
Manager window.
■
To create a new printer group by using a keyboard shortcut, press Ctrl+N
2
Type a name for the new group.
3
Press Enter to save the new group name. Press Esc to revert to the original name.
▼
1
How to Create a New Search Group
From the Group menu, choose New Search Group.
A new search group with the default name, Untitled N, is created in the Group pane.
The New Search Group dialog opens.
2
■
To create a new search group by using the toolbar, click the New Search Group button.
■
To create a new search group by using a keyboard shortcut, press Ctrl+S.
In the Search Group Properties dialog:
a. Enter the name of the search group in the Group name field.
b. Choose whether you want to include printer queues that match any or all of your search
terms by using the Show printers that match buttons.
c. From the drop-down menus, select how you would like to search.
d. To enter any additional search terms, click the Add ( +) button.
If additional search terms are provided, the Remove (-) button is visible. To delete an entire
search term (row), click the Remove (-) button.
e. To create the new search group, click OK.
252
System Administration Guide: Solaris Printing • January 2009
Managing Printer Groups
▼
How to Create a New Search Group by Using a Queue
Pane Filter
1
In the Group pane, select a group that includes all of the printer queues you want to include in
the new search group.
2
Filter the Queue pane view by using the filter box that is located in the toolbar.
3
From the filter box drop-down menu, select Save Filter as Search Group.
A new search group with the default name you entered is created in the Group pane.
▼
How to View or Change an Existing Search Group's
Properties
1
In the Group pane, select the search group.
2
From the Group menu, choose Properties.
The Search Group Properties dialog is displayed, allowing you to view or change the properties
of the search group.
■
To change the name of search group, enter the new name in the Group name field.
■
Make any necessary changes to the search criteria.
■
To provide additional search terms, click the Add (+) button.
If you provided additional search terms that you want to delete, the Remove (-) button is
visible. To delete a search term (entire row), click the Remove (-) button.
3
▼
To save your changes, click OK.
How to Delete a Printer Group
You can delete printer groups and search groups that you have created.
Note – You cannot delete the All Printers or the Favorites groups.
1
In the Group pane, select the group that you want to delete.
Chapter 10 • Setting Up and Administering Printers From the Desktop (Tasks)
253
Managing Print Jobs
2
3
From the Edit menu, choose Delete.
■
To delete a group by using the toolbar option, click the Delete button.
■
To delete a group by using a keyboard shortcut, press the Delete key.
To permanently delete the group, click Yes in the confirmation alert that is displayed. To cancel,
click No.
Managing Print Jobs
You can manage print jobs in the Job pane of the Print Manager window.
Note – The Job pane is shown only if a single printer queue is selected in the Queue pane. If
multiple queues are selected, the Job pane is automatically hidden. The pane reappears when
you select a single printer queue again.
The job list for any printer queue can be opened in a separate Job List window. To open a Job
List window for a particular printer queue, double-click the printer queue icon.
The Job pane and Job List windows are automatically updated every few seconds. You can also
manually update the Job pane and the Job List window by selecting Refresh from the View
menu or by clicking the Refresh button on the toolbar.
The Job List window allows you to view a list of print jobs that are currently queued for printing.
You can open the Job List window by double-clicking a queue in the Queue Pane or by clicking
the panel notification icon when one or more print jobs are processing normally. You can also
open the window from the Print Manager window by choosing View > Job List Only.
By default, when the Print Manager window opens, the Job pane for the default printer is
shown. To view print jobs for another printer queue, select the printer queue whose jobs you
want to view. The Job pane for the printer queue you selected is displayed. To view the job list
only, click the Job List Only icon on the toolbar.
▼
254
How to Delete a Print Job
1
In the Queue pane, select the printer queue that is processing the print job you want to delete.
The Job pane for the selected printer queue is displayed.
2
In the Job pane, select the print job that you want to delete.
System Administration Guide: Solaris Printing • January 2009
Managing Print Manager and Printer Preferences (Task Map)
3
4
From the Edit menu, choose Delete.
■
To delete a print job by using the toolbar, click the Delete button.
■
To delete a print job by using a keyboard shortcut, press Delete.
To delete the print job, click Yes in the confirmation alert that is displayed. To leave the print job
in the queue, click No.
Note – You can only delete your own print jobs or print jobs from printer queues that you own.
Managing Print Manager and Printer Preferences (Task Map)
Task
Description
For Information
View or change preferences for
Print Manager.
Behavior of the Print Manager
application is set in the Print
Manager tab of the Printer
Preference dialog. You can change
certain default settings for the
application in this dialog.
“Setting Print Manager
Preferences” on page 256
Configure preferences for local
USB printer discovery.
The Local tab of the Printer
“Setting Preferences for Local USB
Preferences dialog is where
Printer Discovery” on page 257
preferences for how directly
attached printers are
auto-discovered is located. You can
view or change some of these
settings.
Configure preferences for
network-attached printer
discovery.
The Network tab of the Printer
“Settings Preferences for
Preferences dialog is where
Network&hyphen;Attached
preferences for how
Printer Discovery” on page 258
network-attached printers are
auto-discovered is located. You can
view or change some of these
settings.
Chapter 10 • Setting Up and Administering Printers From the Desktop (Tasks)
255
Managing Print Manager and Printer Preferences
Managing Print Manager and Printer Preferences
You can view or edit Print Manager preferences in one of the following ways:
■
If the Print Manager application choose Preferences from the Edit menu.
■
If the Print Manager application is not open, from the Main Menubar, select System >
Preferences > Printers.
The Print Manager Preferences dialog is displayed, allowing you set preferences for Print
Manager behavior, as well as settings for local and remote printer queues.
The Print Manager Preferences dialog contains the following three tabs:
Print Manager
Controls the behavior of the Print Manager application.
Local Printers
Controls auto-discovery, print queue configuration, and notification
preferences for local printers.
Network Printers
Controls auto-discovery, notification, and group preferences for
network-attached printers.
Setting Print Manager Preferences
The Print Manager tab controls the behavior of the Print Manager application.
■
256
Notifications
System Administration Guide: Solaris Printing • January 2009
Managing Print Manager and Printer Preferences
This setting controls the panel notification icon that is displayed in the desktop panel. By
default, Auto-hide printer icon from notification area is enabled. To disable notifications,
deselect the checkbox. You can also change the number of seconds the icon is displayed
before it is hidden. The default is 5 seconds.
■
Unavailable printers
This setting controls Print Manager behavior when a printer queue becomes unavailable. By
default, unavailable printer queues are shown and marked as offline in the Queue pane. If
you want to hide unavailable printer queues in the Queue pane, choose this setting instead.
Setting Preferences for Local USB Printer Discovery
The Local Printers tab controls the behavior of local printers.
You can change the following preferences:
When a new printer is connected:
■
Show Printer Properties window
This setting is the default. If unchecked, a panel notification icon and message is displayed
for a few seconds. From here, you can click the icon to open the Printer Queue Properties
dialog.
Chapter 10 • Setting Up and Administering Printers From the Desktop (Tasks)
257
Managing Print Manager and Printer Preferences
When a printer is disconnected:
■
Show notification message
Check this setting to receive a notification message when a local printer goes offline.
Otherwise, you will not receive any notification.
When a printer is reconnected:
■
Ask before printing pending documents
If this setting is selected, when a local printer is reconnected, and its printer queue contains
any documents to be printed, the queue is paused and an alert is shown.
Settings Preferences for Network-Attached Printer
Discovery
The Network Printers tab of the Print Preferences dialog controls the Print Manager
application's behavior when a network-attached printer is auto-discovered and preconfigured.
258
System Administration Guide: Solaris Printing • January 2009
Managing Print Manager and Printer Preferences
You can change the following settings:
■
Auto-detect network printers
If this setting is selected, the network is scanned periodically for new printer queues,
according to the settings in the Configuration sub-dialog.
■
Show new printer notification messages:
The two options for this setting are Immediately or Never.
Choose Immediately if you want to see a panel notification message when a network printer
is discovered. Choose Never if you prefer to receive no message when a network printer is
discovered.
■
Add discovered printers to:
All printers group only – If selected, all new network printer queues are only be added to the
All Printers group in Print Manager.
All printers group and – Contains a drop-down list with all the regular groups, plus the
Favorites group.
If selected, all new network printer queues are added to the All Printers group and an
additional group of your choice. You can select the additional group from the drop-down
list.
Configuring Auto-Discovery Settings for
Network-Attached Printers
This sub-dialog contains settings that control the type of network printers that are discovered
and the parameters for doing so.
By default, the Simple Network Management Protocol (SNMP) service is available. You might
need to enable this service, depending on the Solaris release you are running. Any other
available print services will be listed here.
Note – In the OpenSolaris 2008.11 release, attempts to enable the HAL add-on module from the
desktop or by using SMF commands, cause the system to revert to maintenance state. This
problem does not occur if you are running a supported Solaris Express Community Edition
release. To enable this service in the OpenSolaris 2008.11 release, you must first install the
SUNWSmmgr package. Detailed instructions can be found at
http://www.opensolaris.org/os/project/indiana/resources/relnotes/200811/x86/.
The controls on the right-hand side of the configuration sub-dialog are dictated according to
the service that is selected in the list. Some services may have advanced controls in the form of
an expander section. The expander is collapsed by default.
Chapter 10 • Setting Up and Administering Printers From the Desktop (Tasks)
259
Managing Print Manager and Printer Preferences
The ability to edit some of these controls requires certain Role-Based Access Control (RBAC)
privileges. If you are not logged in with the appropriate RBAC privileges, the controls are
visible, but they are read-only. To find out what you or your system administrator need to do to
allow the editing of these controls, click the Details button.
For instructions, see “How to Enable the Network Device Discovery Service” on page 238.
260
System Administration Guide: Solaris Printing • January 2009
11
C H A P T E R
1 1
Printing in the Solaris Operating System
(Reference)
This chapter provides the following reference information for the following features:
■
■
■
■
■
“Solaris Print Manager” on page 261
“LP Print Service” on page 264
“Using PPD Files To Set Up Printers” on page 275
“PPD File Management Utility” on page 277
“How PAPI Is Implemented in the Solaris OS” on page 284
Solaris Print Manager
This section includes reference information that pertains to using the Solaris Print Manager
graphical user interface (GUI), also referred to as Print Manager (printmgr), to set up and
administer printing services and printers.
Printer Definitions You Can Set With Solaris Print
Manager
The following are available printer definitions when using Solaris Print Manager to set up and
administer printing services and printers:
■
The Use PPD files attribute is the default when you create a new print queue in Solaris Print
Manager. If you are setting up a printer that does not use PPD files, deselect the attribute by
removing the checkmark from the check box. To reselect this attribute, recheck the check
box.
Note – If Solaris Print Manager cannot locate a ppdcache file to use, the Use PPD files
attribute is grayed-out.
261
Solaris Print Manager
■
If you create a new print queue or modify an existing print queue with PPD files by using
Solaris Print Manger, you cannot assign the printer type or file content type printer
definitions. However, if you do not use PPD files when creating a print queue, you can assign
these printer definitions.
■
When you create a new print queue or modify an existing print queue with PPD files, the
following Solaris Print Manager screens are available:
■
■
■
■
New Attached Printer
Modify Printer Properties (for an attached printer)
New Network Printer
Modify Printer Properties (for a network printer)
For these screens, when creating a print queue with PPD files, you are required to provide
the following information:
■
■
■
Printer make
Printer model
Printer driver
Table 11–1 describes the printer definitions that are used by Solaris Print Manager, and their
availability, depending on the Solaris software release that you are running.
Note – The definitions for the printer make, printer model, and printer driver are only available
when you create a print queue by using the Use PPD files option in Solaris Print Manager.
TABLE 11–1
Printer Definitions Used by Solaris Print Manager
Printer Definition
Available in Solaris 9 Release?
Available in the Solaris 10 Release?
Printer Name
Available
Available
Printer Server
Available
Available
Description
Applicable
Applicable
Printer Port
Available, for attached printers
Available, for attached printers
Printer Type
Available
Available, by deselecting the Use PPD
files attribute in Print Manager
drop-down menu
Not available by default in the
Solaris 9 9/04 release.
File Content Type
Available
Not available by default in the
Solaris 9 9/04 release
262
System Administration Guide: Solaris Printing • January 2009
Available, by deselecting the Use PPD
files attribute in Print Manager
drop-down menu
Solaris Print Manager
TABLE 11–1
Printer Definitions Used by Solaris Print Manager
(Continued)
Printer Definition
Available in Solaris 9 Release?
Available in the Solaris 10 Release?
Printer Make
Not available
Available
Yes, available in the Solaris 9 9/04
release
Printer Model
Not available
Available
Available in the Solaris 9 9/04
release
Printer Driver
Not available
Available
Available in the Solaris 9 9/04
release
Fault Notification
Available
Available
Destination
Available for a network printer
Available for a network printer
Protocol
Available for a network printer
Available for a network printer
Options
Available
Available
User Access List
Available
Available
Default Printer
Available
Available
■
Always Print Banner (Default
option)
Available (Default option for Solaris 10
release)
User Selectable - Default=on
(Available when Always Print
Banner option is deselected)
User Selectable - Default=on
■
■
Always Print Banner
User Selectable Default=on
Never Print Banner
Never Print Banner (Not
available)
Never Print Banner
These options are located in a
pull-down menu within Solaris Print
Manager.
For a detailed description of the printer make, printer model, and printer driver definitions, see
“Setting Printer Definitions” on page 48.
Note – Using PPD files is a per-queue configuration option and is not a requirement for adding a
new printer. Also, PPD files are not required for printers that already contain the RIP feature.
Chapter 11 • Printing in the Solaris Operating System (Reference)
263
LP Print Service
LP Print Service
This section describes the directory structure, files, and logs of the LP print service.
LP Print Service Commands
Note – The LP Print Service client commands have been modified to be a consumer of the FSG
OpenPrinting Open Standard Print API (PAPI). These print commands are layered on top of
the PAPI. See “How PAPI Is Implemented in the Solaris OS” on page 284 for more information.
The following table lists frequently used LP print service commands.
264
TABLE 11–2
LP Print Service Commands
Command
Task
Man Page
enable
Activate a printer
enable(1)
cancel
Cancel a print request
cancel(1)
lp
Send one or more file or files to a
printer
lp(1)
lpstat
Report the status of the LP print
service
lpstat(1)
disable
Deactivate on or more printers
enable(1)
accept
Permit print requests to be queued
for a specific destination
accept(1M)
reject
Prevent print requests from being
queued for a specific destination
accept(1M)
lpadmin
Set up or change a printer
configuration
lpadmin(1M)
lpfilter
Set up or change filter definitions
lpfilter(1M)
lpforms
Set up or change preprinted forms
lpforms(1M)
lpadmin
Mount a form
lpadmin(1M)
lpmove
Move output requests from one
destination to another destination
lpmove(1M)
lpsched
Start the LP print service scheduler
lpsched(1M)
System Administration Guide: Solaris Printing • January 2009
LP Print Service
TABLE 11–2
LP Print Service Commands
Command
Task
(Continued)
Man Page
lpshut
Stop the LP print service scheduler
lpshut(1M)
lpusers
Set or change the default priority
lpusers(1M)
and priority limits that can be
requested of the LP print service by
users
For information about Solaris print commands that have been modified for use with the PAPI,
see “How PAPI Is Implemented in the Solaris OS” on page 284.
Daemons and LP Internal Files
The /usr/lib/lp directory contains daemons and files used by the LP print service, as
described in the following table.
TABLE 11–3
Contents of the /usr/lib/lp Directory
File
Type
Description
bin
Directory
Contains files for generating printing alerts, slow
filters, and queue management programs.
model
Directory
Contains the standard printer interface program.
postscript
Directory
Contains all PostScript filter programs provided by
the LP print service. These filters come with
descriptor files in the /etc/lp/fd directory. These
files tell the LP print service the characteristics of the
filters and where to locate them.
LP Print Service Directories
The files of the LP print service are distributed among the directories that are shown in the
following table.
TABLE 11–4
Directories for the LP Print Service
Directory
Contents
/usr/bin
The LP print service user commands.
/etc/lp
A hierarchy of LP server configuration files.
Chapter 11 • Printing in the Solaris Operating System (Reference)
265
LP Print Service
TABLE 11–4
Directories for the LP Print Service
(Continued)
Directory
Contents
/usr/share/lib
The terminfo database directory.
/usr/lib/print
The lp conversion scripts, in.lpd daemon, and the printd daemon. The
printd daemon transfers all pending jobs in the/var/spool/print
directory once per minute. When no jobs are remaining to transfer, the
printd daemon exits.
/usr/sbin
The LP print service administrative commands
/usr/lib/lp
The lpsched program, binary files, PostScript filters, and the model
directory, which contains the standard printer interface program.
/var/lp/logs
LP log files such as lpsched.n (which includes messages from lpsched) and
requests.n (which includes information about completed print requests).
/var/spool/lp
The spooling directory where files are queued for printing.
/var/spool/print
The staging area for LP print service client-side requests.
/etc/lp/model/uri
The location of the interface script that process device-uri information.
LP Print Service Configuration Files
The lpsched daemon stores configuration information in the /etc/lp directory, as described
in the following table.
Caution – The configuration files listed in this table are private interfaces. These files are subject
to change in future releases. You should not build software that relies on these files being in
their current locations or that relies on the data being in the format currently used.
TABLE 11–5
266
Contents of the /etc/lp Directory
File
Type
Description
classes
Directory
Files identifying classes provided by the lpadmin
-c command.
fd
Directory
Description of existing filters.
filter.table
File
Print filter look-up table.
forms
Directory
Location to put files for each form. Initially, this
directory is empty.
interfaces
Directory
Printer interface program files.
logs
Link to /var/lp/logs
Log files of printing activities.
System Administration Guide: Solaris Printing • January 2009
LP Print Service
TABLE 11–5
Contents of the /etc/lp Directory
(Continued)
File
Type
Description
model
Link to /usr/lib/lp/model
The standard printer interface program.
printers
Directory
Directories for each local printer. Each directory
contains configuration information and alert
files for an individual printer.
pwheels
Directory
Print wheel files or cartridge files.
ppd
Directory
Each local queue that is configured with a PPD
file has a copy of the PPD file placed here.
These configuration files serve a function similar to the /etc/printcap file on LPD-based print
servers.
Note – You can check the contents of the configuration files, but you should not edit these files
directly. Instead, use the lpadmin command to make configuration changes. Your changes are
written to the configuration files in the /etc/lp directory. The lpsched daemon administers
and updates the configuration files.
The /etc/lp/printers directory has a subdirectory for each local printer that is known to the
system. The following example shows the /etc/lp/printers subdirectories of printers sparc1
and luna.
$ ls -l /etc/lp/printers
drwxrwxr-x 2 lp lp 512 Jan 23 23:53 luna
drwxrwxr-x 2 lp lp 512 Jan 11 17:50 sparc1
The following table describes the files within each printer-specific directory.
File Name
Description
alert.sh
Shell to execute in response to alerts
alert.vars
Alert variables
configuration
Configuration file
users.deny
List of users to whom printer access is denied
comment
Printer description
The configuration file for the printer luna, /etc/lp/printers/luna/configuration, would
typically appear as follows:
Chapter 11 • Printing in the Solaris Operating System (Reference)
267
LP Print Service
Banner: on: Always
Content types: PS
Device: /dev/term/b
Interface: /usr/lib/lp/model/standard
Printer type: PS
Modules: default
The terminfo Database
The /usr/share/lib directory contains the terminfo database directory. This directory
contains definitions for many types of terminals and printers. The LP print service uses
information in the terminfo database to perform the following tasks:
■
Initializes a printer
■
Establishes a selected page size, character pitch, line pitch, and character set
■
Communicates the sequence of codes to a printer
Each printer is identified in the terminfo database with a short name. For a description of the
structure of the terminfo database, see “Printer Type” on page 52. If necessary, you can add
entries to the terminfo database, but doing so is tedious and time-consuming. For more
information, see “Adding a terminfo Entry for an Unsupported Printer” on page 169.
Printer Names in the terminfo Database
Information about each printer type is stored in the terminfo database
(/usr/share/lib/terminfo). This information includes the printer capabilities and
initialization control data. The printer you install must correspond to an entry in the terminfo
database.
$ pwd
/usr/share/lib/terminfo
$ ls
1 3 5 7 9 B H P a c e g i k m o q s u w y
2 4 6 8 A G M S b d f h j l n p r t v x z
$
Each subdirectory contains compiled database entries for terminals or printers. The entries are
organized by the first letter of the printer or terminal type. For example, if you have an Epson
printer, look in the /usr/share/lib/terminfo/e directory to find your particular model of
Epson printer.
$ cd /usr/share/lib/terminfo/e
$ ls
emots
ep2500+high ep48
268
System Administration Guide: Solaris Printing • January 2009
ergo4000
exidy2500
LP Print Service
env230
envision230
ep2500+basic
ep2500+color
$
ep2500+low
ep40
ep4000
ep4080
epson2500
epson2500-80
epson2500-hi
epson2500-hi80
esprit
ethernet
ex3000
exidy
The entries for Epson printers begin with epson.
If you have an NEC printer, look in the /usr/share/lib/terminfo/n directory for your NEC
printer model.
$ cd /usr/share/lib/terminfo/n
$ ls
ncr7900
ncr7900iv
netronics
ncr7900-na
ncr7901
netty
ncr7900i
nec
netty-Tabs
ncr7900i-na
net
netty-vi
$
network
nuc
netx
nucterm
newhp
newhpkeyboard
The nec entry in this directory is for the NEC printer.
LP Print Service Log Files
The LP print service maintains two sets of log files that are described in the following table.
Log File Name
Description
syslogd
Set lpr.debug in /etc/syslog.conf to enable LP
print service logging
/var/spool/lp
A list of current requests that are in the print queue
/var/lp/logs/requests
An ongoing history of print requests
Print Queue Logs
The scheduler for each system keeps a log of print requests in the /var/spool/lp/tmp/system
and /var/spool/lp/requests/system directories. Each print request has two files, one file in
each directory, that contain information about the request. The information in the
/var/spool/lp/requests/system directory can be accessed only by superuser or lp. The
information in the /var/spool/lp/tmp/system directory can be accessed only by the user who
submitted the request, superuser, or lp.
The following example shows the contents of the /var/spool/lp/tmp/starbug directory:
Chapter 11 • Printing in the Solaris Operating System (Reference)
269
LP Print Service
$
5
#
C
D
F
P
T
t
U
s
v
ls /var/spool/lp/tmp/starbug
5-0
cat 5-0
1
print1
/etc/profile
20
/etc/profile
simple
root
0000
2
These files remain in their directories only as long as the print request is in the queue. Once the
print request is finished, the information in the files is combined and appended to the
/var/lp/logs/requests file. This file is described in the next section.
Use the information in the /var/spool/lp/logs directory if you need to track the status of a
print request that is currently in the queue.
History Log Files
The LP print service records a history of printing services in two log files, lpsched and
requests. These log files are located in the /var/lp/logs directory. You can use the
information in these log files to diagnose and troubleshoot printing problems. An example of
the contents of the /var/lp/logs directory is as follows:
# cd /var/lp/logs
# ls
lpsched.1
requests
lpsched
lpsched.2
#
requests.2
requests.1
The two most important log files for troubleshooting are the following:
■
The lpsched log file — Contains information about local printing requests.
■
The requests log file — Contains information about print requests that are completed and
no longer in the print queue.
The requests log file has a simple structure so that you can extract data using common UNIX
shell commands. Requests are listed in the order they are printed. They are also separated by
lines showing their request IDs. Each line below the separator line, the line that starts with =, is
marked with a single letter that identifies the kind of information contained in that line. Each
letter is separated from the data by a single space.
The following example shows the contents of a requests log file:
270
System Administration Guide: Solaris Printing • January 2009
LP Print Service
# pwd
/var/lp/logs
# tail requests.2
= print1-3, uid 0, gid 1, size 206662, Wed Mar 14 08:56:30 MST 2003
z print1
C 1
D print1
F /usr/dict/words
P 20
T /usr/dict/words
t simple
U root
s 0x0014
v 2
#
The following table shows the letter codes and the content of their corresponding lines in the
requests log file.
TABLE 11–6
Codes in the requests Log File
Letter
Content of Line
=
The separator line, which contains the following items: request ID, user ID (UID), and
group IDs (GIDs) of the user, the total number of bytes in the original (unfiltered) file
size, and the time when the request was queued.
z
The name of the printer.
C
The number of copies printed.
D
The printer or class destination, or the word any.
F
The name of the file printed. The line is repeated for each file printed. Files were printed
in the order shown.
f
(Optional) The name of the form used.
H
(Optional) One of three types of special handling: resume, hold, and immediate.
N
(Optional) The type of alert used when the print request was successfully completed.
The type is the letter M if the user was notified by email or W if the user was notified by a
message to the terminal.
O
(Optional) The printer-dependent -o options. For example, nobanner.
P
The priority of the print request.
p
The list of pages printed.
r
(Optional) A single-letter line that is included if the user asked for “raw” processing of
the files with the lp -r command.
Chapter 11 • Printing in the Solaris Operating System (Reference)
271
LP Print Service
TABLE 11–6
Codes in the requests Log File
(Continued)
Letter
Content of Line
S
(Optional) The character set, print wheel, or cartridge used.
T
The title placed on the banner page.
t
The type of content found in the files.
U
The name of the user who submitted the print request.
s
The outcome of the request, shown as a combination of individual bits expressed in
hexadecimal format. Several bits are used internally by the print service. The bits and
what they mean are described in the following table.
v
■
0 — Identifies that the print job originated from the in.1pd print daemon or
another system on the network.
■
2 — Identifies that the print job originated from the /usr/bin/lp or /usr/ucb/lpr
commands.
■
1 — Identifies that the print job originated from an older version of the printing
software.
x
(Optional) The slow filter used for the print request.
Y
(Optional) The list of special modes for the print filters used to print the request.
z
(Optional) The printer used for the request. This printer differs from the destination
(the D line) if the request was queued for any printer or a class of printers, or if the
request was moved to another destination.
The following table shows the outcome codes in the LP requests log file and their descriptions.
TABLE 11–7
272
Outcome Codes in the requests Log File
Outcome Code
Description
0x0001
The request was held pending resume.
0x0002
Slow filtering is running.
0x0004
Slow filtering finished successfully.
0x0008
The request is on the printer.
0x0010
Printing finished successfully.
0x0020
The request was held pending user change.
0x0040
The request was canceled.
0x0080
The request will print next.
System Administration Guide: Solaris Printing • January 2009
LP Print Service
TABLE 11–7
Outcome Codes in the requests Log File
(Continued)
Outcome Code
Description
0x0100
The request failed filtering or printing.
0x0200
The request is in transit to a remote printer (obsolete).
0x0400
The user will be notified.
0x0800
A notification is running.
0x1000
A remote system has accepted the request (obsolete).
0x2000
The administrator placed a hold on the request.
0x4000
The printer had to change filters.
0x8000
The request is temporarily stopped.
Spooling Directories
Files queued for printing are stored in the /var/spool/lp directory until they are printed,
which might be only seconds. The following table shows the contents of the /var/spool/lp
directory.
TABLE 11–8
Contents of the /var/spool/lp Directory
File
Type
Description
SCHEDLOCK
File
Lock file for the scheduler. Check for this file if the
scheduler terminates and will not restart.
admins
Directory
Link to /etc/lp.
bin
Directory
Link to /usr/lib/lp/bin.
logs
Link
Link to ../lp/logs where completed print requests are
logged.
model
Link
Link to /usr/lib/lp/model.
requests
Directory
Directory that contains subdirectories for each configured
printer where print requests are logged until printed. Users
cannot access this log.
system
Directory
A print status file for the system.
temp
Link
Link to /var/spool/lp/tmp/hostname, which contains the
spooled requests.
Chapter 11 • Printing in the Solaris Operating System (Reference)
273
LP Print Service
TABLE 11–8
Contents of the /var/spool/lp Directory
(Continued)
File
Type
Description
tmp
Directory
Directory for each configured printer where print requests
are logged until printed. Changes to existing print requests
are also recorded in this directory.
Filtering Print Files
Print filters are programs on the print server that convert the content of a queued file from one
format to another format.
A print filter can be as simple or as complex as needed. The Solaris OS provides print filters in
the /usr/lib/lp/postscript directory that cover most situations where the destination
printer requires the data to be in PostScript format. If you need filters for nonPostScript
printers, you have to create the filters and add them to the systems that need filters.
A set of print filter descriptor files are provided in the /etc/lp/fd directory. These descriptor
files describe the characteristics of the filter (for example, fast or slow filter). These description
files point to the filter program (for example, to /usr/lib/lp/postscript/postdaisy).
How the Printer Interface Program Works
The LP print service interacts with other parts of the Solaris OS. The print service uses a
standard printer interface program to do the following:
■
Initialize the printer port, if necessary. The standard printer interface program uses the stty
command to initialize the printer port.
■
Initialize the printer. The standard printer interface program uses the terminfo database
and the TERM shell variable to find the appropriate control sequences.
■
Print a banner page, if necessary.
■
Print the correct number of copies specified by the print request.
The LP print service uses the standard interface program, found in the /usr/lib/lp/model
directory, unless you specify a different program. You can create custom interface programs.
However, you must make sure that the custom program does not terminate the connection to
the printer or interfere with proper printer initialization.
274
System Administration Guide: Solaris Printing • January 2009
Using PPD Files To Set Up Printers
Using PPD Files To Set Up Printers
Support for setting up and administering printers with PPD files has been incorporated into the
Solaris print subsystem. Two interface scripts, standard_foomatic, and
netstandard_foomatic, are available. These interface scripts provide the generic Solaris
interface between the Solaris spooler and the back-end process of the Solaris print server.
The following are examples of the types of printers that are supported:
■
■
■
■
Lexmark Optra E312
Epson Stylus Photo 1280
Canon BJC-55
QMS magicolor 2+
Raster Image Processor Support
The raster image support in the Solaris OS (RIP) enables you to print to printers that do not
have resident PostScript processing capabilities. The Solaris printing software provides the
print server RIP and supporting technologies. The RIP occurs behind the scenes. However, to
use the appropriate driver you need to configure each printer by using either Solaris Print
Manager or the lpadmin -n command. For step-by-step instructions on using the lpadmin -n
command, see “How to Add a New Directly Attached Printer by Using LP Print Service
Commands” on page 86.
Support for PostScript Printer Description Files
The lpadmin and lpstat commands, as well as the Solaris Print Manager printer definition
screens, support the use of PPD files.
The following new software packages are associated with this feature:
■
■
■
■
■
■
■
■
■
■
SUNWa2psr
SUNWa2psu
SUNWespgs
SUNWffiltersr
SUNWffiltersu
SUNWfppd
SUNWgimpprint
SUNWhpijs
SUNWimagick
SUNWpsutils
For more information about supported printers, see “Where to Find Information About
Supported Printers and Available PPD Files” on page 276.
Chapter 11 • Printing in the Solaris Operating System (Reference)
275
Using PPD Files To Set Up Printers
Where to Find Information About Supported Printers
and Available PPD Files
Caution – The location where the PPD files and the ppdcache file is stored are private, as is the
contents of the ppdcache file. The placement of these files and the contents of the ppdcache are
subject to change. Do not build software that relies on these files being in their current location
or that relies on the data being in the format that is currently used.
If the file required by your printer is not available, you can add your own PPD file. If you use the
lpadmin -n command to create a new print queue, you can store your own PPD files anywhere
that you choose. If you are running the Solaris 10 OS, and you use Solaris Print Manager to
create the print queue, the PPD file must have an entry in the ppdcache file.
If you are running at least the Solaris Express Developer Edition 5/07 release, PPD files are
located in any of following four repositories on the system:
/usr/share/ppd
Specifies the system repository.
/usr/local/share/ppd
Specifies the admin repository.
/opt/share/ppd
Specifies the vendor repository.
/var/lp/ppd
Specifies the user repository.
Copies of PPD files that are specified by using the lpadmin command with the -n option, or by
using the -a option with the ppdmgr command are stored in the user repository under the same
PPD file name.
If you use the ppdmgr utility with the -a and the -R options, a copy of the specified PPD file can
be stored in the admin repository.
If you create a print queue with Solaris Print Manager, and no entry exists for the PPD file in the
ppdcache file, you can use the ppdmgr utility to add the file to the system. The cache of PPD file
information that Solaris Print Manager uses is then updated to reflect any changes you make by
using either of these two methods.
If you are not running at least the Solaris Express Developer Edition 5/07 release, PPD files are
located in the /usr/lib/lp/model/ppd/system directory or any alternate directory that you
specify.
The output of the ls command lists all the PPD files for a particular printer manufacturer.
For additional task-related information, see “Administering Printers That Are Associated With
PPD Files (Task Map)” on page 150.
276
System Administration Guide: Solaris Printing • January 2009
PPD File Management Utility
PPD File Management Utility
This section contains reference information for managing PPD files.
When the ppdmgr utility is used to add a PPD file to the system, a compressed (gzipped) copy of
the specified PPD file is stored on the system. The purpose is to maintain a current cache of PPD
file information from all known PPD files on the system.
The full path of the PPD file that is copied to the system follows:
repository/label/manufacturer/ppd-file-name
repository
Is the specified repository. If no repository is specified by using the -R option,
the default repository is the user repository, /var/lp/ppd/.
label
Is the specified label. If no label is specified by using the -L option, the default
label is user, within the user repository.
manufacturer
Is the manufacturer's name that is contained within the PPD file. This name
might be modified according to the manufacturer aliases that are defined in
the /var/lp/ppd/manufaliases file. See “Manufacturer Aliases File” on
page 281.
ppd-file-name
Is the same as the original PPD file name that is specified with the ppdmgr
utility. This file can also contain the .gz extension if the PPD file is
compressed.
The following figures show the layout of a typical PPD file repository and the ppdmgr utility
directory layout, which contains all relevant ppdmgr delivered and generated files, including the
PPD user file repository.
Chapter 11 • Printing in the Solaris Operating System (Reference)
277
PPD File Management Utility
Directory Layout of a PPD File Repository
PPD-repository/
label1/
label2/
...
labelN/
manufacturer1/
manufacturer2/
...
manufacturerN/
ppdfile1
ppdfile2
...
ppdfileN
Directory Layout for Delivered and Generated ppdmgr Files
/var/lp/ppd/
caches/
PPD-repository:label1
ppdcache manufaliases
label1/
... PPD-repository:label1N
...
labelN/
user/
manufacturer1/ ... manufacturerN/
ppdfile1
...
ppdfileN
PPD File Repositories
The following table describes the PPD file repositories that are located on a system.
TABLE 11–9
278
Description of the PPD File Repositories
Repository
Location
Contents
admin
/usr/local/share/ppd/ This PPD file repository is
used to store PPD files that
are used by system
administrators.
PPD files can be added to this
repository manually, by using
either the ppdmgr utility or the
pkgadd command.
all
Represents all of the PPD This repository represents
repositories on a system all supported PPD
repository locations on a
system.
You can only specify the all
repository when requesting an
update or rebuild of the PPD
cache file by using the ppdmgr
utility.
System Administration Guide: Solaris Printing • January 2009
Method Used to Add or Modify
PPD File Management Utility
TABLE 11–9
Description of the PPD File Repositories
(Continued)
Repository
Location
Contents
Method Used to Add or Modify
system
/usr/share/ppd/
This repository contains
PPD files that are delivered
with Solaris OS.
PPD files that are delivered by
Sun can be added to the system
repository by using the pkgadd
and patchadd commands.
A PPD file in this repository
should not be modified
manually or by using the
ppdmgr utility. If you modify
this repository manually, your
changes might be lost.
user
/var/lp/ppd
This repository is used, as
needed, by administrators
and users with appropriate
privileges (Printer
Management).
PPD files that are added to the
system by using the ppdmgr
command with the -a option
are added to this repository
unless otherwise specified.
vendor
/opt/share/ppd/
This repository is a central
location for storing PPD
files that are delivered to
the Solaris OS by vendors.
The pkgadd command is used
to add PPD files to this
repository
Note – This repository cannot be
modified by using the ppdmgr
utility.
Caution – The location of the PPD files and the ppdcache file is private and is therefore subject to
change. Do not build software that relies on these files being in their current location or the data
being in its current format.
PPD File Labels
On a system that is running the Solaris software, PPD files can be stored default label
directories. You can also specify a label of your own choosing to organize PPD files, as long as
the label is not reserved by the system.
The following label names are reserved:
■
■
■
■
caches
ppdcache
manufaliases
all
Chapter 11 • Printing in the Solaris Operating System (Reference)
279
PPD File Management Utility
With the exception of the all label name, these label names cannot be specified by using either
the -L or -R options of the ppdmgr utility. However, you can specify the all label name with the
-L or the -R option when using the -r and -u options. Any label name that begins with SUNW is
reserved for use by Sun, but is not prohibited.
If you add a PPD file to a system and specify a label that does not exist, a directory with that label
name is created in the specified repository. By default, if no PPD file repository is specified, this
directory is /var/lp/ppd/label. For more information about specifying labels when you add
PPD files to a system, see “Description of the Command-Line Options for the ppdmgr Utility”
on page 282.
Description of the Printer Driver Field in Solaris Print
Manager
The Printer Driver field in Solaris Print Manager is displayed when you select the Add New
Printer (attached or network) or Modify Printer Attributes (attached or network) menu
options. This field contains printer driver descriptions from the PPD cache file, based on the
printer model that you select. To distinguish between duplicate printer driver descriptions that
have different labels within the PPD file repositories, the label and abbreviation of the PPD file
repository name is also displayed.
The format that is used for the printer driver description is as follows:
label(repository-letter): driver-description
For example, the following PPD file is located in the PHOTOS label within the user PPD file
repository:
/var/lp/ppd/PHOTOS/HP/HP-PhotoSmart_P1100-hpijs.ppd.gz
This PPD file would appear in Solaris Print Manager's Printer Driver field selection list as
follows:
PHOTOS(U): Foomatic/hpijs (recommended)
In the following example, the following PPD file is located in the SUNWfoomatic label within the
system PPD file repository:
This PPD file would appear in Solaris Print Manager's Printer Driver field selection list as
follows:
SUNWfoomatic(S): Foomatic/hpijs (recommended)
The following table describes the PPD file repository letters, the repositories they represent and
the location of the repositories a the system.
280
System Administration Guide: Solaris Printing • January 2009
PPD File Management Utility
Repository Abbreviation
Repository Name
Repository Location
A
admin
/usr/local/share/ppd
S
system
/usr/share/ppd
U
user
/var/lp/ppd
V
vendor
/opt/share/ppd
Manufacturer Aliases File
Manufacturer directories, one for each manufacturer, are located in the PPD repositories on a
system. When PPD files are added to a system, the manufacturer name that is contained in the
PPD file is used to determine which manufacturer directory to copy the PPD file to. A private
file, /var/lp/ppd/manufaliases, contains aliases for all the manufacturer entries in a PPD file.
The manufaliases file is referenced to determine which manufacturer directory to copy the
PPD file to. This process ensures that there is one directory per manufacturer, rather than one
directory per manufacturer alias. For example, if a PPD file contains the manufacturer name,
Hewlett-Packard, and an HP alias for Hewlett-Packard is listed in the manufaliases file, the
PPD file is stored in the HP directory. This strategy applies to all PPD files that are added to a
system by using the ppdmgr utility and the lpadmin -n command.
Note – The manufaliases file is a private file. Do not edit this file. Do not build software that
relies on the file being in its current location or the data being in its current format.
PPD File Caches
Private PPD file caches are maintained in the /var/lp/ppd/caches/ directory, one for each
label within each repository.
The format of the cache file name that is used follows:
PPD-repository: label
The information about PPD files that is in the PPD cache files is maintained by using the ppdmgr
utility. Do not edit the PPD cache files manually. Note that the cache files in the
/var/lp/ppd/caches directory are used to generate the private PPD cache file,
/var/lp/ppd/ppdcache. This file is used by the printmgr utility. For more information, see the
printmgr(1M) man page.
Chapter 11 • Printing in the Solaris Operating System (Reference)
281
PPD File Management Utility
Note – The location of the ppdcache and it's contents is private. Do not build software that relies
on this file being in its current location or on the data being in its current format. This
information applies to any private files that are generated or delivered for use by the ppdmgr
utility.
Description of the Command-Line Options for the
ppdmgr Utility
In this section, the command-line options for the ppdmgr utility are described. Additional
information about processes, guidelines, and restrictions for administering PPD files by using
the ppdmgr utility are also described.
The PPD Manager (ppdmgr) utility is located in /usr/sbin/ppdmgr.
To add a PPD file to a system, you would use the following syntax:
ppdmgr -a ppd-file-path
The -a option copies the PPD file that is specified in ppd-file-path to the PPD repository, then
updates the PPD cache file to reflect the change. If you do not specify a PPD file repository by
using the -R option, the PPD file is stored in the user PPD file repository. If you do not specify a
label by using the -L option, the PPD file is stored in the user label directory.
The following verifications are performed when you use the -a option with the ppdmgr utility:
■
Label verification – A label name must not be a reserved label name.
The following label names are reserved:
■
■
■
■
caches
ppdcache
manufaliases
all
■
PPD File Path verification – The specified ppd-file-path must be accessible and must
contain either the .pdd or ppd.gz extension.
■
PPD file verification – The PPD file that is specified in ppd-file-path must be a valid PPD
file.
Note – If you provide information that does not pass the various verification checks, or if any of
the actions that are performed by the ppdmgr utility are unsuccessful, an error message is
displayed, and the utility exits.
282
System Administration Guide: Solaris Printing • January 2009
PPD File Management Utility
Additional Actions Performed:
■
If needed, parent directories of the destination path are created.
■
If a version of the PPD file with a .gz extension already exists in the PPD file repository, and
the gzipped versions are not duplicates, an error message is displayed.
■
The ppd-file-path is copied to the destination path.
■
To reflect the change in the ppdcache file, the update action is then applied.
To specify PPD file repository, you would use the following syntax:
ppdmgr -R repository
The -R option with repository is used to identify one of the supported PPD file repositories.
When the -R option is not specified, the default repository is user. When the -R option is
specified with the -a option, the valid repository names are user and admin. See “PPD File
Repositories” on page 278 for more information about all of the supported repository names
and their locations.
To specify a label, you would use the following syntax:
ppdmgr -L label-name
The -L option with the label-name is used to identify a grouping of PPD files within a PPD file
repository. The label is also the name of the directory that is located in the PPD file repository.
The label can be comprised of any characters from the portable character set. However, the label
cannot contain a semicolon (;).
When the -L option is not specified, the following are the defaults that are used for specifying a
label name.
ppdmgr Command-Line Option
Default Label
-a
Defaults to the label in ppd-file-path, if the ppd-file-path is
located within a supported repository. Otherwise label defaults
to user.
-r
Defaults to the all label.
-u
Defaults to the all label.
To request an update of the PPD cache file, you would use the following syntax:
ppdmgr -u
This option updates the cache file to reflect modifications within PPD file repositories. The PPD
cache file is updated only if modifications are detected.
Chapter 11 • Printing in the Solaris Operating System (Reference)
283
How PAPI Is Implemented in the Solaris OS
Note – When the -a option is specified, an update of the PPD cache file occurs automatically to
reflect the change in the label directory within the repository where the PPD file was copied.
When the -R or -L option is not specified, the PPD cache file is updated to reflect modifications
in the all label directory within the user repository.
To request a rebuild of PPD cache file, you would use the following syntax:
ppdmgr -r
The -r option rebuilds the cache by removing and regenerating any intermediary cache files
that are associated with the specified label within the specified PPD file repository. This action
results in an update of the PPD cache file, /var/lp/ppd/ppdcache, if any intermediary cache
files are removed. Because a regeneration of the specified label within the specified PPD file
repository is required, the regeneration of the PPD cache information can be very
time-consuming. The time that it takes to rebuild the PPD cache file depends upon the number
of PPD files that are affected, Therefore, the -r option should only be used when PPD cache file
corruption is suspected.
When the - R or - L option is not specified, intermediary cache files that are associated with all
of the labels within the user PPD file repository are removed. These modifications are then
reflected in the PPD cache file.
To display the full path of PPD File in the repository, you would use the following syntax:
ppdmgr -a ppd-file-path -w
The -w option must be specified with the -a option, and the PPD file is added to the system
successfully, the full destination path of the PPD file is displayed on stdout. Otherwise, this
option is ignored.
How PAPI Is Implemented in the Solaris OS
This section contains additional background information about the FSG OpenPrinting Open
Standard Print Application Programming Interface (PAPI), a print service-independent
interface for accessing printing support on a local host or a network.
The PAPI contains a set of printing related objects or data structures and a set of operations or
functions to manipulate the objects.
The following are supported tasks:
■
■
284
Querying the print service
Submitting print jobs
System Administration Guide: Solaris Printing • January 2009
How PAPI Is Implemented in the Solaris OS
■
■
Modifying print jobs
Canceling print jobs
Modified Solaris Print Commands
Table Table 11–10 describes the Solaris print commands that have been modified for use with
the PAPI.
TABLE 11–10
Modified Solaris Print Commands
Command
Origin
Function
lpr
BSD
Submit print jobs.
lpq
BSD
Query print queues and print jobs.
lprm
BSD
Remove print jobs.
lpc
BSD
Control print jobs:
accept, reject, enable, disable,
clear, topq
lp
SysV
Submit print jobs.
lpstat
SysV
Query print server (print queues,
print jobs, other).
cancel
SysV
Remove print jobs.
lpmove
SysV
Move jobs between local print
queues.
accept
SysV
Enable queueing of print jobs on a
print queue.
reject
SysV
Disable queueing of print jobs on a
print queue.
enable
SysV
Enable job processing on a print
queue.
disable
SysV
Disable job processing on a print
queue.
Chapter 11 • Printing in the Solaris Operating System (Reference)
285
286
12
C H A P T E R
1 2
Troubleshooting Printing Problems (Tasks)
This chapter explains how to troubleshoot printing problems that might occur when you set up
or maintain printing services.
This is a list of the information in this chapter:
■
■
■
“Tips on Troubleshooting Printer Setup Problems” on page 287
“Tips on Troubleshooting Printing Problems” on page 288
“Troubleshooting Printing Problems” on page 293
For overview information about printing, see Chapter 1, “Introduction to Printing in the Solaris
Operating System.”
Tips on Troubleshooting Printer Setup Problems
Sometimes, when setting up a printer, you might need to locate printer device identification
information. See “Locating Information About Parallel and USB-Connected Print Devices” on
page 287 for more information.
Locating Information About Parallel and
USB-Connected Print Devices
Information about parallel and USB-connected printers is located in the /dev/printers
directory.
To query printers for IEEE1284 device identification information, type:
# /usr/lib/lp/bin/printer-info -a /dev/printers/*
For example:
287
Tips on Troubleshooting Printing Problems
# /usr/lib/lp/bin/printer-info -a /dev/printers/*
/dev/printers/0:
Manufacturer: Hewlett-Packard
Model:
hp color LaserJet 4650
Description: Hewlett-Packard color LaserJet 4650
Class:
PRINTER
Command set:
cmd[0]: PJL
cmd[1]: MLC
cmd[2]: BIDI-ECP
cmd[3]: PCLXL
cmd[4]: PCL
cmd[5]: PDF
cmd[6]: PJL
cmd[7]: MIME
cmd[8]: POSTSCRIPT
Note that when you add a device with Solaris Print Manager, the same program is used to detect
and provide information about the printer make and model in the Add Attached Printer
dialog box. See printmgr(1M) for more information.
Tips on Troubleshooting Printing Problems
Sometimes after setting up a printer, you find that nothing prints. Or, you might get a little
farther in the process: something prints, but it is not what you expect, the output is incorrect or
illegible.
Then, when you get past these problems, other problems might occur, such as:
■
■
■
lp commands hanging
Printers becoming idle
Users getting conflicting messages
Note – Although many of the suggestions in this chapter are relevant to parallel printers, they are
geared toward the more common serial printers.
Troubleshooting No Output (Nothing Prints)
When nothing prints, there are three general areas to check:
■
■
■
The printer hardware
The network
The LP print service
If you get a banner page, but nothing else, this is a special case of incorrect output. See
“Troubleshooting Incorrect Output” on page 290.
288
System Administration Guide: Solaris Printing • January 2009
Tips on Troubleshooting Printing Problems
Check the Hardware
The hardware is the first area to check. As obvious as it sounds, you should make sure that the
printer is plugged in and turned on. In addition, you should refer to the manufacturer's
documentation for information about hardware settings. Some computers use hardware
switches that change the characteristics of a printer port.
The printer hardware includes the printer, the cable that connects it to the computer, and the
ports into which the cable plugs at each end. As a general approach, you should work your way
from the printer to the computer. Check the printer. Check where the cable connects to the
printer. Check the cable. Check where the cable connects to the computer.
Check the Network
Problems are more common with remote print requests that are going from a print client to a
print server. You should make sure that network access between the print server and print
clients is enabled.
If the network is running the Network Information Service Plus (NIS+), see for instructions to
enable access between systems. If the network is not running the Network Information Service
(NIS) or NIS+, before you set up print servers and print clients, include the Internet address and
system name for each client system in the /etc/hosts file on the print server. Also, the IP
address and system name for the print server must be included in the /etc/hosts file of each
print client system.
Check the LP Print Service
For printing to work, the LP scheduler must be running on the print server. If it is not running,
you need to start it using the following command:
# svcadm enable application/print/server
In addition to the scheduler running, a printer must be enabled and accepting requests before it
will produce any output. If the LP print service is not accepting requests for a printer, the
submitted print requests are rejected. Usually, in that instance, the user receives a warning
message after submitting a print request. If the LP print service is not enabled for a printer, print
requests remain queued on the system until the printer is enabled.
In general, you should analyze a printing problem as follows:
■
Follow the path of the print request step-by-step.
■
Examine the status of the LP print service at each step.
■
■
■
■
Is the configuration correct?
Is the printer accepting requests?
Is the printer enabled to process requests?
If the request is hanging on transmission, set up lpr.debug in syslog.conf to display the
flow. See “Troubleshooting Printing Problems” on page 290.
Chapter 12 • Troubleshooting Printing Problems (Tasks)
289
Tips on Troubleshooting Printing Problems
■
If the request is hanging locally, examine the lpsched log (/var/lp/logs/lpsched).
■
If the request is hanging locally, have notification of the printer device errors (faults) mailed
to you, and re-enable the printer.
The procedures found in “Troubleshooting Printing Problems” on page 293 use this strategy to
help you troubleshoot various problems with the LP print service.
Troubleshooting Printing Problems
Enabling lpr.debug in the /etc/syslog.conf file provides a variety of useful information.
Because a large volume of information is provided, the preferred method is to enable this
feature only while debugging printing problems.
For more information, see “How to Debug Printing Problems” on page 295.
Troubleshooting Incorrect Output
If the printer and the print service software are not configured correctly, the printer might print,
but it might provide output that is not what you expect.
Check the Printer Type and File Content Type
If you used the wrong printer type when you set up the printer with the LP print service,
inappropriate printer control characters can be sent to the printer. The results are
unpredictable: nothing might print, the output might be illegible, or the output might be
printed in the wrong character set or font.
If you specified an incorrect file content type, the banner page might print, but that is all. The
file content types specified for a printer indicate the types of files the printer can print directly,
without filtering. When a user sends a file to the printer, the file is sent directly to the printer
without any attempt to filter it. The problem occurs if the printer cannot handle the file content
type.
When setting up print clients, you increase the chance for a mistake because the file content
types must be correct on both the print server and the print client. If you set up the print client
as recommended with any as the file content type, files are sent directly to the print server and
the print server determines the need for filtering. Therefore, the file content types have to be
specified correctly only on the server.
You can specify a file content on the print client to off-load filtering from the server to the client,
but the content type must be supported on the print server.
290
System Administration Guide: Solaris Printing • January 2009
Tips on Troubleshooting Printing Problems
Check the stty Settings
Many formatting problems can result when the default stty (standard terminal) settings do not
match the settings required by the printer. The following sections describe what happens when
some of the settings are incorrect.
Wrong Baud Settings
When the baud setting of the computer does not match the baud setting of the printer, usually
you get some output, but it does not look like the file you submitted for printing. Random
characters are displayed, with an unusual mixture of special characters and undesirable spacing.
The default for the LP print service is 9600 baud.
Note – If a printer is connected by a parallel port, the baud setting is irrelevant.
Wrong Parity Setting
Some printers use a parity bit to ensure that data received for printing has not been garbled
during transmission. The parity bit setting for the computer and the printer must match. If they
do not match, some characters either will not be printed at all, or will be replaced by other
characters. In this case, the output looks approximately correct. The word spacing is all right
and many letters are in their correct place. The LP print service does not set the parity bit by
default.
Wrong Tab Settings
If the file contains tabs, but the printer expects no tabs, the printed output might contain the
complete contents of the file, but the text might be jammed against the right margin. Also, if the
tab settings for the printer are incorrect, the text might not have a left margin, it might run
together, it might be concentrated to a portion of the page, or it might be incorrectly
double-spaced. The default is for tabs to be set every eight spaces.
Wrong Return Setting
If the output is double-spaced, but it should be single-spaced, either the tab settings for the
printer are incorrect or the printer is adding a line feed after each return. The LP print service
adds a return before each line feed, so the combination causes two line feeds.
If the print zigzags down the page, the stty option onlcr that sends a return before every line
feed is not set. The stty=onlcr option is set by default, but you might have cleared it while
trying to solve other printing problems.
Chapter 12 • Troubleshooting Printing Problems (Tasks)
291
Tips on Troubleshooting Printing Problems
Troubleshooting Hung lp Commands
If you type any of the lp commands (such as lpsystem, lpadmin, or lpstat) and nothing
happens (no error message, status information, or prompt is displayed), chances are something
is wrong with the LP scheduler. Such a problem can usually be resolved by stopping and
restarting the LP scheduler. See “How to Stop the Print Scheduler” on page 122 for instructions.
Troubleshooting Idle (Hung) Printers
You might find a printer that is idle, even though it has print requests queued to it.
A printer might seem idle when it should not be for one of the following reasons:
■
■
■
The current print request is being filtered.
The printer has a fault.
Networking problems might be interrupting the printing process.
Check the Print Filters
Slow print filters run in the background to avoid tying up the printer. A print request that
requires filtering will not print until it has been filtered.
Check Printer Faults
When the LP print service detects a fault, printing resumes automatically, but not immediately.
The LP print service waits about five minutes before trying again, and continues trying until a
request is printed successfully. You can force a retry immediately by enabling the printer.
Check Network Problems
When printing files over a network, you might encounter the following types of problems:
■
Requests sent to print servers might back up in the client system (local) queue.
■
Requests sent to print servers might back up in the print server (remote) queue.
Print Requests Backed Up in the Local Queue
Print requests submitted to a print server might back up in the client system queue for the
following reasons:
■
■
■
■
292
The print server is down.
The printer is disabled on the print server.
The network between the print client and print server is down.
Underlying network software was not set up properly.
System Administration Guide: Solaris Printing • January 2009
Troubleshooting Printing Problems
While you are tracking the source of the problem, you should stop new requests from being
added to the queue. See “How to Accept or Reject Print Requests for a Printer” on page 144 for
more information.
Print Requests Backed Up in the Remote Queue
If print requests back up in the print server queue, the printer has probably been disabled.
When a printer is accepting requests, but not processing them, the requests are queued to print.
Unless there is a further problem, once the printer is enabled, the print requests in the queue
should print.
Troubleshooting Conflicting Status Messages
A user might enter a print request and be notified that the client system has accepted it, then
receive mail from the print server that the print request has been rejected.
These conflicting messages might occur for the following reasons:
■
The print client might be accepting requests, while the print server is rejecting requests.
■
The definition of the printer on the print client might not match the definition of that
printer on the print server. More specifically, the definitions of the print job components,
like filters, character sets, print wheels, or forms are not the same on the client and server
systems.
You should check that identical definitions of these job components are registered on both the
print clients and print servers so that local users can access printers on the print servers.
Troubleshooting Printing Problems
This section contains step-by-step instructions that explain:
■
■
■
■
■
How to troubleshoot no output
How to troubleshoot incorrect output
How to unhang the lp commands
How to troubleshoot an idle (hung) printer
How to resolve conflicting status messages
Chapter 12 • Troubleshooting Printing Problems (Tasks)
293
Troubleshooting Printing Problems
Troubleshooting No Printer Output
This task includes the following troubleshooting procedures to try when you submit a print
request to a printer and nothing prints:
■
■
■
■
Check the hardware (“How to Check the Printer Hardware” on page 294).
Check the network (“How To Check the Printer Network Connections” on page 295).
Check the LP print service basic functions (“How to Check the Basic Functions of the LP
Print Service” on page 296).
Check printing from a Solaris print client to a Solaris print server (“How to Check Printing
From a Solaris Print Client to a Solaris Print Server” on page 300).
Try the first three procedures in the order in which they are listed, before going to the print
client/server section. However, if the banner page prints, but nothing else does, turn to the
instructions under “How to Troubleshoot Incorrect Output” on page 301.
▼
How to Check the Printer Hardware
1
Check that the printer is plugged in and turned on.
2
Check that the cable is connected to the port on the printer and to the port on the system or
server.
3
Make sure that the cable is the correct cable and that it is not defective.
Refer to the manufacturer‘s documentation. If the printer is connected to a serial port, verify
that the cable supports hardware flow control. A NULL modem adapter supports this. The
following table shows the pin configuration for NULL modem cables.
294
Host
Printer
Mini-Din-8
25-Pin D-sub
25-Pin D-sub
-
1 (FG)
1(FG)
3(TD)
2(TD)
3(RD)
5(RD)
3(RD)
2(TD)
6(RTS)
4(RTS)
5(CTS)
2(CTS)
5(CTS)
4(RTS)
4(SG)
7(SG)
7(SG)
7(DCD)
6(DSR), 8(DCD)
20(DTR)
System Administration Guide: Solaris Printing • January 2009
Troubleshooting Printing Problems
Host
Printer
Mini-Din-8
25-Pin D-sub
25-Pin D-sub
1(DTR)
20(DTR)
6(DSR), 8(DCD)
4
Check that any hardware switches for the ports are set properly.
See the printer documentation for the correct settings.
5
Check that the printer is operational.
Use the printer's self-test feature, if the printer has one. Check the printer documentation for
information about printer self-testing.
6
Check that the baud settings for the computer and the printer are correct.
If the baud settings are not the same for both the computer and the printer, sometimes nothing
will print, but more often you get incorrect output. For instructions, see “How to Troubleshoot
Incorrect Output” on page 301.
▼
How To Check the Printer Network Connections
●
Check that the network link between the print server and the print client is set up correctly.
print-client# ping print-server
print-server is alive
print-server# ping print-client
print-client not available
If the message says the system is alive, you know you can reach the system, so the network is all
right. The message also tells you that either a naming service or the local /etc/hosts file has
translated the host (system) name you entered into an IP address; otherwise, you would need to
enter the IP address.
If you get a not available message, try to answer the following questions: How is NIS or NIS+
set up at your site? Do you need to take additional steps so that print servers and print clients
can communicate with one another? If your site is not running NIS or NIS+, have you entered
the IP address for the print server in each print client's /etc/hosts file, and entered all print
client IP addresses in the /etc/hosts file of the print server?
▼
1
How to Debug Printing Problems
On the system that you want to debug remote printing problems, become superuser or assume
an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see
“Configuring RBAC (Task Map)” in System Administration Guide: Security Services.
Chapter 12 • Troubleshooting Printing Problems (Tasks)
295
Troubleshooting Printing Problems
2
Type the following command:
# echo "lpr.debug /var/tmp/lpr.debug" >>/etc/syslog.conf
Note – The white space between lpr.debug and /var/tmp/lpr.debug must be a tab.
3
Create the lpr.debug file.
# touch /var/tmp/lpr.debug
4
Restart the syslog service.
# svcadm restart system.log
▼
How to Check the Basic Functions of the LP Print
Service
This procedure uses the printer luna as an example of checking basic LP print service functions.
1
On the print server, make sure that the LP print service is running.
a. Check whether the LP scheduler is running by using one of the following methods.
■
Use the lpstat command.
% lpstat -r
scheduler is running
A message is displayed, indicating whether the LP scheduler is running.
■
Use the svcs command.
% svcs application/print/server
The following output is displayed if the scheduler is running.
STATE
online
STIME
Oct_24
FMRI
svc:/application/print/server:default
The following output is displayed if the scheduler is not running.
STATE
disabled
STIME
14:27:48
FMRI
svc:/application/print/server:default
b. If the scheduler is not running, become superuser, lp, or assume an equivalent role. Start the
scheduler by using one of the following methods.
■
296
Use the lpsched command.
System Administration Guide: Solaris Printing • January 2009
Troubleshooting Printing Problems
# /usr/lib/lpsched
Print services started.
A message is displayed, indicating the print services have been started.
■
Use the svcadm command.
# svcadm enable application/print/server
When you use the svcadm command, no message indicating whether the print services
have been started is displayed. To determine if the print services are online, run the svcs
application/print/server command again.
If you have trouble starting the scheduler, see “How to Unhang the LP Print Service” on
page 305.
2
On both the print server and print client, make sure that the printer is accepting requests.
a. Check that the printer is accepting requests.
# lpstat -a
mars accepting requests since Jan 12 14:23 2004
luna not accepting requests since Jan 12 14:23 2004
unknown reason
This command verifies that the LP system is accepting requests for each printer configured
for the system.
b. If the printer is not accepting requests, become superuser, lp, or assume an equivalent role,
and allow the printer to accept print requests.
# accept luna
The specified printer now accepts requests.
3
On both the print server and print client, make sure that the printer is enabled to print
submitted print requests.
a. Check that the printer is enabled.
# lpstat -p luna
printer luna disabled since Jan 12 14:25 2004.
available.
unknown reason
This command displays information about printer status. You can omit the printer name to
obtain information about all printers set up for the system. The following example shows a
printer that is disabled.
Chapter 12 • Troubleshooting Printing Problems (Tasks)
297
Troubleshooting Printing Problems
b. If the printer is disabled, become superuser, lp, or assume an equivalent role, and enable the
printer.
# enable luna
printer "luna" now enabled.
The specified printer is enabled to process print requests.
4
On the print server, make sure that the printer is connected to the correct serial port.
a. Check that the printer is connected to the correct serial port.
# lpstat -t
scheduler is running
system default destination: luna
device for luna: /dev/term/a
The message device for printer-name shows the port address. Is the cable connected to the
port to which the LP print service says is connected? If the port is correct, skip to Step 5.
b. Become superuser, lp, or assume an equivalent role.
c. Change the file ownership of the device file that represents the port.
# chown lp device-filename
This command assigns the special user lp as the owner of the device file. In this command,
device-filename is the name of the device file.
d. Change the permissions on the printer port device file.
# chmod 600 device-filename
This command allows only superuser, lp, or an equivalent role to access the printer port
device file.
5
On both the print server and print client, make sure that the printer is configured properly.
a. Check that the printer is configured properly.
# lpstat -p luna -l
printer luna is idle. enabled since Jan 12 14:24 2004. available
Content types: postscript
Printer types: PS
The above example shows a PostScript printer that is configured properly, and that is
available to process print requests. If the printer type and file content type are correct, skip to
Step 6.
298
System Administration Guide: Solaris Printing • January 2009
Troubleshooting Printing Problems
b. If the printer type or file content type is incorrect, try setting the print type to unknown and
the content type to any on the print client.
# lpadmin -p printer-name -T printer-type -I file-content-type
6
On the print server, make sure that the printer is not faulted.
a. Check that the printer is not waiting because of a printer fault.
# lpadmin -p printer-name -F continue
This command instructs the LP print service to continue if it is waiting because of a fault.
b. Force an immediate retry by re-enabling the printer.
# enable printer-name
c. (Optional) Instruct the LP print service to enable quick notification of printer faults.
# lpadmin -p printer-name -A ’write root’
This command instructs the LP print service to set a default policy of writing root, sending
the printer fault message to the terminal on which root is logged in, if the printer fails. This
might help you get quick notification of faults as you try to fix the problem.
7
Make sure that the printer is not set up incorrectly as a login terminal.
Note – It is easy to mistakenly set up a printer as a login terminal, so be sure to check this
possibility even if you think it does not apply.
a. Look for the printer port entry in the ps -ef command output.
# ps -ef
root 169 167
root 939
1
root 859 858
/interfaces/luna
luna-294 rocket!smith
#
0 Apr 04 ?
0 19:30:47 ?
0 19:18:54 term/a
0:08 /usr/lib/saf/listen tcp
0:02 /usr/lib/lpsched
0:01 /bin/sh -c \ /etc/lp
“passwd\n##
In the output from this command, look for the printer port entry. In the above example, port
/dev/term/a is set up incorrectly as a login terminal. You can tell by the "passwd\n##
information at the end of the line. If the port is set correctly, skip the last steps in this
procedure.
b. Cancel the print request(s).
# cancel request-id
In this command, request-id is the request ID number for a print request to be canceled.
Chapter 12 • Troubleshooting Printing Problems (Tasks)
299
Troubleshooting Printing Problems
c. Set the printer port to be a nonlogin device.
# lpadmin -p printer-name -h
d. Check the ps -ef command output to verify that the printer port is no longer a login device.
If you do not find the source of the printing problem in the basic LP print service functions,
continue to one of the following procedures for the specific client/server case that applies.
▼
How to Check Printing From a Solaris Print Client to a
Solaris Print Server
1
Check the basic functions of the LP print service on the print server, if you have not done so
already.
For instructions on checking basic functions, see “How to Check the Basic Functions of the LP
Print Service” on page 296. Make sure that the printer works locally before trying to figure out
why nothing prints when a request is made from a print client.
2
Check the basic functions of the LP print service on the print client, if you have not done so
already.
On the print client, the printer has to be enabled and accepting requests before any request from
the client will print.
Note – For most of the following steps, you must be logged in as root or lp.
3
Make sure that the print server is accessible.
a. On the print client, send an“are you there?”request to the print server.
print-client# ping print-server
If you receive the message print-server not available, you might have a network problem.
4
Verify that the print server is operating properly.
# lpstat -t luna
scheduler is running
system default destination: luna
device for luna: /dev/term/a
luna accepting requests since Jan 12 14:26 2004
printer luna now printing luna-314. enabled since Jan 12 14:26 2004.
available.
luna-129
root
488 Jan 12 14:32
#
The above example shows a print server up and running.
300
System Administration Guide: Solaris Printing • January 2009
Troubleshooting Printing Problems
5
▼
If the print server is not operating properly, go back to step 1.
How to Troubleshoot Incorrect Output
1
Log in as superuser, lp, or assume an equivalent role.
2
Make sure that the printer type is correct.
An incorrect printer type might cause incorrect output. For example, if you specify printer type
PS and the pages print in reverse order, try printer type PSR. (These type names must be in
uppercase.) Also, an incorrect printer type might cause missing text, illegible text, or text with
the wrong font. To determine the printer type, examine the entries in the terminfo database.
For information on the structure of the terminfo database, see “Printer Type” on page 52.
a. On the print server, display the printer's characteristics.
$ lpstat -p luna -l
printer luna is idle. enabled since Thu Jul 12 15:02:32 ...
Form mounted:
Content types: postscript
Printer types: PS
Description:
Connection: direct
Interface: /usr/lib/lp/model/standard
After fault: continue
Users allowed:
(all)
Forms allowed:
(none)
Banner not required
Character sets:
Default pitch:
Default page size: 80 wide 66 long
Default port settings:
$
b. Consult the printer manufacturer's documentation to determine the printer model.
c. If the printer type is not correct, change it with Solaris Print Manager's Modify Printer
Properties window, or use the following lpadmin command.
# lpstat -p printer-name -T printer-type
On the print client, the printer type should be unknown. On the print server, the printer type
must match a terminfo entry that is defined to support the model of printer you have. If
there is no terminfo entry for the type of printer you have, see “How to Add a terminfo
Entry for an Unsupported Printer” on page 172.
Chapter 12 • Troubleshooting Printing Problems (Tasks)
301
Troubleshooting Printing Problems
3
If the banner page prints, but there is no output for the body of the document, check the file
content types.
File content types specified for a printer indicate the types of files the printer can print directly
without filtering. An incorrect file content type causes filtering to be bypassed when it might be
needed.
a. Note the information on file content type that was supplied in the previous step by the
lpstat command.
On the print client, the file content type should be any, unless you have good reason to
specify one or more explicit content types. If a content is specified on the client, filtering is
done on the print client, rather than the print server. In addition, content types on the client
must match the content types specified on the print server, which in turn must reflect the
capabilities of the printer.
b. Consult your printer manufacturer's documentation to determine which types of files the
printer can print directly.
The names you use to refer to these types of files do not have to match the names used by the
manufacturer. However, the names you use must agree with the names used by the filters
known to the LP print service.
c. If the file content type is not correct, change it with Solaris Print Manager's Modify Printer
Properties window, or the following lpadmin command.
# lpadmin -p printer-name -I file-content-type(s)
Run this command on either the print client, or print server, or both, as needed. Try -I any
on the print client, and -I "" on the print server. The latter specifies a null file content type
list, which means an attempt should be made to filter all files, because the printer can
directly print only files that exactly match its printer type.
This combination is a good first choice when files are not printing. If it works, you might
want to try specifying explicit content types on the print server to reduce unnecessary
filtering. For a local PostScript printer, you should use postscript, or postscript,simple,
if the printer supports these types. Be aware that PS and PSR are not file content types; they
are printer types.
If you omit -I, the file content list defaults to simple. If you use the -I option and want to
specify file content types in addition to simple, simple must be included in the list.
When specifying multiple file content types, separate the names with commas. Or you can
separate names with spaces and enclose the list in quotation marks. If you specify any as the
file content type, no filtering will be done and only file types that can be printed directly by
the printer should be sent to it.
302
System Administration Guide: Solaris Printing • January 2009
Troubleshooting Printing Problems
4
Check that the print request does not bypass filtering needed to download fonts.
If a user submits a print request to a PostScript printer with the lp -T PS command, no filtering
is done. Try submitting the request with the lp -T postscript command to force filtering,
which might result in the downloading of non-resident fonts needed by the document.
5
Make sure that the stty settings for the printer port are correct.
a. Read the printer documentation to determine the correct stty settings for the printer port.
Note – If a printer is connected to a parallel or USB port, the baud setting is irrelevant.
b. Examine the current settings by using the stty command.
# stty -a < /dev/term/a
speed 9600 baud;
rows = 0; columns = 0; ypixels = 0; xpixels = 0;
eucw 1:0:0:0, scrw 1:0:0:0
intr = ^c; quit = ^|; erase = ^?; kill = ^u;
eof = ^d; eol = <undef>; eol2 = <undef>; swtch = <undef>;
start = ^q; stop = ^s; susp = ^z; dsusp = ^y;
rprnt = ^r; flush = ^o; werase = ^w; lnext = ^v;
parenb -parodd cs7 -cstopb -hupcl cread -clocal -loblk -parext
-ignbrk brkint -ignpar -parmrk -inpck istrip -inlcr -igncr icrnl -iuclc
ixon -ixany -ixoff imaxbel
isig icanon -xcase echo echoe echok -echonl -noflsh
-tostop echoctl -echoprt echoke -defecho -flusho -pendin iexten
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel tab3
#
This command shows the current stty settings for the printer port.
The following table shows the default stty options used by the LP print service's standard
printer interface program.
Option
Meaning
-9600
Set baud rate to 9600
-cs8
Set 8-bit bytes
-cstopb
Send one stop bit per byte
-parity
Do not generate parity
-ixon
Enable XON/XOFF (also known as START/STOP or DC1/DC3)
-opost
Do “output post-processing” using all the settings that follow in this table
Chapter 12 • Troubleshooting Printing Problems (Tasks)
303
Troubleshooting Printing Problems
Option
Meaning
-olcuc
Do not map lowercase to uppercase
-onlcr
Change line feed to carriage return/line feed
-ocrnl
Do not change carriage returns into line feeds
-onocr
Output carriage returns even at column 0
-n10
No delay after line feeds
-cr0
No delay after carriage returns
-tab0
No delay after tabs
-bs0
No delay after backspaces
-vt0
No delay after vertical tabs
-ff0
No delay after form feeds
c. Change the stty settings.
# lpadmin -p printer-name -o "stty= options"
Use the following table to choose stty options to correct various problems affecting print
output.
stty Values
Result
Possible Problem From Incorrect Setting
110, 300, 600, 1200,
1800, 2400, 4800, 9600,
19200, 38400
Sets baud rate to the specified value
(enter only one baud rate)
Random characters and special
characters might be printed and spacing
might be inconsistent
oddp
Sets odd parity
evenp
Sets even parity
Missing or incorrect characters appear
randomly
-parity
Sets no parity
-tabs
Sets no tabs
Text is jammed against right margin
tabs
Sets tabs every eight spaces
Text has no left margin, is run together,
or is jammed together
-onlcr
Sets no carriage return at the
beginning of line(s)
Incorrect double spacing
onlcr
Sets carriage return at beginning of
line(s)
The print zigzags down the page
You can change more than one option setting by enclosing the list of options in single
quotation marks and separating each option with spaces. For example, suppose the printer
304
System Administration Guide: Solaris Printing • January 2009
Troubleshooting Printing Problems
requires you to enable odd parity and set a 7-bit character size. You would type a command
similar to that shown in the following example:
# lpadmin -p neptune -o "stty=’parenb parodd cs7’"
The stty option parenb enables parity checking/generation, parodd sets odd parity
generation, and cs7 sets the character size to 7 bits.
6
Verify that the document prints correctly.
# lp -d printer-name filename
▼
How to Unhang the LP Print Service
1
Log in as superuser, lp, or assume an equivalent role.
2
Stop the LP print service.
# svcadm disable /application/print/server
3
Restart the LP print service.
# svcadm enable /application/print/server
The LP print service should restart. If you are having trouble restarting the scheduler, see “How
to Restart the Print Scheduler” on page 122.
Troubleshooting an Idle (Hung) Printer
This task includes a number of procedures to use when a printer appears idle but it should not
be. It makes sense to try the procedures in order, but the order is not mandatory.
▼
1
How to Check That the Printer is Ready to Print
Display printer status information.
# lpstat -p printer-name
The information displayed shows you whether the printer is idle or active, enabled or disabled,
or available or not accepting print requests. If everything looks all right, continue with other
procedures in this section. If you cannot run the lpstat command, see “How to Unhang the LP
Print Service” on page 305.
2
If the printer is not available (not accepting requests), allow the printer to accept requests.
# accept printer-name
Chapter 12 • Troubleshooting Printing Problems (Tasks)
305
Troubleshooting Printing Problems
The printer begins to accept requests into its print queue.
3
If the printer is disabled, re-enable it.
# enable printer-name
This command re-enables the printer so that it will act on the requests in its queue.
Checking for Print Filtering
Check for print filtering by using the lpstat -o command.
$ lpstat -o luna
luna-10
fred
luna-11
iggy
luna-12
jack
$
1261
1261
1261
Mar 12 17:34 being filtered
Mar 12 17:36 on terra
Mar 12 17:39 on terra
See if the first waiting request is being filtered. If the output looks like the above example, the file
is being filtered; the printer is not hung, it just is taking a while to process the request.
▼
How to Resume Printing After a Printer Fault
1
Look for a message about a printer fault and try to correct the fault if there is one.
Depending on how printer fault alerts have been specified, messages might be sent to root by
email or written to a terminal on which root is logged in.
2
Re-enable the printer.
# enable printer-name
If a request was blocked by a printer fault, this command will force a retry. If this command
does not work, continue with other procedures in this section.
▼
1
How to Send Print Requests to a Remote Printer When
Requests in the Local Queue Are Backed Up
On the print client, stop further queuing of print requests to the print server.
# reject printer-name
2
On the print client, send an“are you there?”request to the print server.
print-client# ping print-server
print-server is alive
306
System Administration Guide: Solaris Printing • January 2009
Troubleshooting Printing Problems
If you receive the message print-server not available, you might have a network problem.
3
After you fix the above problem, allow new print requests to be queued.
# accept printer-name
4
If necessary, re-enable the printer.
# enable printer-name
▼
1
How to ReleasePrint Requests That Are Backed Up
onthe Print Server
On the print server, stop further queuing of print requests from any print client to the print
server.
# reject printer-name
2
Display the lpsched log file.
# more /var/lp/logs/lpsched
The information displayed might help you pinpoint what is preventing the print requests from
the print client to the print server from being printed.
3
After you fix the problem, allow new print requests to be queued.
# accept printer-name
4
If necessary, re-enable the printer on the print server.
# enable printer-name
▼
1
How to Resolve Conflicting Printer Status Messages
On the print server, verify the printer is enabled and is accepting requests.
# lpstat -p printer-name
Users will see conflicting status messages when the print client is accepting requests, but the
print server is rejecting requests.
2
On the print server, check that the definition of the printer on the print client matches the
definition of the printer on the print server.
# lpstat -p -l printer-name
Chapter 12 • Troubleshooting Printing Problems (Tasks)
307
Troubleshooting Printing Problems
Look at the definitions of the print job components, like print filters, character sets, print
wheels, and forms, to be sure they are the same on both the client and server systems so that
local users can access printers on print server systems.
308
System Administration Guide: Solaris Printing • January 2009
A
A P P E N D I X
A
Using the Internet Printing Protocol
This appendix includes information for using the Internet Printing Protocol (IPP) in the Solaris
OS. IPP provides interoperability for CUPS and Windows clients. In the Solaris OS, the PAPI
implementation of IPP provides both server-side and client-side printing support.
The following information is included in this appendix:
■
■
■
■
■
■
■
■
“Overview of Solaris IPP Support” on page 309
“Overview of the IPP Listening Service” on page 310
“IPP Components” on page 311
“IPP Support Model” on page 313
“IPP Server-Side Support” on page 314
“IPP Client-Side Support ” on page 318
“IPP Attributes” on page 319
“IPP Operation Keywords” on page 316
For more information about open printing, go to the following web sites:
■
■
http://www.opensolaris.org/os/community/printing/
http://sf.net/projects/openprinting
Overview of Solaris IPP Support
IPP is an application level network printing protocol that can be used for distributed printing
though the use of Internet tools and technologies. The protocol was initiated to provide
universal solutions for printing documents from the Internet. IPP is employed by several
system and printer vendors because the protocol includes tools that are necessary to make a
broad set of standard requests and receive standard responses from print client systems. IPP
provides versioning, extensibility, and security, as well as enhanced functionality, including
improvements in job and printer status retrieval.
IPP support in the Solaris release is comprised of client-side support and server-side support.
Both the client-side and the server-side support share some common elements, as well as
309
Overview of the IPP Listening Service
elements that are unique to either client or server operations. IPP client and server support
shares a base code that implements some of these common components. Server-side support
for IPP is available, starting with the Solaris 10 3/05 release. Client-side support was introduced
in the Solaris 10 5/08 release.
With IPP, you can perform the following tasks:
■
■
■
■
■
■
■
■
■
Find out about a printer's capabilities
Submit print jobs to a printer
Determine the status of a printer or a print job
Cancel a previously submitted print job
Hold, release, and restart print jobs
Modify print jobs
Move print jobs between queues
Accept, reject, enable, and disable print queues
Modify and delete printers
IPP includes a simplified model for printing that abstracts the various facets of real world
printing solutions. This model uses objects, attributes, and a set of operations that are
performed against these objects. IPP uses these abstracts to communicate information between
print service consumers, or customers, and print service providers in a detailed, standard,
extensible, and secure manner.
Overview of the IPP Listening Service
The IPP Listening Service, also referred to as the listener, provides an IPP network protocol
service that enables print client systems with a means of interacting with a print service on the
system that is running the listener. This listener implements server-side IPP support, which
includes a set of standard operations and attributes. The listener is implemented on Solaris as an
Apache module and a series of shared libraries containing IPP operation and wire support. The
IPP software stack is installed when the Solaris OS is installed on the system. The IPP listening
service is an SMF service that depends on the print service to run. As a result, IPP is
automatically enabled on a print server when the first print queue has been added . It is also
disabled when the last print queue has been removed.
On the front end, IPP server support is layered on top of HTTP, Version 1.1. The server receives
IPP operations through an HTTP POST request. The server then performs the requested
operation and sends a response back to the client via HTTP. These operations include, but are
not limited to, submitting and canceling a print job, and querying attributes of a printer, a print
job, or all the print jobs that have been queued to a printer. On the back end, the IPP listener
performs operations by communicating with a print spooler. In the Solaris OS, this spooler is
currently the lpsched daemon.
310
System Administration Guide: Solaris Printing • January 2009
IPP Components
How the IPP Listening Service Works
The IPP Listening Service implementation (server-side support) is embedded under the Apache
web server. The web server receives IPP operations through HTTP POST requests. When an
HTTP POST request is received, it is then passed on to the Apache IPP module (mod_ipp.so).
Based on configuration, the Apache web service can also provide an authentication service and
be used for encryption between print client and server. The listening service runs as it's own
dedicated instance of Apache.
This process is as follows:
1. An IPP request is sent from the client to the server.
2. The Apache web server accepts the connection.
3. The Apache web server then hands the connection to mod_ipp.
4. mod_ipp passes the connection and configuration data to libipp-listener.
5. libipp-listener reads the request by using lipipp-core.
6. libipp-listener dispatches the request to the operation handler located in
lipipp-listener.
7. The operation handler converts the request to a PAPI call and then makes the call.
8. The PAPI call is translated to a print service specific request by using psm-lpsched.
9. The print service responds to the request.
10. The psm-lpsched command converts the response to PAPI results.
11. The libpapi operation returns to the libipp-listener operation handler.
12. The libipp-listener operation handler passes results to dispatcher.
13. The libipp-listener dispatcher writes results to client by using the libipp-core library.
14. The dispatcher returns the mod_ipp entry point.
IPP Components
The following table describes the components that make up IPP support in the Solaris OS:
TABLE A–1
IPP Components
Component
Function
httpd
The Apache Web Server. This provides an HTTP transport listener that
can listen for HTTP requests on the IANA registered IPP port of
tcp/631. Once a request has been received, it is passed on to the IPP
Apache module.
Appendix A • Using the Internet Printing Protocol
311
IPP Components
TABLE A–1
IPP Components
(Continued)
Component
Function
mod_ipp.so
The Apache IPP module. This Apache module looks at the clients HTTP
request to determine if it looks like an IPP request (mime-type of
application/ipp and HTTP POST operation). Once it has been
determined to be an IPP request it is passed on to the IPP listener library.
This module also introduces and processes IPP-specific Apache
configuration directives.
libipp-listener.so
The IPP listener library. This library makes use of a core IPP marshaling
library to decode the IPP request and dispatch it to one of it's IPP
operation implementation functions. These functions convert the IPP
request into PAPI calls to interact with the local print service. Once
serviced, the listener library encodes and sends the results back to the
requesting client.
libipp-core.so
The IPP marshaling library decodes and encodes IPP byte streams for
reception and transmission on the wire.
libpapi.so
The PAPI library provides applications like the IPP listening service a
means of interacting with the print service.
IPP Libraries
The IPP Listening Service library (libipp-listener) – Is where the bulk of the protocol
request processing occurs. The library reads and validates requests by using the core IPP library,
libipp-core.so. After the request has been validated, the request is translated to a series of
client API calls. The result of these calls are then translated into an appropriate IPP response by
using the core IPP library. The response is returned to the client system by the web server. The
interface to the listening service library is a project private interface that is specific to the IPP
server-side implementation.
The IPP Core library (libipp-core.so) – Is shared between client and server operation. The
IPP core library contains routines that enable it to read and write protocol requests and
responses. The library converts IPP request and response data between the standard binary
representation and a set of common data structures. Ultimately, this common data
representation is used in translating requests to and from a print service neutral representation
and passed between a generic printing interface, libpapi.so. Since both client-side and
server-side IPP support must perform this function, this is shared by clients and servers.
The PAPI library (libpapi.so) – Provides applications a print service independent means of
interacting with a print service or protocol. In this instance, it provides the Apache IPP listening
service a means of interacting with the local LP service. It determines the print service to
interact with based on client-side queue configuration data stored in the printers.conf
configuration database.
312
System Administration Guide: Solaris Printing • January 2009
IPP Support Model
IPP Support Model
The sections that follow describe the various aspects of the IPP support model.
IPP Object Model
IPP contains two basic object types: Printer and Job. Each object type contains characteristics of
a real printer or a real print job. Each object type is defined as a set of possible attributes that can
be supported by that particular object type.
To enable all Printer and Job objects to be unambiguously referenced, they are all identified by a
Uniform Resource Identifier (URI). The URI concept and implementation as an identifier is
useful because it provides a means of uniquely identifying both the method of communicating
with the print service (IPP) and a distinct network identifier for a printer queue
(//server/printers/queue) or job.
When a print request is created, the IPP protocol message generated must contain the
printer-uri of the Printer object the operation is to be performed against. Possible values for a
printer-uri can be retrieved from a printer object or naming service printer-uri-supported
attribute.
IPP Printer Object
The Printer object is the main object in the IPP model. The Printer object provides the
server-side support for IPP. The Printer object contains the functions that are normally
associated with physical output devices. These functions include spooling, scheduling,
transformation, and managing of multiple devices that are associated with the print server.
Printer objects are uniquely identified by a printer-uri. They can be registered as entries in a
directory for the purpose of searching and locating static information about the Printer object,
such as name, context, and printer capabilities. Dynamic information, for example, the number
of jobs that are queued to the printer, errors and warnings, are associated with the Printer object
itself.
Note – A Printer object can be used to represent a real or virtual device, as long as the semantics
are consistent with those of a Printer object.
IPP clients implement the protocol on the client-side, providing you, or a program running on
your behalf, the ability to query Printer objects for the purpose of submitting and managing
print jobs. The IPP server is the part of the Printer object that implements the application
semantics of the print service. Printer objects can be embedded in an output device or they can
be implemented on network host that communicates with an output device.
Appendix A • Using the Internet Printing Protocol
313
IPP Server-Side Support
When a job is submitted to a Printer object, the Printer object validates the attributes in the
request and then creates the Job object. When you query a job status or monitor its progress,
you are interacting with the Job object. If you cancel a print job, you are using the Job objects's
Cancel-job operation. For more information about Job object operations, see “IPP Operation
Keywords” on page 316.
IPP Job Object
A Job object is used to model a print job. Job objects contain documents. The information that
is required to create a Job object is sent to the print sever in the form of a create request when
you initiate a print request through the IPP client to the Printer object. The Printer object
validates the create request, and if accepted, the Printer object then creates a new Job object.
This object is uniquely identified by a combination of printer-uri and job-id attributes or a
job-uri attribute. See “IPP Operation Keywords” on page 316 for more details.
IPP Server-Side Support
The IPP listening service provides an IPP network protocol service that enables print client
systems a means of interacting with a print service on the system that is running the listener.
This listener implements server-side IPP protocol support that includes a broad set of standard
operations and attributes. The listener is implemented in the Solaris OS as an Apache module
and a series of shared libraries that contain IPP operation and wire support. The IPP software
stack is installed when the Solaris OS is installed on the system. The IPP listening service is an
SMF service that depends on the print service to run. As a result, IPP is automatically enabled
on a print server when the first print queue has been added . IPP is disabled when the last print
queue has been removed.
Server-side support for IPP starts with the IPP module, mod_ipp. The listening service uses the
Apache web server because the Solaris OS already ships with Apache software. The Apache
module uses the Dynamic Shared Object (DSO) interface to plug in under the web server. Using
the DSO interface, the module includes configuration support for the IPP Listening service and
an entry point for the web server to hand the listener the HTTP connection. This modular
approach enables the IPP support to reuse Apache delivered encryption and authentication
mechanisms
314
System Administration Guide: Solaris Printing • January 2009
IPP Server-Side Support
Apache
IPP
mod_ipp.so
libipp-listener.so
libipp-core.so
libpapi.so
Name
Service
Printing API
psm-lpsched.so
Print Service
lpsched
IPP Server
Configuration of IPP Server-Side Data
The IPP listening service configuration file, /etc/apache/httpd-standalone-ipp.conf, is like
any normal Apache 1.3 configuration file. The configuration files takes any Apache 1.3
configuration directives that you want to use.
The default configuration includes the following features:
■
Listening on port 631.
■
Loading of a minimal set of Apache modules.
■
Enabling all supported IPP operations at the /printers/path (ipp://server/printers/)
without requiring authentication.
The default operations that are enabled for /printers/ is limited to a set of operations that
poses less of a security risk. However, all operations are enabled at the /admin/path
(ipp://server/admin/), with basic authentication required.
The mod_ipp Apache configuration options to choose from are described in the following table:
TABLE A–2
mod_ipp Apache Module Configuration Options:
Value
Description
ipp-conformance
Selects level of protocol checking. The default is
automatic, which provides maximal client interaction.
ipp-operation
Enables you to selectively enable or disable IPP
operation support for one more IPP operations.
Appendix A • Using the Internet Printing Protocol
315
IPP Server-Side Support
TABLE A–2
mod_ipp Apache Module Configuration Options:
(Continued)
Value
Description
ipp-default-user
Selects the user name to use when contacting the local
print service. The default is the lp print user, which
enables more functional proxying.
ip-default-service
Selects the default print service to direct requests to.
The default is the lpsched daemon and currently only
has been tested against lpsched.
The following table shows the conformance checking types for the Apache Web Server
Configuration. The syntax to use is:
ipp-conformance value
TABLE A–3
Apache Web Server Conformance Checking Types
Value
Meaning
Automatic
Only check that the requested operation is supported
by the protocol listener. (default)
1.0
Check that the request conforms to IPP/1.0.
1.1
Check that the request conforms to IPP/1.1.
The following is an annotated example of an apache configuration file:
if mod_ipp is loaded User lp run as "lp"
URI: ipp://{host]/printers/{queue}
SetHandler application/ipp use mod_ipp for this location
ipp-conformance strict enable strict protocol checking (default)
ipp-operation all enable enable all supported operations
IPP Operation Keywords
IPP objects support operations. An operation consists of a request and a response. When a print
client communicates with an IPP object, the client issues an operation request to the URI for
that object. Operation requests and responses have parameters that identify the operation.
Operations also have attributes that affect the run time characteristics of the operation. These
operation-specific attributes are defined as operation attributes. Print requests contain
operation attributes, object attributes, and the required document data to perform the specific
operation. Each request requires a response from the object. Each response indicates success or
failure of the operation with a corresponding status code as a response parameter. Responses
contain operation attributes, object attributes, and status messages that are generated during
the operation request.
316
System Administration Guide: Solaris Printing • January 2009
IPP Server-Side Support
The following table describes the IPP operation keywords for the Apache Web Server
Configuration.
TABLE A–4
IPP Operation Keywords
Value
Meaning
All
This keyword is used in place of an operation. The
keyword is meant to signify that all operations that are
supported by mod_ipp are selected.
Required
This keyword is used in place of an operation. The
keyword is meant to signify that all the required
operations, as defined in RFC-2911, are selected,
including the following: print-job, cancel-job,
get-job-attributes, get-jobs, and
get-printer-attributes.
Print-job
A client wants to submit a print job with only a single
document. The document data is sent with the
request.
Print-uri
Unsupported
Validate-job
A client wants to validate that a print job can be
handled by the scheduler before submitting a print
job.
Create-job
A client wants to submit a print job with multiple
documents. The documents are sent with the
send-document and send-uri operations.
Send-document
A client wants to add a document to a print job that is
created with the print-job operation. The document
data is sent with the request.
Send-uri
Unsupported
Cancel-job
A client wants to cancel a print job.
Get-job-attributes
A client wants to gather information about a print job.
Get-jobs
A client wants to gather a list of print jobs in a
particular print queue.
Get-printer-attributes
A client wants to gather information about a
particular print queue.
Hold-job
A client wants to hold a particular print job.
Release-job
A client wants to release a particular print job.
Restart-job
A client wants to restart a particular print
Appendix A • Using the Internet Printing Protocol
317
IPP Client-Side Support
TABLE A–4
IPP Operation Keywords
(Continued)
Pause-printer
A client wants to pause (disable) a particular print
queue. This operation will stop the processing of print
requests in the queue. Note that the operation does
not stop the queue from accepting jobs.
Resume-printer
A client wants to resume (enable) processing of jobs in
a particular print queue.
Purge-jobs
A client wants to remove all jobs from a particular
print queue.
Set-printer-attributes
Create or modify attributes of a printer.
Set-job-attributes
Modify attributes of an existing print job.
Enable-printer
Resume (accept) queueing of print jobs.
Disable-printer
Disable (reject) queueing of print jobs.
cups-get-default
Retrieve the default destination for a print service.
cups-get-printers
Enumerate all printers available from the print
service.
cups-get-classes
Enumerate all classes available from the print service.
cups-accept-jobs
CUPS specific equivalent of Enable-printer.
cups-reject-jobs
CUPS specific equivalent of Disable-printer.
cups-move-jobs
Move jobs between queues in the same print service.
IPP Client-Side Support
The IPP client-side support in Solaris is implemented underneath the PAPI. This support
enables any applications that are using the PAPI to use IPP, as well as other print services and
protocols.
Applications include the following:
■
GNOME Desktop Environment - Applications using libgnomeprint
■
BSD commands - BSD UNIX LPD print service commands:
■
■
■
■
■
LP commands - System V UNIX LP print service commands:
■
318
lpr
lpq
lprm
lpc
lp
System Administration Guide: Solaris Printing • January 2009
IPP Attributes
■
■
■
■
■
■
lpstat
lpmove
accept
reject
enable
disable
The IPP client-side support for applications is provided through a loadable module,
psm-ipp.so, that is loaded at runtime, based on the printer-uri for the printer or job that is
being manipulated.
Because IPP is layered on top of an HTTP transport, both client-side and server-side support
need the ability to read and write HTTP protocol. On the server-side, this support is provided
by the Apache web server. On the client-side, this support is provided by an HTTP library,
libhttp-core.so.
lpsched Support
psm-lpsched provides a translation between the print service independent representation of
the PAPI and the LP print spooler (lpsched). It takes the PAPI attributes passed into various
PAPI functions and converts them into an internal lpsched representation of the data. It then
contacts lpsched to perform the requested operation. Once performed, it converts the results
back into a print service neutral PAPI representation and returns them to the caller.
The LP print spooler (lpsched), provides a spooling service, translations of job data to a printer
ready format, and transmission of the job data to the physical printer.
IPP Attributes
For each object instance, there is a set of supported attributes and values that describes a specific
implementation of that object.
An object's attributes and values include the following information about that object:
■
■
■
■
■
■
State
Capabilities
Features
Job processing functions
Default behaviors
Default characteristics
Each attribute that defines an object is included in a set. This set of attributes for a specific object
includes all of the attributes that the object could potentially support. For attributes that are
labeled as REQUIRED, each object must support the attribute. If an attribute is labeled
OPTIONAL, then each object may support the attribute.
Appendix A • Using the Internet Printing Protocol
319
IPP Attributes
Printer attributes are divided in to two groups:
job-template
These attributes describe the supported job processing capabilities and
defaults for the Printer object.
printer-description
These attributes include identification, state, location, and references to
other sources of information about the Printer object.
Examples of configurations that support a Printer object include the following:
■
Output device with no spooling capabilities
■
Output device with a built-in spooler
■
Print server that supports IPP, with one or more associated output devices where the
following applies:
■
■
Might or might not be capable of spooling jobs
Might or might not support IPP
The characteristics of a Job object are also described by its attributes.
Job attributes are grouped into two groups:
■
job-template – These attributes are supplied by you or the print client. The attributes
include job processing instructions that are intended to override any Printer object defaults
or instructions that might be embedded within the document data.
■
job-description – These attributes include the following information about the Job object:
■
■
■
Identification
State
Size
Note that the print client supplies some of these attributes, while the Printer object generates
others. An implementation can support multiple documents per Job object, but it must support
at least one document per Job object.
Note – In IPP, Version 1.0 and Version 1.1, a document is not modeled as an IPP object.
Therefore, the document has no object identifier or associated attributes. All job processing
instruction are modeled as Job object attributes. These attributes are called Job Template
attributes. These attributes apply equally to all documents within a Job object.
IPP objects have relationships that are maintain persistently along with the persistent storage of
the object attributes.
For task related information, see “Setting Up the Internet Printing Protocol” on page 69 and
“Administering Printers by Using the Internet Printing Protocol (Task Map)” on page 158.
320
System Administration Guide: Solaris Printing • January 2009
Glossary
The following are terms that are commonly used throughout this book. Note that some of these
terms are not limited to printing.
alias
An alternative name that can be assigned to a printer.
allow list
A file that includes a list of users who have access to forms or printers.
attached printer
A hardware printing device that is directly connected to a system. An attached printer is sometimes
referred to as a local printer.
banner page
A cover page that is printed with each print request. This page displays the name of the user who
submitted the print request, the request ID, and the date/time the request was printed. Banner pages can
be disabled by using the lpadmin command in Solaris Print Manager.
baud rate
The rate at which information is transmitted between devices, for example, between a computer and a
printer. Baud rate measures the number of events, or signal changes, that occur in one second.
BSD print server
A print server that uses the Berkeley Software Distribution (BSD) version of the UNIX operating system.
BSD printing
protocol
See RFC-1179 (Line Printer Daemon Protocol)
Common Internet A protocol that follows the client-server model for sharing files and services over the network and is based
File System (CIFS) on the Server Message Block (SMB) protocol.
daemon
A special type of program that starts itself and carries out a specific task without any need for user input.
Daemons are typically used to handle print jobs that have been queued for printing.
default printer
The printer that you designate as the default destination for all print requests. If no printer name is used,
the default printer is used.
deny list
A file that includes a list of users who are denied access to forms or printers.
destination or
network printer
access name
The internal name of the printer node port that is used by the printer subsystem to access the printer. The
access name is the name of the printer node or the name of the printer node with a printer vendor port
designation. Any printer vendor port designation is explicitly defined in the printer vendor
documentation.
device URI
The device Uniform Resource Identifier (URI) contains the type of interface and the device path for
printing on the Internet. A device URI can be used with the IPP, RFC-1179, and Server Message Block
(SMB) printing protocols.
321
Domain Name System (DNS)
Domain Name
System (DNS)
A service that provides the naming policy and mechanisms for mapping domain and machine names to IP
addresses outside of the enterprise, such as those IP addresses on the Internet.
filter
A file that converts a print request into a format that can be processed by a particular type of printer.
form
A form is a printed paper stock, such as letterhead or blank checks. A form can also be a software file that
contains printing characteristics, such as page length, page width, number of pages, line pitch, character
pitch, character set choice, ribbon color, and alignment pattern.
Internet Printing
Protocol (IPP)
An Internet protocol that provides universal solutions to printing documents on the Internet.
IPP listening
service
A service that monitors the network for service requests, accepts the requests, and then invokes services in
response to these service requests. In the Solaris OS, the listening service provides server-side support for
printing on a network.
Lightweight
Directory Access
Protocol (LDAP)
A standard extensible directory access protocol that is used by LDAP naming service clients and servers to
communicate with each other.
local printer
A print queue that has been defined on a system that is local to you.
Network
Information
Service (NIS)
database
A distributed database that contains key information about the systems and the users on a network. The
NIS database is stored on a master server and all replica or slave servers.
Network
Information
Service Plus
(NIS+) database
A distributed database that contains hierarchical information about the systems and the users on a
network. The NIS+ database is stored on the master server and all replica or slave servers.
network-attached
printer
A hardware printing device that is connected directly to a network. A network printer transfers data
directly over the network to the output device. The printer or network connection hardware has its own
system name and IP address.
Open Standard
Print API (PAPI)
A programming specification for cross-platform and cross-print system printing.
PAPI
See Open Standard Print API (PAPI).
PostScript Printer A file that describes the fonts, paper sizes, resolution, and other capabilities that are standard for a
Description (PPD) particular printer.
file
PPD File Manager
Utility
A command-line utility for administering PostScript Printer Description (PPD) files that are used with the
Solaris print subsystem.
print client
A system that has the Solaris printing software installed on it and that has been enabled to access remote
printers on a network.
print job
A file to be printed. A print job is also referred to as a print request.
322
System Administration Guide: Solaris Printing • January 2009
Server Message Block (SMB)
print queue
1. Refers to the setup and configuration of a printer.
2. A temporary lineup of print requests that are scheduled to print on a printer.
print request
A file to be printed. A print request is also referred to as a print job.
print scheduler
A program that schedules print requests. In the Solaris OS, the print scheduler is the lpsched daemon.
print server
A system with a local printer configured on it that makes the printer available to other systems on a
network.
print spooler
Software that intercepts a print request and then sends it to disk or memory, where the request is held until
the printer is ready to print it. The term, spooler, is an acronym for Simultaneous Peripheral Operations
On-line.
printer driver
A program that is used to convert the input file (or job data) into a format that is specific to the target
printer.
printer-host device The software and hardware, supplied by a vendor, that provides network printer support for a
non-network-capable printer. The combination of the printer-host device with one or more printers
attached to it creates a network printer.
printer interface
program
A program, or interface script, that is the interface between the LP scheduler and the printers. The printer
interface program enables insertion of customized software.
printer name
The name that is typed on the command line when you use print commands. You select the printer name
at the time of the printer's configuration. Any one physical printer can have several printer or print queue
names. Each name provides access to the printer.
printer node
Either the physical printer or the printer-host device. The printer node is the physical printer when
network support resides in the physical printer. The printer node is the printer-host device when an
external device is used to provide the network interface. The printer node name is the system name that is
provided with the IP address.
printing protocols
Over-the-wire protocols that enable communication between a print client and a print server and between
a print server and a printer. The supported protocols for communication between a print client and
printer server are IPP and RFC-1179. The supported protocols for communication between a print server
and a printer are TCP/IP, RFC-1179, and IPP. Often, the documentation from the printer vendor supplies
the information regarding the protocol to select.
protocol
A set of formal rules that describe how to transmit data across a network. See printing protocols.
remote printer
A hardware printing device that has its print queue defined on a system that is not local to you.
RFC-1179 (Line
Printer Daemon
Protocol)
Defines a standard method by which print jobs can be transferred between hosts by using the TCP/IP
protocol. The RFC describes the protocols with which a line printer daemon client can control printing.
Also known as the BSD or LPD protocol.
Samba
An open-source free software suite that provides file and print services to Server Message Block (SMB)
Common Internet File System (CIFS) clients, including the numerous versions of Windows.
Server Message
Block (SMB)
A protocol that enables clients to access files and to request services from a server on a network.
323
Solaris Print Manager
Solaris Print
Manager
A Java technology-based GUI that enables you to manage local and remote printer configuration.
Uniform Resource An addressing technology for identifying resources on the Internet or on a private intranet. URIs can be
Identifier (URI)
used with application-level protocols, which are called URI schemes.
URI scheme
A scheme that enables the inline inclusion of small data items, as if they were being referenced as an
external resource.
324
System Administration Guide: Solaris Printing • January 2009
Index
A
accept command, 144
accepting print requests (how to), 144
accepting print requests (overview), 143
access to forms, limiting, 212-213
access to printers, how to delete, 116-117
adding a PPD file (example of), 224
adding a PPD file to a system, methods, 221
adding a PPD file, by using the lpadmin -n
command, 226-227
adding forms, 205-206
adding PPD files, by using the ppdmgr utility, 223-226
adding print filters, 198-199
adding printers with the OpenSolaris Print
Manager, 236-237
adding
access to remote printers, 110
local or attached printers (how to), 82, 98
printer, new (how to)
with Solaris Print Manager, 86
printer description (how to), 127
terminfo entry (overview), 169-172
adjusting printer port characteristics
(overview), 167-169
Administering IPP, 158-164
administering PPD files
overview, 220-222
reference, 277-284
administering printers by using SMB, 165
administering, fonts (overview), 214-218
alerts
for mounting forms, 209
alerts (Continued)
for printer faults (how to), 134
setting for printers, 182-184
alias for selectable character set, 179, 184-185
alignment pattern
defining, 204
printing, 207
protection of, 210
allow list
for user access to forms, 212
for user access to printers (overview), 137
Apache Web Server, IPP, 69-72
authentication, IPP, 162
auto-discovery of printers, HAL, 236-237
auto-discovery settings, network printers, 259-260
automatic printer discovery, managing HAL add-on
module, 235
B
banner pages
making optional (how to), 130
nothing else prints, 302
reasons to turn off, 129
setting
with lpadmin command, 129-130
troubleshooting incorrect output, 290
turning off (how to), 131
baud settings, 291
325
Index
C
cancel command, 145
canceling
print requests (how to), 146
by disabling printer, 142
for specific user, 147
print requests (overview), 145-146
centralized, print configuration, 56
changing group properties, how to, 253
changing printer queue properties, 247-249
changing
priority of print requests (how to), 149
priority of print requests (overview), 140
character set
hardware, 178
character sets
hardware, 179, 180
number, 178
character set
software, 178
character sets
selectable, 178, 179
checking forms, 210
checking printer status, 119-120
class (printer), 131-132
checking status for, 141
defining with lpadmin command (how to), 132
not valid for enabling/disabling printer, 143
command-line options, ppdmgr command, 282-284
configuring settings, auto-discovery of network
printers, 259-260
configuring
IPP server and client data, 70-71
printer ports, 52
for x86 systems, 52
context menu, panel notification icon, 238
creating a printer group, OpenSolaris Print
Manager, 252
creating a search group, using a Queue pane filter, 253
creating print filters, 186-196
creating, forms, 202-204
customizing, 176
exit codes, printer, 174-175
printer interface program (overview), 172-176
326
customizing (Continued)
stty modes, 174
D
daemons
lpsched, 38
lpsched (reference), 42
print, 265
default behavior for Print Manager, changing, 256-257
default printer
setting with lpadmin command (how to), 128
setting with lpadmin command (overview), 128
default values, for printer forms, 203
deleting a print job, using OpenSolaris Print
Manager, 254-255
deleting a printer group, OpenSolaris Print
Manager, 253-254
deleting access to printers, remote printer
access, 116-117
deleting forms, 206
deleting print filters, 199
deleting printer queues, how to, 249
deny list
for user access to forms, 212
for user access to printers (overview), 137
description of the PPD file repositories, 278-279
description of the Print Manager window, 243
desktop notifications, printer discovery, 237-238
device URI addressing
Uniform Resource Identifier
Solaris printing features, 31-32
device-discovery/printers, initiating the
service, 239-240
/devices not created, how to troubleshoot, 287
dialogs, printer queue properties, 247-249
direct printing, 53
disable command, example of, 142
disabling IPP network service, 74, 75
disabling RFC-1179 network service, 74
disabling
printers (how to), 117, 118, 142
discovered printers, obtaining information from the
command line, 240-241
System Administration Guide: Solaris Printing • January 2009
Index
displaying, current status of forms, 211-212
downloading filters, 215
downloading fonts, 214
downloading, fonts, 303
E
enable command, example of, 143
enabling and disabling
application/print/ppd-cache-update
services, 230-231
enabling RFC-1179 network service, 74
enabling, printers (how to), 142
environment variables
LPDEST, 129
PRINTER, 129
/etc/lp directory, 266
/etc/lp/fd directory, 197, 274
/etc/lp/filter.table file, 197, 199
filter deleted from, 199
/etc/lp/forms directory, 210
/etc/lp/forms/form-name/describe file, 205
/etc/lp/forms/form-name file, 206
/etc/lp/printers directory, 267
/etc/printcap file, 267
exit codes (printer interface), 174-175
standard, 174
table of, 174
Expanded Printer Support
adding a network printer with PPD files by using lp
commands, 100-105
adding a network printer with PPD files by using
Solaris Print Manager, 97-99
adding a printer by using lpadmin -n command
example of, 87-88
adding an attached printer with PPD files by using lp
commands, 86
private interfaces, 266
selecting printer driver, 55
selecting printer make, 54
selecting printer model, 54-55
expanded printer support, specifying your own PPD
files, 108
F
fast print filters (overview), 216
fault notification (printer)
setting with lpadmin command (how to), 134
setting with lpadmin command
(overview), 133-134
values for alerts, 133
file content type, 53
converted by print filters, 187
menu in Solaris Print Manager, 54
troubleshooting incorrect output, 290
files, used by LP print service, 265
filtering, 53
printing without, 53
filters, downloading, 215
font cartridges, 179, 180-181
naming, 179
unmounting and mounting, 181-182
fonts
downloading, 214, 303
host-resident, 215
host-resident PostScript fonts, 217-218
permanently downloaded, 215
PostScript, 214
printer-resident, 215
styles, 178
form, how to view information about, 211
forms
adding, 205-206
adding, changing, deleting, 205
alerts for mounting, 209
controlling access to (overview), 212
creating, 202-204
default values for, 203
deleting, 206
displaying attributes of (overview), 210
displaying current status, 211-212
limiting access to, 212-213
mounting (overview), 207
paper loading and removing, 207
tracking mounting (overview), 209
unmounting and mounting, 207-208
functions of the IPP components, 311-312
327
Index
G
group properties, how to change, 253
H
HAL add-on module, enabling and disabling (Task
Map), 235
HAL, auto-discovery of printers, 236-237
hard disk, recommended for print server, 63
Hardware Abstraction Layer, HAL, 236-237
history log (print requests), 270-273
host name
specifying localhost
task, 90
host-resident fonts, 215
downloading, 216
host-resident PostScript Fonts, how to install, 217-218
how to enable IPP network service, 73
how to enable SMB network service, 75
how to troubleshoot missing line printer /devices
entry, 287
httpd, IPP component, 311-312
IPP component (Continued)
mod_ipp.so, 312
IPP keywords, Apache Web Server configuration, 71
IPP listening service, Apache Web Server, 69-72
IPP network service
disabling, 74, 75
how to enable, 73
restarting, 74
IPP server and client configuration, 70-71
IPP server configuration (How To), 71
IPP supported components, 311-312
IPP
Apache Web Server, 69-72
Internet Printing Protocol, 32
modifying print jobs, 160-161
sharing printers, 161
J
job, deleting with Print Manager, 254-255
K
I
information about supported printers, 276
initiating network device discovery, using
SMF, 239-240
installing downloaded PostScript fonts, 217
installing, host-resident PostScript fonts, 217-218
interface program (printer), 176
customizing (overview), 172-176
standard, 176
Internet Printing Protocol, IPP, 32
IPP (Overview), 69-72
IPP, using, moving remote print jobs, 160
IPP authentication mechanisms, 162
IPP client configuration (How To), 72
IPP component
httpd, 311-312
libipp-core.so, 312
libipp-listener.so, 312
libpapi.so, 312
328
keywords
IPP
Apache Web Server, 71
L
libipp-core.so, IPP component, 312
libipp-listener.so, IPP component, 312
libpapi.so, IPP component, 312
limiting access to a form, 212-213
local or attached printer
adding by using Solaris Print Manager (how to), 82,
98
local printer, definition, 61
local printing, 37
local USB printer discovery, setting preferences
for, 257-258
localhost, specifying as host name, 90
location of PPD file caches, 281-282
System Administration Guide: Solaris Printing • January 2009
Index
location of the PPD file repositories, 278-279
log files
codes in request log, 271
for LP print service, 269, 289
print queue, 269-270
print request history log, 270-273
LP commands, 305
LP print service scheduler, See print scheduler
LP print service
checking basic functions of, 300
configuration files in, 266-268
daemons, 265
defining printer characteristics to, 61
definition, 34
directories in, 265
files used by, 265
interface program, 274
log files, 269, 289
structure of, 264-274
tracking forms (overview), 209
tracking print wheels, 180
troubleshooting, 289, 292
lpadmin -n command, adding PPD files, 221
lpadmin -nadding a PPD file, 226-227
lpadmin command
adding printer description with (how to), 127
adjusting printer port characteristics with (how
to), 168
defining font cartridges with, 180
defining print wheels with, 180
defining printer class with (how to), 132
limiting access to printers with (how to), 138
limiting printer access to forms with (how to), 213
mounting font cartridge with (how to), 182
mounting forms with (how to), 207
mounting print wheel with (how to), 182
setting alerts to mount forms with (how to), 209
setting alerts to mount print wheels with (how
to), 182
setting default printer with (how to), 128
setting printer fault alerts with (how to), 134
setting printer fault recovery with (how to), 136
unmounting forms with (how to), 207
LPDEST environment variable, 129
lpfilter command, 197
lpsched
daemon, 38
daemon (reference), 42
lpstat command, changes when using PPD
files, 154-155
M
managing network device discovery, enabling HAL
add-on module, 235
managing PPD files, by using ppdmgr command, 25
managing print filters, 196
managing print jobs, description, 254-255
managing print manager and printer preferences, Print
Manager, 255
managing printer groups and print jobs, how
to, 250-251
managing printer queues, 247
managing printers and printer queues, OpenSolaris
Print Manager, 241
managing the print/ppd-cache-update service,
through SMF, 230
managing, character sets, 178-185
manufacturer aliases file,
/var/lp/ppd/manufaliases, 281
menu, panel notification icon, 238
methods for adding a PPD file to a system, 221
missing /devices entry for line printer, how to
troubleshoot, 287
mod_ipp.so, IPP component, 312
modifying a print queue, by using the lpadmin -n
command, 227
modifying print jobs, using IPP, 160-161
mounting and unmounting, print wheel or font
cartridge, 181-182
mounting forms, 207
moving print requests (how to), 148-149
moving print requests (overview), 148
329
Index
N
network device discovery, how to initiate using
SMF, 239-240
network printer discovery, setting preferences
for, 258-259
network printer
adding, deleting, 91-96
adding (how to)
with Vendor Supplied Tools, 106
defined, 91
network printers, configuring auto-discovery
settings, 259-260
non-PostScript printers, 178, 180
notifications in the desktop, 237-238
O
obtaining details about discovered printers, example
of, 241
obtaining information about discovered
printers, 240-241
Obtaining information about printers, using
IPP, 158-159
OpenSolaris Print Manager
adding printers, 236-237
managing printer preferences with (Task Map), 255
managing printers (task map), 241
task types, 234
options of the ppdmgr command, 223, 282-284
P
panel notification icon, context menu, 238
parallel printer, 51
parity bit, printers, 291
pausing a printer queue, how to, 249-250
pin configuration (NULL modem cable for
printers), 294
pkgadd command, using to add PPD files, 221
PostScript fonts, 214
PostScript print filters, 198
PostScript printers, 178
character sets for, 179
330
PostScript printers (Continued)
printer type for, 52
PostScript Reverse printer, See Reverse PostScript
printer
PPD cache file
rebuilding by using the ppdmgr utility, 228-230
updating by using the ppdmgr utility, 228-230
PPD file administration, task map, 219-220
PPD file caches, 281-282
PPD file label
displaying in Solaris Print Manager, 222
specifying, 221-222
PPD file labels, reference, 279-280
PPD File Manager, ppdmgr, 25
PPD file repositories
description and locations, 278-279
types of, 278-279
PPD file repository, 222
PPD files
adding to a system, 221
administering by using the ppdmgr utility, 220-222
administering with the PPD File Management utility
(Reference), 277-284
how to add by using the ppdmgr utility, 223-226
PostScript Printer Description files, 115
specifying your own, 108
ppdmgr command, 25
ppdmgr utility
adding a PPD file, 221
adding PPD files
methods, 221
administering, 220-222
command-line options, 223
how to add PPD files, 223-226
ppdmgr, command-line options, 282-284
ppgmgr utility, using to administer PPD files, 219-220
preferences for local USB printer discovery,
setting, 257-258
preferences for network-attached printer discovery,
setting, 258-259
preferences for Print Manager, how to change, 256-257
print client
checking configuration of, 298
definition, 61
System Administration Guide: Solaris Printing • January 2009
Index
print client (Continued)
deleting access to printers (how to), 116, 118
freeing jobs in, 307
print configuration
centralized, 56
with Solaris and LPD-based print systems, 61
print daemons, 265
print filters
adding, changing, removing, restoring, 197-198
adding (how to), 198-199
administering, 196
bypassing, 302, 303
characteristics of, 193
creating (overview), 186-196
creating definitions, 189-195
defined, 274
definition, 196
deleting, 199
download (overview), 216
handling special modes, 187
how to create, 195-196
options keywords, 192
PostScript, 198
putting a request on hold, 188
required for printer fault recovery, 135
requirements for, 188-189
templates to define options, 192-195
to convert from troff to PostScript, 196
TranScript, 198
types of, 186-187
used to convert files, 187
viewing information about, 200-201
print job, how to delete, 254-255
print jobs
how to manage (Task Map), 250-251
managing, 254-255
Print Manager behavior, how to change, 256-257
Print Manager for OpenSolaris
deleting printer queues, 249
managing printer queues, 247
printer group types, 251-254
Print Manager window, description of, 243
print queue, log of, 269-270
print requests, 140-141, 148-149
print requests (Continued)
accepting (how to), 144
canceling (how to), 146
by disabling printer, 142
for specific user, 147
canceling (overview), 145-146
changing priority of (how to), 149
changing priority of (overview), 140, 149
IDs, 141
IDs (how to)
canceling print requests by, 146
changing priority of print requests using, 150
moving print requests by, 148
IDs
canceling print requests by, 145
components of, 146
in banner page, 129
in status of print request, 141
log, 271
moving to another printer (overview), 148
moving to head of queue (overview), 149
putting on hold (overview), 149
rejecting (how to), 118, 144
scheduling, 115
print scheduler, 122
if not running, 296
restarting (how to), 121
updating LP system files, 38
print server
checking access to, 300
checking configuration of, 298
checking connections of, 298
definition, 61
deleting printer from (how to), 119
hard disk requirements for, 63
spooling space requirements for, 62
system resource requirements for, 62
print wheels, 179, 180-181
naming, 179
tracking, 180
unmounting and mounting, 181-182
printer administration with IPP, 158-164
printer class, 131-132
checking status for, 141
331
Index
printer class (Continued)
defining with lpadmin command (how to), 132
not valid for enabling/disabling printer, 143
printer definitions
setting, 115
setting with Solaris Print Manager, 48-56
printer description, adding with lpadmin command
(how to), 127
printer destination, setting with lpadmin command
(overview), 128
printer discovery, desktop notifications, 237-238
Printer Driver field in Solaris Print Manager, displaying
PPD file labels, 222
printer driver, printer definitions, 55
PRINTER environment variable, 129
printer group types, 251-254
printer group
creating, 252
deleting, 253-254
printer groups, how to manage (Task Map), 250-251
printer interface program, 274
printer make, printer definitions, 54
printer model, printer definitions, 54
printer port, 168-169
characteristics, adjusting (overview), 167-169
configuring, 52
enabling multiple ports, 52
parallel, 51
serial, 51
printer preferences, managing, 255
printer queue properties dialog, 247-249
printer queue properties, changing, 247-249
printer queue
how to delete, 249
pausing and resuming, 249-250
printer(s), 176
adding an unsupported (overview), 169-172
customizing interface program (overview), 172-176
faults
messages, 175
interface program
exit codes, 174-175
standard, 173-174, 176
non-PostScript, 186
332
printer(s) (Continued)
settings
stty, 168
stty settings, 174
printer setup, using OpenSolaris Print Manager, 241
printer status, 119-120
printer support, features of, 115
printer type
defined in terminfo database, 268
not in terminfo database, 53
troubleshooting setting of, 301
printer
adding a new (how to)
with Solaris Print Manager, 86
remote, 40-42
printers, 67-69
.printers file, setting up (how to), 112
printers queues, how to manage, 247
printers
accepting print requests (overview), 143
adding a network printer (how to)
with Vendor Supplied Tools, 106
adding local or attached (how to)
adding by using Solaris Print Manager, 82, 98
allow list (overview), 137
allowing user access (how to), 138
baud settings, 291
checking status of print requests, 140-141
deleting access, 116-117
deny list (overview), 137
denying user access (how to), 138
disabling (how to), 117, 118, 142
disabling (overview), 142
enabling (how to), 142
enabling (overview), 142
fault notification, 133-134
fault recovery (overview), 135
file content types
incorrect output, 302
font cartridges, 178
local, 61
non-PostScript, 178
parity bit, 291
System Administration Guide: Solaris Printing • January 2009
Index
printers (Continued)
PostScript
treatment of text, 178
print wheels, 178
rejecting print requests (overview), 143
setting up, 77-112
settings
tab, 291
stty settings, 304
troubleshooting
conflicting status messages, 293
hung printers, 292-293, 305
printing, 307-308
printing problems, troubleshooting, 288
printing services, setting up, 65-76
printing
banner pages, 129-130
local (diagram), 37
remote, 40-42
special modes, 187
spooling directory, 273-274
priority of print requests, 140, 149
private interfaces, 266
PSR printer type, 52
Q
Queue pane filter, using to create a search group, 253
queue properties, how to change, 247-249
queues, managing, 247
R
Raster Image Processor, RIP, 115
rebuilding the PPD cache file, 228-230
reject command, 144
rejecting print requests (how to), 118, 144
rejecting print requests (overview), 143
remote printing, diagram of process, 40-42
remotely moving print jobs, using IPP, 160
requesting an update of the PPD cache file, 228-230
residentfonts file, 215
restarting IPP network service, 74
restarting SMB service, 75-76
restarting the RFC-1179 network service, 75
restarting, print scheduler (how to), 121
resuming a printer queue, how to, 249-250
return settings, printers, 291
Reverse PostScript printer
printer type for, 52, 53
RFC-1179 network service
disabling, 74
enabling, 74
restarting, 75
S
scheduler, See print scheduler
search group properties, changing, 253
search group, how to create, 253
selectable character sets, 178-179, 179
setting an alias, 184-185
serial printer, adding to system, 51
service instance,
svc:/application/print/ppd-cache-update, 230
setting printer definitions, 115
(overview), 48-56
setting up automatically discovered printers,
OpenSolaris Print Manager, 241
setting up printers manually, using OpenSolaris Print
Manager, 241
setting up printing services, 65-76
setting up, character sets (example of), 185
setting, printer alerts, 182-184
sharing printers, when using IPP, 161
slow print filters, 216
SMB network service
how to enable, 75
restarting, 75-76
SMB, sharing printers, 165
SMF
enabling and disabling
application/print/ppd-cache-update
services, 230-231
managing the print/ppd-cache-update
service, 230
using to initiate network device discovery, 239-240
333
Index
Solaris and LPD-based print systems, 61
Solaris Print Manager, 67-69
adding a new printer (how to), 86
adding printer access, 110
modifications to printer definitions, 67, 261-263
overview, 34
prerequisites for using, 67
specifying a PPD file label, 221-222
specifying a PPD file repository, 222
specifying localhost as host name, 90
specifying your own PPD files, expanded printer
support, 108
spooling directory, print service, 273-274
spooling space requirements for print server, 62
standard printer interface program, 176
starting, 67-69, 122
status of printers, how to check, 120-121
stopping, 122
a printer (overview), 142
stty settings
customizing, 174
defaults, 168, 304
suggestions for, 304
troubleshooting, 291
supported IPP components, 311-312
supported printers, where to find information, 276
svcadm disable application/print/server,
stopping the print scheduler, 122
svcadm enable application/print/server,
restarting the print scheduler, 122
svcs application/print/server, stopping and
restarting the print scheduler, 121
system resources, allocating for print server, 62
terminfo entry
list of required items, 169
selectable character sets in, 178
tips on troubleshooting, printing problems, 288
tracking forms, 209
TranScript print filters, 198
troff to PostScript conversion, 196
troubleshooting hung lp commands, 292
troubleshooting printing problems, tips, 288
troubleshooting
printing problems, 288, 307
types of printer groups, 251-254
U
Uniform Resource Identifier (URI), device-uri, 31-32
unmounting and mounting, print wheel or font
cartridge, 181-182
unmounting forms, 207-208
unsupported printers, 169-172
updating the PPD cache file, 228-230
URI, Uniform Resource Identifier, 31-32
user
access to printer (overview)
limiting with lpadmin command, 136-138
limiting with Solaris Print Manager, 136-138
canceling print requests for (how to), 147
/usr/lib/lp directory, 197
/usr/lib/lp/model directory, 274
/usr/lib/lp/postscript directory, 197, 274
V
T
tab settings, 291
tasks you can perform with the OpenSolaris Print
Manager, 234
templates (print filters), 192-195
terminal characteristics, 174
terminfo database, character set names, 178
terminfo entry, 172
terminfo entry, adding (overview), 169-172
334
/var/lp/logs/lpsched file, 290
/var/lp/ppd/caches/, location of PPD file
caches, 281-282
/var/lp/ppd/manufaliases file, description of, 281
/var file system, 62
/var/spool/lp directory, 62, 273
/var/spool/lp/requests directory, 269
/var/spool/lp/tmp directory, 269
System Administration Guide: Solaris Printing • January 2009
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising