home *** CD-ROM | disk | FTP | other *** search
/ ftp.ncftp.com / ftp.ncftp.com.zip / ftp.ncftp.com / unixstuff / q2getty.tar.gz / q2getty.tar / q2getty / README < prev   
Text File  |  1998-06-23  |  2KB  |  55 lines

  1. This is based off of the mingetty-0.9.4 source RPM.  The author of mingetty is:
  2.  
  3.     Florian La Roche
  4.  
  5.     florian@suse.de
  6.     florian@jurix.jura.uni-sb.de
  7.  
  8. This hack was derived from mingetty and login by
  9. Mike Gleason <mgleason@NcFTP.com>.
  10.  
  11.  
  12. How to use it
  13. =============
  14.  
  15. This provides a nice way to run and respawn a program on a virtual console,
  16. instead of using getty and login like you normally would on a vc.
  17.  
  18. I use it with the quake2 server.  I first created a "quake2" user, so I can
  19. run the server program as that user instead of "root".
  20.  
  21. First, run "make" to build the "q2getty" program and install it, i.e.
  22. in /usr/local/bin.
  23.  
  24. The first argument to the program is the /dev/ttyN to run it on, i.e. "tty3".
  25. The second is the user to run as.  Use "root" if you're too lazy to set one
  26. up.  The third and subsequent arguments are used to run the subprogram.
  27.  
  28. I then replaced virtual console #3's getty entry (tty3) in /etc/inittab with:
  29.  
  30. 3:2345:respawn:/usr/local/bin/q2getty tty3 quake2 /home/quake2/quake2 +set dedicated 1
  31.  
  32. (Actually, I replaced the "/home/quake2/quake2 +set dedicated 1" part with
  33. the path of a shell script that launches it, but you get the point.)
  34.  
  35. After finishing the edits to /etc/inittab, do "init q" to commit the changes,
  36. however, you still may need to kill off the "getty" process that was running
  37. on tty3.  "ps aux | fgrep getty" and kill that process.
  38.  
  39. This now runs the quake2 server program on console 3 (ALT-F3). You can also
  40. switch to that console to view output or type input.
  41.  
  42.  
  43. Why to use it
  44. =============
  45.  
  46. If the server process happens to die, it will be respawned automatically.
  47. So, in the rare case that the process dies, you don't have to be there
  48. to restart it manually.
  49.  
  50. You don't have to leave a live window running on your machine, so there's
  51. no danger of someone killing the q2 server and being left at a shell prompt.
  52.  
  53. So although it runs in the background, you can still switch to the console
  54. and type commands to the q2 shell.
  55.