home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / question / 9637 < prev    next >
Encoding:
Internet Message Format  |  1992-07-31  |  2.0 KB

  1. Xref: sparky comp.unix.questions:9637 comp.unix.shell:3244 comp.unix.programmer:4040
  2. Newsgroups: comp.unix.questions,comp.unix.shell,comp.unix.programmer
  3. Path: sparky!uunet!utcsri!torn!maccs!mcshub!zooks!roy
  4. From: roy@zooks.eng.mcmaster.ca (Roy Underhill)
  5. Subject: Which terminal gets console output?
  6. Message-ID: <1992Jul31.160506.14530@mcshub.dcss.mcmaster.ca>
  7. Summary: How to find out?
  8. Keywords: console, tty
  9. Sender: usenet@mcshub.dcss.mcmaster.ca
  10. Nntp-Posting-Host: zooks.eng.mcmaster.ca
  11. Organization: Dept. of Mech. Eng., McMaster University
  12. Date: Fri, 31 Jul 1992 16:05:06 GMT
  13. Lines: 32
  14.  
  15.  
  16.     Here's a question that came up and I have not found any answer
  17. for it.  If anyone knows, then would they be kind enough to post/mail
  18. it?
  19.  
  20.     Users here has the title bar of terminal windows set up 
  21. to show who they are, what host they is on and what directory they is in.  
  22. Occasionally one starts up a new (pseudo) terminal and specifies that it 
  23. is to receive the console output.  For such a terminal it is desired
  24. that the title to be "CONSOLE" and never change.  That much is easy enough.  
  25.  
  26.  
  27.     What is more difficult is for the previous console window (usually 
  28. an xterm or xwsh) to detect that it no longer receives the console output so 
  29. that it will revert to "ordinary" treatment of its title bar and no longer
  30. proclaim that it is the console.  That part has me stymied at for the
  31. present.  tty replies with ttyq?? rather than /dev/console.  ps will
  32. tell you what shell is running in your window, but the command that
  33. started that window is associated with whatever window you were in
  34. when the command was issued.  The initial console window may not be associated
  35. with any tty at all.  That is, ps provides ? for the tty.
  36.  
  37.  
  38.     Any help would be appreciated.
  39.  
  40.  
  41. Roy
  42. -- 
  43.    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
  44.   Roy Underhill,  (416) 525-9140 x4395   roy@zooks.eng.mcmaster.ca 
  45.   Department of Mechanical Engineering,  McMaster University, 
  46.   Hamilton,  Ontario,  Canada            L8S 4L7
  47.