home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / x / volume7 / xdm / patch1.01 / README.console < prev    next >
Encoding:
Text File  |  1990-06-08  |  3.0 KB  |  66 lines

  1.  
  2.  
  3. Here are the diffs to xdm to put a console window up (so console messages
  4. don't destroy the screen). Please note that these are in no way official
  5. patches to xdm! Use them at your own risk! These diffs should be unpacked
  6. in ...mit/clients/xdm and applied with:
  7.  
  8. make Makefile
  9. make
  10.  
  11. These diffs have been tested on Sun3, Sun386i and sunSS1 workstations all
  12. running SunOS 4.0.x. The diffs have been tested under X11r3 and X11r4, although
  13. only the diffs for X11r4 are included here. If you need the X11r3 stuff, I
  14. spose I can hack a copy out, but the diffs are so small you should be able to do
  15. it yourself.
  16.  
  17. This new version creates an application called xdmconsole. All it really
  18. does it display any text that it reads from stdin. This window is created
  19. when the xdm Login widget appears. The window persists throughout a user's
  20. session (unless the silly fool kills it :-). The window is destroyed at the
  21. end of a user's session and is re-created when the Login widget re-appears.
  22. There is a tiny period between the xdm-reset and the arrival of the Login
  23. widget in which messages to the console will actually appear on the console...
  24. I thought about it and can't think of any nice ways of fixing it, the 
  25. problem isn't major (I've never seen it happen), so I didn't worry. 
  26.  
  27. The patch to xdm basically allows for the creation of the tty/pty pair
  28. that becomes the new console (this happens in dm.c), the hijack of the
  29. console output (using ioctl with TIOCCONS, the console is re-assigned to
  30. the tty of the tty/pty pair), the re-assignment of stdin to the pty side
  31. of the pair and the creation of the xdmconsole process (that, suprise,
  32. suprise, reads from stdin which just now happens to be the pty) (all this 
  33. happens in makeconsole.c, get_pty.c and is called from session.c)
  34.  
  35. The code to get a pty/tty pair was lifted wholesale from xterm.
  36.  
  37. Be warned! The code for this (esp. the X stuff) is exceedingly bad. Rather
  38. shameful might be more accurate (c'mon, it was my 2nd attempt at XLib
  39. programming). I hadn't even heard of the X toolkit when I first wrote this
  40. code, and don't expect to be able to set any resources either.
  41. Also, be careful of changing anything! The text printing in the window
  42. relies on the text being a certain size (puke :-),  and, in fact, the 
  43. window being a certain size as well.  The current setting places the
  44. window in the horizontal middle of your screen, with about a 30 pixel gap
  45. between the bottom of the window and the bottom of the screen.
  46.  
  47. Also, you will have to set
  48.  
  49. DisplayManager*grabServer:    false
  50.  
  51. in .../xdm/xdm-config, otherwise the window simply won't be able to appear
  52. until the user actually logs in, which rather defeats the purpose :-)
  53.  
  54. All in all, though, it doesn't look TOO bad. One day I may even get around
  55. to making it really nice, but please be aware that I'll only provide
  56. minimal support for it.
  57.  
  58. regards...
  59.                     Chris Keane.
  60.                     Glorified Laboratory Attendant,
  61.                     University of Technology, Sydney.
  62.                     keane@ultima.cs.uts.oz.au
  63.                     or is it keane@ultima.socs.uts.edu.au?
  64.                     I can never remember.
  65.  
  66.