home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / linux / 10787 < prev    next >
Encoding:
Internet Message Format  |  1992-09-15  |  2.4 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!wupost!uwm.edu!ogicse!mintaka.lcs.mit.edu!bloom-picayune.mit.edu!daemon
  2. From: tytso@ATHENA.MIT.EDU (Theodore Ts'o)
  3. Newsgroups: comp.os.linux
  4. Subject: Re: Can you access a virtual console directly?
  5. Message-ID: <1992Sep16.022648.24479@athena.mit.edu>
  6. Date: 16 Sep 92 02:26:48 GMT
  7. Sender: daemon@athena.mit.edu (Mr Background)
  8. Reply-To: tytso@ATHENA.MIT.EDU (Theodore Ts'o)
  9. Organization: The Internet
  10. Lines: 46
  11.  
  12.  
  13.    From: kennu@mits.mdata.fi (Kenneth Falck)
  14.    Date: Tue, 15 Sep 1992 16:49:30 GMT
  15.  
  16.    You know, that might be one of the reasons MSDOS has made it so big;
  17.    your applications can have very powerful output when you don't have
  18.    to hassle with some control codes that really belong to the externally
  19.    connected terminals, not to the console screen. Of course the price is
  20.    the lack of multitasking, except with these 80386 memory-redirections
  21.    (of which I know very little)...
  22.  
  23. No, this has absolutely nothing to do with why MS-DOS made it big.  You
  24. can do the same thing just as easily under Unix; you just have to know
  25. the right libraries.
  26.  
  27.    How about if the kernel had some special services that would make it
  28.    easy and portable (within Linuces) to use the virtual consoles without
  29.    termcap? I mean something like this:
  30.  
  31.     [ source code that looks remarkably like what you'd use when you
  32.       called the curses library deleted.]
  33.  
  34.    Does this seem like a stupid idea (coming from an MSDOS
  35.    programmer like me...) or would it bring some more power
  36.    into the Linux-applications? 
  37.  
  38. It's not a stupid idea, except you don't need the kernel to do it.  You
  39. just need to use the curses library, which in turn will call the termcap
  40. routines, but which will do it all in the behind the curtain.  If you
  41. use the curses library, you don't need to use the termcap routines; it
  42. takes care of all of this automatically so you don't need to worry about
  43. it.
  44.  
  45. The advantage of this technique is that you have the easy of programming
  46. in that you don't need to worry about doing the low-level termcap
  47. programming, but your program is still portable to different terminals,
  48. not just the VGA/CGA/EGA screens.  AND, you don't need any non-portable
  49. kernel hacks to do it!
  50.  
  51. Let me give some advice directed to MS-DOS programmers who are trying to
  52. learn their way around Linux:  
  53.  
  54.     There are always many ways of doing the same thing;
  55.     In nearly all cases, MS-DOS did it the wrong way.
  56.  
  57.                             - Ted
  58.