Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction1-1 Printing  Some printer jargon m Spooler A piece of software m Dpi Dots per inch m PDL Page description languages m Bitmap Common bitmap.

Similar presentations


Presentation on theme: "Introduction1-1 Printing  Some printer jargon m Spooler A piece of software m Dpi Dots per inch m PDL Page description languages m Bitmap Common bitmap."— Presentation transcript:

1 Introduction1-1 Printing  Some printer jargon m Spooler A piece of software m Dpi Dots per inch m PDL Page description languages m Bitmap Common bitmap formats include JPEG, PNG, TIFF and GIF

2 Introduction1-2 Printing  Some printer jargon (cont) m RIP Raster Image Processor Converts PDL documents to a bitmap m Filters Programs that modify jobs en route from the spooler to the printer m Postscript The most common PDL found on Unix m PCL Exclusively on Hp printers and quite common in PC world

3 Introduction1-3 Types of printers  By connection interface m Serial port m parallel port m Universal Serial Bus (USB) m Network Full-fledged network interfaces Computer can spool directly to the network printer –Many network laser printers include a lpd server that runs inside the printer. To simplify administration –Set up a few host to control the printers –Other machine simply transmit jobs to these print server machines

4 Introduction1-4 BSD Printing  Redhat and FreeBSD use BSD printing system.  Daemon lpd m Accepts print jobs from users or other (remote) lpds m Processes the jobs m Sends jobs to an actual printer m reads /etc/printcap and is started at boot time  Program lpr allow users to submit print jobs to lpd. m Lpr and lpd communicate through the unix socket /dev/printer m Which printer to use Option -Pprinter Env $PRINTER Default printer lp, or the first one in /etc/printcap

5 Introduction1-5 BSD Printing m Spool Lpr create two files under the printer’s spool dir /var/spool/lpd/printername control file started with cf data file started with df m Lpr notifies lpd of the job’s existence m Lpd then check printcap to determine if the destination is local or remote If remote, lpd opens a connection to the remote machines’ lpd, transfer the cf and df file,and delete the local copy If local, lpd creates a series of UNIX pipes between the spool file and hardware to transport the data – filter processes

6 Introduction1-6 BSD printing commands CommandLocationFunction lpq/usr/binShows print queue contents and status lpr/usr/binQueues jobs for printing lprm/usr/binCancels a queued or printing job lpc/usr/sbinControls a printer or queue lpd/usr/sbinSchedules and prints jobs printtool/usr/binConfigures the printing system

7 Introduction1-7 BSD Printing  lpc : make administrative changes m Enable or disable queuing for a particular printer enable/disable printer m Enable or disable printing on a particular printer start/stop printer m Remove all jobs from a printer’s queue clean printer m Move a job to the top of a printer’s queue topq printer jobid topq printer username m Start, stop or restart the lpd daemon restart printer m Get printer status information status printer

8 Introduction1-8 BSD Printing  /etc/printcap file m BSD printing system’s master database m A printer must be described in the printcap file before jobs can be submitted it. m Printcap format Name:xx=string:xx#number:xx=string… …

9 Introduction1-9 m Printcap variables NameTypeMeaningExample sdstringSpool directory sd=/var/spool/lpd/howler-lw lfstringError log file lf=/var/log/lpr lpstringDevice name lp=/dev/lp0 afstringAccounting file af=/usr/adm/lpr.acct rmstring Remote machine name rm=beast.xor.com rpstringRemote printer name rp=howler-lw ofstringOutput filter of=/usr/libexec/lpr/lpf ifstringInput filter if=/usr/sbin/stylascii mxnumberMaximum file size mx#0

10 Introduction1-10 System V printing  Used by HP-UX, SCO Unic, Solaris etc.  System V spooling subsystem’s major components: m Spooling daemon: lpsched responsible for carrying out print requests by sending data to the appropriate printer. m User commands Initiate print requests: lp Cancel a pending request: cancel List queue contents: lpstat m Administrative commands Accept, reject, enable, disable, lpadmin, lpmove, lpusers

11 Introduction1-11 m Spooling directories under /var/spool/lp/request named for each printer By default the actual file to print is not copied. The changing or deleting a file before it is printed affects the final output. Use –c option to lp to copy the file to the spool area  Device classes m Group similar devices and declare them to be equivalent to and substitutable for one another.  Setting the system default destination m Use the –d option to the lpadmin command #lpadmin –dprinter2 #lpstat –d m User may set the env LPDEST System V printing

12 Introduction1-12 System V printing  Obtaining Destination Status Information m Lpstat command Accept job or not: -alist Display the members: -clist List print requests: -olist Display the current status: -plist Display users’ jobs: -ulist Display the special files: -vlist Display summary: -s Display all status info: -t

13 Introduction1-13 System V printing  Controlling print queues m Use accept and reject commands to permit and inhibit spooling to a print queue. m Example: # reject –r “ There is no paper in the entire building …” laserprinter #accept laserprinter  Controlling the status of a particular printing device m Use enable and disable commands followed by a device m Example: #disable –r “ changing toner cartridge; back by 11” laserpritner #enable laserprinter

14 Introduction1-14 System V printing  Starting and stopping the print service m Started automatically at system boottime Such as /etc/rc2.d/S80lp m Check if the scheduler is running #lpstat –r m Stop and start printing service manually #lpshut #/etc/rc2.d/S80lp start  Managing printers and destination classes m Use lpadmin command to define and modify characteristics of printer devices and classes Stop lpsched first

15 Introduction1-15 System V printing Adding a printer #lpadmin –p printer –v special-files interface-option Where interface_option can be »-e printer »-m model »-i interface-path Example: #lpadmin –pPS4 –v /dev/tty02 –ePS3 Modifying and deleting printers –Option –x removes a printer –Option –P changes a printer if it is existed. Managing Device class –Use –c option to place a printer into a class »#lpadmin –pPS2 -claser

16 Introduction1-16 System V printing  Adding a New printer m Physically connect the printer m Change the ownership of the special file to the user lp and change its mode to 600 m Check startup file (s file and K file) Make links if they do not exist m Shutdown printing service with lpshut if running, and then use lpadmin to add the printer m Start the printer and its queue #accept PS3 #enable PS3 m Test the new printer by spooling a small file.

17 Introduction1-17 Network Printing  Sharing printers among systems within a local area network m Print server: allow users on other hosts send jobs to one or more of its printers m Clients: send the jobs to remote hosts.  Between BSD System m Outgoing Set up printcap entry to specify –the destination host (rm) –The target printer (rp) m Incoming Allow a remote system to print –/etc/hosts.lpd or /etc/hosts.equiv

18 Introduction1-18 Network printing  Remote printing under Solaris m Outgoing Register the remote system name using lpsystem Set up a queue using lpadmin m Incoming Handled by the Service Access Facility –Configure the local listen port monitor using pmadm

19 Introduction1-19 Practice  Let’s configure the printer on Solaris m Connect the printer to the network m Set the printer IP address/netmask m Define the printer on your Solaris box Use lpadmin sun as #lpadmin –p printername –s systemname Or use /usr/sadm/admin/bin/printmgr m Enable the printer m Print a test page

20 Introduction1-20 Exercise  Configure the printer on Linux with CUPS m CUPS: common Unix printing system Dynamic printer detection –Broadcasts the printer available Grouping printers Integrating with Windows m Configure it via localhost:631 m Disable the queue m Disable the printer m Cancel a job m Check the print queue


Download ppt "Introduction1-1 Printing  Some printer jargon m Spooler A piece of software m Dpi Dots per inch m PDL Page description languages m Bitmap Common bitmap."

Similar presentations


Ads by Google