home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!asuvax!chnews!sedona!bhoughto
- From: bhoughto@sedona.intel.com (Blair P. Houghton)
- Newsgroups: comp.unix.wizards
- Subject: Re: /dev
- Date: 21 Dec 1992 19:53:38 GMT
- Organization: Intel Corp., Chandler, Arizona
- Lines: 56
- Message-ID: <1h57c2INNhsi@chnews.intel.com>
- References: <1h3m36INNd4l@usenet.INS.CWRU.Edu>
- NNTP-Posting-Host: stealth.intel.com
-
- In article <1h3m36INNd4l@usenet.INS.CWRU.Edu> cq377@cleveland.Freenet.Edu (David C. Williss) writes:
- > 1. Should I look at the /etc/printcap file to find printers?
-
- Look at the PRINTER environment variable (RTFM getenv(3)),
- and then check the printcap(5) and use the first printer
- you find there. That is, *if* the machine has a printcap
- (AIX does not; it uses a thing called "qconfig.")
-
- Or just use lpr(1).
-
- > Assuming that somebody at the user's site is compatent
- > (bad assumption) they would just have to setup printcap
- > The problems here are 1. Based on past experience, I can't
- > assume they know what their doing.
-
- Tough cookies on them, then. Have the program barf a
- warning about a screwed-up printcap. Users aren't nearly
- as fragile as programmers believe. And if they have any
- normal printers to which your output could go, they'll have
- to have a working printcap, so it's a bad assumption if and
- only if it's a bad assumption that they have a printer.
-
- Or just use lpr.
-
- >2. Seems not all flavors
- > of unix use /etc/printcap. (We're supporting multiple platforms)
- >
- > 2. How do I print to a remote printer. I suppose I could fork
- > and exec lpr. Is that the reccomended method?
-
- Barry says to use popen(3) and lpr. I say, "What he said."
-
- > 3. For the sake of argument, lets say I ignore printcap and let the
- > user select printer driver/port from within my program. Is
- > there any way to tell which special files in /dev are ports
- > and which aren't? Every book I've read talks about "conventional"
- > names, but every implementation seems to have its own ideas
- > as what to name them. I want to avoid confusing the user by
- > showing such things as /dev/rroot.
-
- Okay, sounds like what you're really saying is they'll have
- printers available that never need to use lpr. Some
- plotter drivers I know of are like this, and at least one
- plotter around here used to double as a (very strange) text
- printer.
-
- The problem with this paradigm is that it takes a fair
- amount of history (oral or filed-away) to remember what
- devices are what. Devices that come with a system are
- (often but not always) documented. Devices added to a
- system (presumably by the field engineer who installed
- this funny printer) may not be, if the local users
- who bought the funny printer have misplaced the docs.
-
- --Blair
- "Welcome to the real world."
-