Note that once a print job is sent to a networked printer, it often cannot be controlled from the host. This is especially irritating when the printer malfunctions.
Note that emacs can print a file using postscript instead of plain text, and that the results are far superior to plain text printing.
All file and directory names should be fully qualified. Each printer must have a separate spool directory.
parameter meaning default value af accounting file name (must be created manually) filter filter script name filter_options filter options (see man page) ld printer initialization string lp * printer device name / remote print queue mc maximum copies 1 ml minimum printable characters 32 mx maximum job size in 1K blocks 0 (unlimited) pl page length in lines 66 pw page width in characters 80 rg restrict users to these groups sd * spool directory (must be created manually) sh suppress headers / banners false tr printer termination string
parameter meaning REJECT NOT SERVER do not accept remote print jobs ACCEPT SERVICE=X REMOTEIP=(IP address) accept remote print jobs from this IP address
parameter meaning -_ * read from stdin (must be last) -dBATCH * exit when finished -dNOPAUSE * do not pause between pages -dNOPROMPT * noninteractive use -dPARANOIDSAFER * do not allow access to anything but stdin and libraries -dQUIET * no status messages -h help - displays known devices -r(x pixels/inch)x(y pixels per inch) resolution -sDEVICE= * specify printer driver -sOutputFile=- * output to stdout -sPAPERSIZE= paper size name
A sample printcap file and its associated filters might be:
A local printer would have a printcap entry such as ":lp=/dev/lp0".text :af=/var/spool/lpd/text/acct.log :filter=/root/bin/crlf :lp=lp@192.168.1.3 :mc=0 :mx=0 :sd=/var/spool/lpd/text :sh ps :af=/var/spool/lpd/ps/acct.log :filter=/root/bin/post :lp=lp@192.168.1.3 :mc=0 :mx=0 :sd=/var/spool/lpd/ps :sh
#!/bin/sh #/root/bin/crlf awk 'BEGIN { ORS="\n\r" } { print }'
#!/bin/sh #/root/bin/post gs -dBATCH -dNOPAUSE -dNOPROMPT -dPARANOIDSAFER -dQUIET -sDEVICE=ljet4 -r300x300 -sOutputFile=- -_
"gs -help" will display the available printer drivers.
for text, always use ASCII-encoded HTML (HyperText Markup Language) 3.2 or lower (not all browsers support higher level standards);Endeavour2 has an image browser which is useful for viewing image files. For image manipulation you definitely have to try gimp.for still images, use JPEG (Joint Picture Experts Group) - you can adjust the quality when you save the file, or you can use TIFF (Tagged Image File Format) or uncompressed GIF (Graphics Interchange Format) for line drawings if the JPEG artifacts get you down (compressed GIF is a proprietary format);
for audio, use MP3 (MPEG Layer III Audio) - use 192 Kbps if quality is a concern; and
for video, use MPEG (Motion Picture Experts Group) with a standard codec such as MPEG-1 (used for VCDs), MPEG-2 (used for DVDs) or MPEG-4.
mplayer can be used to play virtually any format of sound or video, provided that it has been built for the specific format you're interested in. For movie viewing, the option "vo=x11" is nice. "mplayer --help" will display the basic key bindings available to control playback.
There is a small problem with mplayer that prohibits the playing of video. We will fix this prpoblem in week 9.
Several steps are necessary if you wish to use mplayer in the lab to play any of the audio files mentioned here:
- Download and run snddevices.in.
- modprobe snd-intel8x0
- Run alsamixer, un-muting the master volume and setting the volume.
©2005, Kenneth R. Koehler. All Rights Reserved. This document may be freely reproduced provided that this copyright notice is included.
Please send comments or suggestions to the author.