Adding new printers to lpsetup on 3b1

Lenny Tropiano lenny at icus.UUCP
Mon Jul 11 15:40:33 AEST 1988


In article <1074 at flatline.UUCP> erict at flatline.UUCP (j eric townsend) writes:
|>
|>Hardware:  3b1, Unix rel 3.0, Legend 808 printer on parallel port.
|>
|>I'd like to add an entry to the lpsetup for my printer, but I don't
|>see any way to do it....
|>
Well as far as my trusty string table of /usr/bin/lpsetup tells me, you
can look in /etc/printers.  Here's an excerpt:

25 27
ATT455 dumb Parallel
ATT457 dumb Parallel
ATT470 dumb Parallel
ATT471 dumb Parallel
...
ATT435 dumb_S Serial
ATT455 dumb_S Serial
ATT458 dumb_S Serial
ATT475 dumb_S Serial
ATT476 dumb_S Serial

The first number is the # of parallel printers, and likewise the second
number is the number of serial printers.  The format is:

PRINTER_NAME INTERFACE_NAME CLASS_NAME

lpsetup (running as setuid "lp") does a:

/usr/lib/lpadmin -pPRINTER_NAME -i/usr/spool/lp/model/INTERFACE_NAME \
	-cCLASS_NAME -v/dev/XXXX 2> /dev/null
enable PRINTER_NAME > /dev/null 2>&1
/usr/lib/accept PRINTER_NAME CLASS_NAME > /dev/null 2>&1

You can do this by hand if you like.

|>I'm running it on "Epson" now, "Other" worked fine too, but I'd like
|>to take advantage of some of the special functions of my printer
|>instead of just having a raw dump device.  I'd also like to
|>take advantage of anything that lp does to format the output.
|>
All the lp program does is run the output to a shell script (or INTERFACE)
in the /usr/spool/lp/model/ directory.  If you look at 
/usr/spool/lp/interface/Epson you will see it just has some shell commands.

If you need to do some "tricky" formatting stuff, the interface is where
to stick those commands.  (ie.  If you wanted to turn on compressed mode
for your printer, and you knew the escape sequence, you could just do an:

echo "\033\XXX"  replacing XXX with the escape sequence to do your function.

|>Any ideas/suggestions?  Email me and I'll summarize.

I thought this would be worthwhile for the entire net...

-Lenny

-- 
Paper-net: Lenny Tropiano          | @-net:         lenny at icus.UUCP
           ICUS Software Systems   | !-net:      ...att    \
           PO Box 1                |                boulder \
           Islip Terrace, NY 11752 |                talcott  !icus!lenny
Vocal-net: (516) 582-5525 [work]   |                pacbell /
           (516) 968-8576 [home]   |                sbcs   /
Telex-net: 154232428 ICUS          | Another-net:   attmail!icus!lenny



More information about the Comp.sys.att mailing list