OpenSolaris
Collectives
Discussions
Documentation
Download
Source Browser
Free CD
Log-in
|
en
Community Group printing
:
Current Projects
>
PAPI Client Commands
Top Menu
Show
:
Comments
Attachments
History
Information
Print
:
Print
Print preview
Export as PDF
Export as RTF
Export as HTML
Export as XAR
Wiki code for
PAPI Client Commands
Hide Line numbers
1: == PAPI Client Commands 2: 3: === //Delivered in Solaris Nevada build 44// 4: 5: ==== What are they ? 6: 7: Since their beginning, the printing commands have been tied to a specific print system because they have been implemented on top of print system specific protocols and interfaces. This is true of BSD 4.x LPR, [[SysV LP>>http://cvs.opensolaris.org/source/xref/usr/src/cmd/lp/]], [[LPRng>>http://www.LPRng.org/]], [[CUPS>>http://www.cups.org/]], and more. With the recent introduction of the FSG OpenPrinting [[Open Standard Print (PAPI)>>http://sf.net/projects/openprinting]], it is now possible to move these commands on top of a print service/protocol neutral interface. Currently, the PAPI include enough functionality to support replacement of the following commands: 8: 9: |**Command 10: **|**Origin 11: **|**Description 12: ** 13: |[[lpr(1b)>>attach:lpr.1b.html]] 14: |BSD 15: |Submit print jobs 16: |[[lpq(1b)>>attach:lpq.1b.html]] 17: |BSD 18: |Query print queues/jobs 19: |[[lprm(1b)>>attach:lprm.1b.html]] 20: |BSD 21: |Remove print jobs 22: |[[lpc(1b)>>attach:lpc.1b.html]] 23: |BSD 24: |Control print queues (accept/reject/enable/disable/status/clear/topq) 25: |[[lp(1)>>attach:lp.1.html]] 26: |SysV 27: |Submit print jobs 28: |[[lpstat(1)>>attach:lpstat.1.html]] 29: |SysV 30: |Query print service (queues/jobs/other) 31: |[[cancel(1)>>attach:cancel.1.html]] 32: |SysV 33: |Remove print jobs 34: |[[lpmove(1m)>>attach:lpmove.1m.html]] 35: |SysV 36: |Move jobs between local queues 37: |[[accept(1m)>>attach:accept.1m.html]] 38: |SysV 39: |Enable queueing of print jobs on a queue 40: |[[reject(1m)>>attach:reject.1m.html]] 41: |SysV 42: |Disable queueing of print jobs on a queue 43: |[[enable(1m)>>enable.1m.html]] 44: |SysV 45: |Enable job processing on a queue 46: |[[disable(1m)>>disable.1m.html]] 47: |SysV 48: |Disable job processing on a queue 49: 50: ==== Destination Names 51: 52: Each of the printing commands listed above takes a printer/queue/destination name as at least one of it’s arguments. These destination names can be specified in one of three forms: 53: 54: |Atomic (simple) 55: |(destination) is resolved by locating a //printer-uri-supported// key/value pair for the named destination in the printers.conf(4) or printers(4) 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.) 56: |Printer URI 57: |(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 RFC1179 protocol. 58: |POSIX 59: |(server:queue[:extensions]) is complete and resolves to an equivalent printer URI form of lpd://server/printers/queue[#extensions] 60: This form is being maintained for Solaris backward compatability only. "Printer URI" form is the preferred replacement. 61: 62: Printer URI formats currently supported include the following: 63: 64: |lpsched 65: |**lpsched://localhost/printers/queue** 66: |This printer uri scheme can only be used to contact a local LP service to access the queue named in the uri. 67: |lpd 68: |**lpd://localhost/printers/queue[#extensions]** 69: |This printer uri scheme can be used to contact local or remote print services to addess the named queue on the named host in the uri. The optional "#extensions" can be specified as "#solaris" to indicate that the server host will process Solaris extensions to rfc-1179 during job submission. 70: |ipp 71: |**ipp://server[:port]/printers/queue** 72: ******http://server:631/printers/queue** 73: ******ipp://server[:port]/...** 74: |This printer uri scheme can be used to contact local or remote print services to address a particular queue on the named host in the uri. The "ipp" uri scheme is specified in the Internet Print Protocol specifications and is actually much more free form that listed above. All Solaris and CUPS based print queues will be accessed using the formats listed above. Access to print queues on other IPP based print servers requires use of the server supported ipp uri format. Generally, it will be one of the formats listed above. 75: 76: ==== Some additional information 77: 78: * As a result of layering these changes, the following commands will no longer need to be installed SUID root: 79: 80: /usr/bin/lp, /usr/bin/lpstat, /usr/bin/cancel, /usr/bin/lpmove, 81: /usr/{ucb|bin}/lpr, /usr/{ucb|bin}lpq, /usr/{ucb|bin}/lprm, 82: /usr/lib/print/printd. 83: 84: In the past, they were installed SUID root because they needed some elevated privilege to either open a reserved port, allocate a sequential job-id number, or maniplate files in /var/spool/print. Since this functionality has been localized into a small "helper" application (/usr/lib/print/lpd-port), applications using RFC1179 based PAPI support no longer need elevated privilege. lpd-port contains minimal support for passing RFC1179 protocol requests on a reserved port and allocating sequential job-id numbers. While it is installed SUID root, it temporarily drops all elevated privilege until the moment that they are needed. When needed, the privilege is elevated for the required operation and perminently dropped if it is no longer required. On Solaris, this is done through the use of privileges(5). On other platforms, this is done using setuid/seteuid/setreuid(). 85: 86: * If you have a local printer and don’t want to share it with anyone on the network, you can now safely disable the printing network listeners 87: 88: # svcadm disable application/print/ipp-listener \ 89: application/print/rfc1179 (lpd-listener) 90: 91: * If you have a Solaris 9u6 or later server, or a CUPS server, lpstat will provide you with more information about remote print queues (and jobs), as well as their capabilities when you use IPP to talk to those servers. 92: * It is now possible to accept, reject, enable and disable remote print queues with proper authorization when IPP is in use (more on this to follow) 93: * It is now possible to remotely move jobs between queues on a print server when IPP is in use. 94: * It is now possible to modify your print jobs remotely when IPP is in use. (eg. submit your job held, change the number of copies, turn on duplexing and release it for printing) 95: 96: ==== Where can I get access to the bits ? 97: 98: |[[install-papi-commands.sh>>attach:install-papi-commands.sh]] 99: |A simple shell script to upgrade several printing related packages on your system to include replacement print commands. 100: |[[remove-papi-commands.sh>>attach:remove-papi-commands.sh]] 101: |A simple shell script to remove upgraded printing packages and replace them with Solaris Nevada build 35 packages. If you want to 102: match your installation, you will need your installation media. 103: |[[papi-i386.pkgs>>attach:papi-i386.pkgs]] 104: [[papi-sparc.pkgs>>attach:papi-sparc.pkgs]] 105: |A stream format package file containing upgraded printing packages that include replacement print commands laywered on top of the PAPI 106: |[[nv35-i386.pkgs>>attach:nv35-i386.pkgs]] 107: [[nv35-sparc.pkgs>>attach:nv35-sparc.pkgs]] 108: |A stream format package file containing Nevada build 35 printing packages without any replacement print command implementations 109: 110: ==== Where is the Code ? 111: 112: Currently, the project is housed on SourceForge at [[http://sf.net/projects/openprinting/>>http://sf.net/projects/openprinting/]] The code contained in the SourceForge project includes a complete implementation of the PAPI with support for interaction with RFC-1179 based print services, as well as IPP based print services. Also included in that code base is and Apache module that implements server side support for IPP on top of the PAPI. The OpenSolaris code base contains [[PAPI support for local LP>>http://cvs.opensolaris.org/source/xref/usr/src/cmd/lp/lib/papi]] interaction. Though much of the work in the SourceForge project is already delivered with Solaris, this project is focusing on delivering the client commands support already in the code base as replacements for the current implementations that are tied directly to either lpsched or the rfc-1179 protocol. 113: 114: ==== How can I get Involved ? 115: 116: The OpenPrinting project, currently hosted at SourceForge ([[http://sf.net/projects/openprinting/>>http://sf.net/projects/openprinting/]]), is where implementation work is being done for the PAPI. If you are interested in support for other print systems, or extending the API, that is probably a good place to start. Any work to extend the API will at least be prototyped there before rolling it back into the PAPI standard. 117: You will also find pre-built RPM and dpkg(.deb) packages for Linux systems that and be installed in /opt/papi on a Linux system. Since the naming support native to Solaris is emulated on the Linux systems, it’s not as complete as what’s available on Solaris. However, it does contain files and NIS support for printing configuration lookup. 118: If you run some other OS, you should be able to build the code with little or no effort. For the most part, the code makes use of POSIX interfaces. The only significant exception is in the RFC1179 support, were there is code to pass file 119: descriptors between processes (child to parent). The code to do so is ifdef’d with support for SysV, BSD 4.3, and BSD 4.4 (also Linux) methods of doing this.
Search
Collectives
Community Group
Academic and Research
Accessibility
Advocacy
Appliances
Approachability
Architecture Process and Tools
BrandZ
Chinese Users
Community Advisory Board
Databases
Desktop
Device Drivers
Distribution
Documentation
DTrace
Emerging Platforms
Fault Management
Games on OpenSolaris
HA Clusters
HPC Developer
Installation and Packaging
Internationalization and Localization
Laptop
Logical Domains
Modular Debugger (MDB)
Networking
NFS
Observability
OpenSolaris Governing Board (OGB)
OpenSolaris Printing
OS/Net (ON)
Performance
Power Management
PowerPC
Security
Service Management Facility (smf(5))
Software Porters
Solaris Volume Manager
Storage
Systems Administration Community Group
Testing
Tools Home
Unix File Systems (UFS)
Website Community
X Window System
Xen
ZFS
Zones
Project
ADSL Modem Enhancement
ARC Process Definition
ARM Platform Port
Automatic Data Migration
BIND Update
Bluetooth Stack & Drivers
Brocade FC HBA - Initiator
Brocade FC HBA - Target
Brussels - unified network link configuration
Caiman, Solaris Install Revisited
Celeste
Český portál
Chime Visualization Tool for DTrace
CIFS client for Solaris
CIFS Server
Clearview: Network Interface Coherence
Cluster Agent: Informix Dynamic Server
Cluster Agent: OpenSolaris Container
Cluster Agent: OpenSolaris xVM
Cluster Agent: Oracle E-Business Suite
Cluster agent: PostgreSQL
Cluster Agent: Samba
Cluster Agent: Tomcat
CMT
Coarse Data Flow Parallelism
Colorado: Open HA Cluster on OpenSolaris
Command Assistant
Common Array Manager
Companion - /opt/sfw: Free and Open Source software
COMSTAR: Common Multiprotocol SCSI Target
Content
Contest
CPU Observability
Credentials Process Groups
Crossbow: Network Virtualization and Resource Control
Crypto KMS Agent Toolkit
Cryptographic Framework
Data Migration Manager
Data Tethers
Deutsches Portal
Device Detection Tool
Device Driver Utility
Device Manager
Device Mapper
Direct Rendering Infrastructure & 3D drivers
DTrace Guide
Duckwater: Simplified name services management
Easy Tools
Emancipation
Emulex Fibre Channel Device Driver
Emulex Advanced Ethernet Device Driver
Enable/Enhance Solaris support for Intel Platform
Enhance the support of USB webcams
Enhanced SMF Profiles
Enhancements for AMD-based Platforms
Erlang DTrace Integration
Ethernet bridge module for Solaris
Evaluate Conary
Events Registry
Ext3 file system support
F/OSS Package Base
Facilitation
Fibre Channel over Ethernet
Fine Grained Access Policy (FGAP)
Fingerprint Authentication
Flexible Mandatory Access Control
Forensic Tools
Fully Open X Project
Fuse on Solaris
gcore
Generic Machine Check Architecture Improvements
Google SOC
HA-JBoss
HA-MySQL
Hadoop Live CD
Hitachi
HoneyComb Fixed Content Storage
HPC Stack
Image Packaging System
Improved Performance MIB
Indiana
Innovation Awards
Input Method
Intel Graphics
Internet Key Exchange, version 2
Interrupt Resource Management
IP Datapath Refactoring
IP over Infiniband
IPsec Tunnel Reform
iSCSI Extensions for Remote DMA (iSER)
iSNS Server
JeOS - Just enough Operating System
JKstat - a java binding for libkstat
Journaled File System (JFS)
K Desktop Environment
Kerberos
Kernel Sockets
Kernel SSL Enhancements
Key Management Framework
Korn Shell 93 integration/migration project
Labeled IPsec
LatencyTOP
Layer 2 Filtering
LDoms Manager
Lending
libMicro - portable microbenchmarks
Link Layer Discovery
Live Media: Technologies for distributions running from CD and other media
Locale Data
lofi compression and cryptography support
lx64 brand
Media Management System
Mega_sas
Mexico
MilaX minimal Live Distribution
MIPS Platform Port
Mozilla DTrace
MRSL.NONsharedDevice
Multi-lingual Glossary
Multi-pathing software (MPxIO)
Multiple disk sector size support
Multiple DOI
Muskoka: An open repository for OpenSolaris technical content
Navigator
Nemo: A Framework for High-Performance Networking
Network Auto-Magic
Network Data Management Protocol
Network MIBs
Network Storage
Network Time Protocol (NTP)
Nevada Globalization
New Design of 4over6 Mechanism Based on OpenSolaris
NFS RDMA transport update and performance analysis
NFS Server in non-Global Zones
NFS version 4.1 pNFS
NFSv4 namespace extensions
Nightingale: Port Songbird to OpenSolaris
NPort ID Virtualization (NPIV)
NUMA
Object Storage Device (OSD) support for Solaris
OHACGE Script Based Plug-in
ON/Nevada (ONNV) Project
Open Development Infrastructure
Open HA Cluster Utilities
Open Sound System
OpenGrok
OpenPegasus CIM Server
OpenRTI
OpenSolaris Busybox
OpenSolaris Desktop
OpenSolaris Hispano
OpenSolaris Security Audit
OpenSolaris support for the QEMU processor emulator: host and guest
PEF: Packet Event Framework
Performance Wrappers
Pkgfactory
Polski Portal
Portail Francophone
Portal Brasil
Portals
Power Management Usability Interfaces
Presto: Automatic Printing Configuration
Printable Many Page Solaris Manuals
Promise SuperTrak RAID HBA Driver
QLogic Converged Network Adapter GLDv3 NIC Driver
Quagga Routing Protocol Suite Integration
RAID Configuration Utility
RBridge (IETF TRILL) support
RDMA Offload Framework
Reno: Login Process Enhancements for Interop
Resource Management
s10brand
SAM/QFS
SCM Migration Project
SCSI RDMA Protocol
SDcard Drivers
Sensor Abstraction Layer
Session Initiation Protocol
SFW
Shell: bourne shell, korn shell, C shell, etc.
Sierra: Intel WiFi Chipsets Support
Simple Panels
SM-HBA Based SAS HBA Management
SMF Documentation
Solaris iSCSI Target
Solaris PowerPC Port
SourceJuicer
Sparks: name service switch/nscd enhancements
Squashfs
Star integration/migration project
Starfish
Starter Kit
Storage Power Management
Sun Security Toolkit
Sun StorageTek Availability Suite
Support for OpenFabrics User Verbs / API on OpenSolaris OS
Support gcc4/GCCfss in Solaris
Suspend/Resume
SVR4 Packaging
Systemz
Tamarack: Removable Media Enhancements in Solaris
Tesla: OpenSolaris Enhanced Power Management
Test Development
Tickless Kernel Architecture
TIPC
Trademarks
Trusted networking interface policy database for Trusted Extensions
Trusted Platform Module support
Use Case
Validated Execution Project
Virtual Console
Virtual Network Machines
Visual Panels
Visualization for HPC
Volo
VRRP: Virtual Router Redundancy Protocol Implementation
VSCAN service
Web Stack
Website
Winchester: Schema mapping and ID mapping for AD Interoperability
Wireless USB Support
Wireless Wide Area Network
X Consolidation
x86 Generic FMA Topology Enumerator
Xen Gate
Xfce: A lightweight desktop environment
ZFS Boot and Install
ZFS on disk encryption support
Zone Manager
Zone Statistics
Русский портал
البوابة العربية
भारतीय पोर्टल
中国门户
日本ポータル
한국 포탈
User Group
Adelaide
Argentina
Arizona
Atlanta
Baltimore-Washington
Bangalore
Bangkok
Bangladesh
Beijing
Bélem
Berlin
Bhimavaram
Bloomington
Campus Ambassadors
Capital Region
Cardiff
Charlotte
Chengdu
Chennai
Chihuahua
Chile
Cleveland
Colombia
Columbus
Connecticut
Cracow
Czech
Dallas/Ft. Worth
Danish
Delaware
Edinburgh
Egypt
Finland
Florida
Front Range
FuZhou
Great Lakes
Greece
Hangzhou
Hawaii
HeFei
Houston
Hyderabad
Indonesia
Irish
Israel
Italian
Jinan
Kabul
Kansas City
Latvia
London
Madurai
Manchester
Mato Grosso
Melbourne
Minas Gerais
Minnesota
Montreal
Moscow
Mumbai
Munich
NEA
Netherlands
New England
New York City
New Zealand
NIT Hamirpur
Noroeste
Oklahoma City
Osnabrück
Peru
Philadelphia
Piaski
Pittsburgh
Porto Alegre
Puget Sound
Pune
Queensland
Research Triangle Park
Romania
Russia
San Antonio
San Diego
San Francisco
São Paulo
Scottish
Serbia
Shanghai
Shenzhen
Silicon Valley
Singapore
Slovak
South African
Southern Connecticut
St. Louis
Sweden
Switzerland
Sydney
Szczecin
Taiwan
Tecum
Thames Valley
Tokyo
Toronto
Trondheim
Tulsa
Turkey
Ukraine
University of Melbourne
Vale do Paraíba
Vancouver
Venezuela
Welsh - Cymru
Wisconsin
Xi'an
Subsites
Code Reviews
Code Repositories
Package Search
Bugster
Bugzilla
Test Machines
Planet
Mailing Lists
Elections & Polls
ARC Case Logs
Source Juicer
Package Factory
User Authentication
Community Group printing Pages
Documentation
System Administration Guide: Solaris Printing
Using CUPS in the Solaris OS
Administering Printers by Using the OpenSolaris Print Manager
Commonly Used Printing Terms
Frequently Asked Questions
Files
History of Solaris Printing
Current Projects
Presto
PAPI Client Commands
PPD Cache Management
Standards
Topics of Interest
Where are the Bits