home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / sun / admin / 4913 < prev    next >
Encoding:
Text File  |  1992-07-23  |  3.7 KB  |  89 lines

  1. Newsgroups: comp.sys.sun.admin
  2. Path: sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!yale!gumby!destroyer!ncar!uchinews!geosun.uchicago.edu!valdes
  3. From: valdes@geosun.uchicago.edu (John Valdes)
  4. Subject: Re: resetting pseudo-terminal sizes?
  5. Message-ID: <1992Jul23.192543.4308@midway.uchicago.edu>
  6. Sender: news@uchinews.uchicago.edu (News System)
  7. Organization: Department of the Geophysical Sciences, University of Chicago
  8. References: <1992Jul22.230123.23146@midway.uchicago.edu> <13688@auspex-gw.auspex.com>
  9. Date: Thu, 23 Jul 1992 19:25:43 GMT
  10. Lines: 77
  11.  
  12. >
  13. >>Say I start a shell
  14. >>in a terminal window under a windowing system (X, Openwin or Sunview,
  15. >>doesn't matter) and resize the window so that it's 132 colums x 50 lines.
  16. >>Say also that this window uses /dev/ttyp3.  Now if exit the shell (an
  17. >>hence quit the window, freeing the tty) and then remotely log into the
  18. >>system so that my login uses /dev/ttyp3, the terminal size will still
  19. >>be set to 132 cols by 50 lines!
  20. >
  21. >Didn't happen for me when I just tried it (SunOS 4.1.1, OW 2.0).
  22.  
  23. OK, I just tried to reproduce the results under OW 2.0 and 3.0, but it
  24. didn't show up in with either version (SunOS 4.1.1, BTW).  I guess I 
  25. was a bit rash including OW; I remember having the problem under Sunview,
  26. and I'm currently experiencing it under X (from MIT, X11R4), so I assumed
  27. the problem was present under OW also.
  28.  
  29. I have been able to reliable reproduce the results under X and Sunview,
  30. but only under certain circumstances.  Here's what I do:
  31.  
  32. 1)  Start up X or sunview
  33.  
  34. 2)  In addition to whatever xterms or cmdtools (or shelltools) opened
  35.     when you started X or sunview, respectively, open two more.  For
  36.     example, say that you started X with two xterms which use /dev/ttyp0
  37.     and /dev/ttyp1.  You want to open two more xterms so that they
  38.     use ttyp2 and ttyp3.
  39.  
  40. 3)  Resize the first of the two windows you opened in 1) (the xterm
  41.     using ttyp2 in the example above).  stty -a should reflect the new size.
  42.  
  43. 4)  Exit the window which you just resized (ttyp2)
  44.  
  45. 5)  From any of the other windows (or from another machine), telnet
  46.     into the machine so that your login uses the same ttyp used by
  47.     the window you just resized and quit (ttyp2, in this example).
  48.  
  49. 6)  If you now type stty -a, the number of rows and columns reported
  50.     will match the size of the window you had just resized and quit.
  51.  
  52. Observations:
  53.  
  54.   Assume ttyp(n) is the ttyp which has be resized for the following:
  55.  
  56.   -I see this behavior only if ttyp(n+1) is in use.  For example, say
  57.    ttyp0, ttyp1, ttyp2, ttyp3 and ttyp4 are in use.  This behavior
  58.    won't be seen if ttyp4 is the one resized.  It will happen if ttyp2
  59.    is the one resized.  ttyp(n-1) may also have to be in use, but I
  60.    haven't tested this in all cases.  (Hey, I've got work to do!! (-: )
  61.  
  62.   -It seems that this only happens with even numbered ttyp's, but again
  63.    I haven't tested this extensively.
  64.  
  65. BTW, I'm running my xterm's suid.  Does anyone else see this behavior?
  66.  
  67. >
  68. >>but I would much prefer having the pseudo-terminal driver 
  69. >>(re)size the terminal properly itself.
  70. >
  71. >The pseudo-tty driver can't resize it itself, as it has no idea what the
  72. >right size is.  It can only do what the process on the master side tells
  73. >it.
  74.  
  75. I guess I didn't express myself very well.  What I meant to say is that
  76. I would prefer that, once a ttyp* is freed, the driver would either
  77. set the number of lines and columns as undefined, or set them to 0
  78. (which may be the same thing as undefined; I'm not that familiar with
  79. the workings of the driver).
  80.  
  81. >There may have been a bug, in whatever version of the OS that you're
  82. >running, that kept the resize from happening; what version are you
  83. >using?
  84.  
  85. SunOS 4.1.1, MIT X11R4
  86.  
  87. John Valdes
  88. valdes@geosun.uchicago.edu
  89.