home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!olivea!charnel!sifon!thunder.mcrcim.mcgill.edu!mouse
- From: mouse@thunder.mcrcim.mcgill.edu (der Mouse)
- Newsgroups: comp.unix.wizards
- Subject: Re: /dev
- Message-ID: <1992Dec22.181532.16403@thunder.mcrcim.mcgill.edu>
- Date: 22 Dec 92 18:15:32 GMT
- References: <1h3m36INNd4l@usenet.INS.CWRU.Edu>
- Organization: McGill Research Centre for Intelligent Machines
- Lines: 41
-
- In article <1h3m36INNd4l@usenet.INS.CWRU.Edu>, cq377@cleveland.Freenet.Edu (David C. Williss) writes:
-
- > I'm working on a software package wich we are porting to Unix and one
- > of my parts is the hardcopy output.
-
- > 1. Should I look at the /etc/printcap file to find printers?
-
- In general, no. It is perhaps not unreasonable to do this if someone
- turns on a configuration option to do so, but don't depend on it. The
- lab I work for, for example, uses a completely different printer
- interface that doesn't even know printcap exists.
-
- > 2. How do I print to a remote printer[?]
-
- I see no reason to make any distinction between "remote" printers and
- non-"remote" printers. In either case, you should use whatever command
- you're told to use.
-
- > 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?
-
- Define "port". We had a VAX with an LP-11 in it, using a dumb driver.
- It did nothing but speak to the LP-11; in particular, it did not look
- like a tty device.
-
- Anyway, no, and you shouldn't be trying anyway. You should let the
- user configure a command to be used to print. This may be "lpr". It
- may be "cat >/dev/printer/lwiintx-rm718". It may be "uux - xyzzy!lpr".
- It may be "txt2ps | rsh foobox /usr/local/magic/mumble -name ps".
-
- Note that "user" may mean the person who installs the software. It
- would be reasonable to have the installer configure a few common
- options that the end-user can then pick from...but don't forget to let
- the end-user specify a command if desired.
-
- der Mouse
-
- mouse@larry.mcrcim.mcgill.edu
-