[comp.unix.wizards] Looking for Printer names

kklw@mullian..ee.mu.OZ.AU (Kevin K L WONG) (09/05/89)

	How can I find out what are the names of printers availble in an
unix system for the command lpr ? Thank you.

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
|  Kevin WONG                       |  ACSnet   : kklw@mullian.mu.oz          |
|  Department of Elec Engineering   |  internet : kklw@mullian.mu.oz.au       |
|  University of Melbourne          |  uunet    : uunet!munnari!mullian!kklw  |

roy@phri.UUCP (Roy Smith) (09/07/89)

In <2024@munnari.oz.au> kklw@mullian..ee.mu.OZ.AU (Kevin K L WONG) writes:
> 	How can I find out what are the names of printers availble in an
> unix system for the command lpr ? Thank you.

	Assuming you are running a fairly standard Berkeley system, you
should be able to just look at the /etc/printcap file.  It should have a
number of entries which look sort of like the following.  The first bit,
the "lp9|cit902" gives the name(s) for this printer.

# CIT-3500 dot-matrix in room 902
lp9|cit902:\
	:lp=/dev/tty14:br#9600:\
	:fs#0006320:fc#0171457:\
	:xs#0040040:xc#0000000:\
	:pl#66:pw#132:\
	:sc:\
	:sd=/usr/spool/lpr/lp9:\
	:lf=/usr/spool/lpr/lp9/log:\
	:af=/usr/spool/lpr/lp9/acct:
	:fo:tr=\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n:
-- 
Roy Smith, Public Health Research Institute
455 First Avenue, New York, NY 10016
{att,philabs,cmcl2,rutgers,hombre}!phri!roy -or- roy@alanine.phri.nyu.edu
"The connector is the network"

ray3rd@ssc-vax.UUCP (Ray E. Saddler III) (09/07/89)

In article <2024@munnari.oz.au>, kklw@mullian..ee.mu.OZ.AU (Kevin K L WONG) writes:
> 
> 	How can I find out what are the names of printers availble in an
> unix system for the command lpr ? Thank you.
> 

Well Kevin,

I'm not sure what you're asking, but I'll assume that you want to
know what printers your system is currently configured for, and
their capabilities.  If you are wanting to know what _all_ the
printers in the world lpr(1) can support, well, it's unlimited!

The manual entry for lpr has some good leads;

First, look at:

FILES
	/etc/printcap		printer capabilities data base

Then, look at:

SEE ALSO
	printcap(5)

The definitions for devices that lpr(1) knows about are defined in
the /etc/printcap file.  Best-o-luck!
-- 
Ray E. Saddler III       |    __  __ __       __ |          UseNet
Boeing Aerospace         |   / / / //   //| //   | uw-beaver!ssc-vax!ray3rd
P.O. Box 3999 m.s. 3R-05 |  /-< / //-  // |// _  |         PhoneNet
Seattle, WA.  98124  USA | /__//_//__ //  //__/  |      1+206-657-2824

jeff@eniac.seas.upenn.edu (Jeffrey M White) (09/07/89)

In article <3979@phri.UUCP> roy@phri.UUCP (Roy Smith) writes:
>In <2024@munnari.oz.au> kklw@mullian..ee.mu.OZ.AU (Kevin K L WONG) writes:
>> 	How can I find out what are the names of printers availble in an
>> unix system for the command lpr ? Thank you.
>
>	Assuming you are running a fairly standard Berkeley system, you
>should be able to just look at the /etc/printcap file.  It should have a
>number of entries which look sort of like the following.  The first bit,
>the "lp9|cit902" gives the name(s) for this printer.
>...

  Unless the program is restricted, you can also use the lpc command (usually
located in /etc) to get all the printer names.  Just say "lpc stat all".  It's
output will look like the following:

% cets:
	queuing is enabled
	printing is enabled
	no entries
	no daemon present
pender:
	queuing is enabled
	printing is enabled
	no entries
	no daemon present
lw:
	queuing is enabled
	printing is enabled
	no entries
	no daemon present

where "cets", "pender", and "lw" are the names of the printers.

						Jeff White
						University of Pennsylvania
						jeff@eniac.seas.upenn.edu

mike@relgyro.stanford.edu (Mike Macgirvin) (09/07/89)

>In <2024@munnari.oz.au> kklw@mullian..ee.mu.OZ.AU (Kevin K L WONG) writes:
> 	How can I find out what are the names of printers availble in an
> unix system for the command lpr ? Thank you.

	Try 'lpc status'.

/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+        I only speak for myself, and MY brain has been turned to MUSH!     +
+  Mike Macgirvin                                                           +
+  - Systems Administrator  Stanford Relativity Gyroscope Experiment (GP-B) +
+  - Internet:              mike@relgyro.stanford.edu (36.64.0.50)          +
+  - Bitnet:                mike%relgyro.stanford.edu@stanford              +
+  - Uucp:                  uunet!relgyro.stanford.edu!mike                 +
+  "'Scuse me, while I kiss the sky" - Robert James Marshall (Jimi) Hendrix +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

GU.GEYMONT%SCIENCE.UTAH.EDU@wasatch.utah.edu (Rick Geymont) (09/08/89)

If you are using sysV, try looking in the directory /usr/spool/lp/model
for the interface files.

drl@corpane.UUCP (Dan Lance) (09/12/89)

In article <3277@wasatch.utah.edu> GU.GEYMONT%SCIENCE.UTAH.EDU@wasatch.utah.edu (Rick Geymont) writes:
>If you are using sysV, try looking in the directory /usr/spool/lp/model
>for the interface files.

Or try "lpstat -t".

--drl
Dan Lance / Corpane Industries, Louisville KY 
...!uunet!corpane!drl  corpane!drl@uunet.uu.net  corpane!drl@e.ms.uky.edu
-- 
--drl
Dan Lance / Corpane Industries, Louisville KY / (502) 491-4433 ext 115
...!uunet!corpane!drl  corpane!drl@uunet.uu.net  corpane!drl@e.ms.uky.edu