home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / wizards / 5310 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  2.1 KB

  1. Path: sparky!uunet!spool.mu.edu!olivea!charnel!sifon!thunder.mcrcim.mcgill.edu!mouse
  2. From: mouse@thunder.mcrcim.mcgill.edu (der Mouse)
  3. Newsgroups: comp.unix.wizards
  4. Subject: Re: /dev
  5. Message-ID: <1992Dec22.181532.16403@thunder.mcrcim.mcgill.edu>
  6. Date: 22 Dec 92 18:15:32 GMT
  7. References: <1h3m36INNd4l@usenet.INS.CWRU.Edu>
  8. Organization: McGill Research Centre for Intelligent Machines
  9. Lines: 41
  10.  
  11. In article <1h3m36INNd4l@usenet.INS.CWRU.Edu>, cq377@cleveland.Freenet.Edu (David C. Williss) writes:
  12.  
  13. > I'm working on a software package wich we are porting to Unix and one
  14. > of my parts is the hardcopy output.
  15.  
  16. > 1.  Should I look at the /etc/printcap file to find printers?
  17.  
  18. In general, no.  It is perhaps not unreasonable to do this if someone
  19. turns on a configuration option to do so, but don't depend on it.  The
  20. lab I work for, for example, uses a completely different printer
  21. interface that doesn't even know printcap exists.
  22.  
  23. > 2.  How do I print to a remote printer[?]
  24.  
  25. I see no reason to make any distinction between "remote" printers and
  26. non-"remote" printers.  In either case, you should use whatever command
  27. you're told to use.
  28.  
  29. > 3.  For the sake of argument, lets say I ignore printcap and let the
  30. >     user select printer driver/port from within my program.  Is there
  31. >     any way to tell which special files in /dev are ports and which
  32. >     aren't?
  33.  
  34. Define "port".  We had a VAX with an LP-11 in it, using a dumb driver.
  35. It did nothing but speak to the LP-11; in particular, it did not look
  36. like a tty device.
  37.  
  38. Anyway, no, and you shouldn't be trying anyway.  You should let the
  39. user configure a command to be used to print.  This may be "lpr".  It
  40. may be "cat >/dev/printer/lwiintx-rm718".  It may be "uux - xyzzy!lpr".
  41. It may be "txt2ps | rsh foobox /usr/local/magic/mumble -name ps".
  42.  
  43. Note that "user" may mean the person who installs the software.  It
  44. would be reasonable to have the installer configure a few common
  45. options that the end-user can then pick from...but don't forget to let
  46. the end-user specify a command if desired.
  47.  
  48.                     der Mouse
  49.  
  50.                 mouse@larry.mcrcim.mcgill.edu
  51.