home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / sun / admin / 9399 < prev    next >
Encoding:
Text File  |  1992-12-13  |  2.4 KB  |  57 lines

  1. Newsgroups: Comp.windows.x.motif,comp.sys.sun.admin
  2. Path: sparky!uunet!psinntp!intell!emcguire
  3. From: emcguire@intellection.com (Ed McGuire)
  4. Subject: Re: Administering users sharing workstations
  5. In-Reply-To: vandenbe@latcs2.lat.oz.au's message of Fri, 11 Dec 1992 02:00:44 GMT
  6. Message-ID: <EMCGUIRE.92Dec13102220@mother.intellection.com>
  7. Sender: emcguire@intellection.com (Ed McGuire)
  8. Organization: Intellection, Inc.
  9. References: <1992Dec11.020044.7115@latcs1.lat.oz.au>
  10. Date: Sun, 13 Dec 1992 16:22:20 GMT
  11. Lines: 44
  12.  
  13. In article <1992Dec11.020044.7115@latcs1.lat.oz.au> vandenbe@latcs2.lat.oz.au (Thomas A. Vandenbelt) writes:
  14.  
  15.    As in our department, we share our worksatations, we like to have
  16.    a menu option for logout.  However, so far the only way I have
  17.    been able to do this is to get our staff to close all windows
  18.    and then kill motif (using f.quit_mwm).
  19.  
  20.    Is there a better way to get a user to the login prompt?
  21.  
  22. If the session is controlled by xinit, then it ends when the user
  23. process quits.  This is the .xinitrc process, unless .xinitrc doesn't
  24. exist in which case it is the default xterm process.  If the last
  25. command in .xinitrc is "exec mwm", then the session ends when mwm
  26. dies.  Add f.quit_mwm to the menu in /usr/lib/X11/system.mwmrc or the
  27. user's .mwmrc with a menu entry like "Quit _Q f.quit_mwm".
  28.  
  29. Whether the user gets a new login prompt also depends on how xinit was
  30. started.  What I would do is conditionally replace the user's login
  31. shell with it in the login rc file (.profile or .login), e.g.:
  32.     if ( "` tty `" == "/dev/console" )
  33.         echo -n "Starting window system in 5 seconds..."
  34.         sleep 5
  35.         exec xinit
  36.     endif
  37. (Note that this snatch of code is a quick improvization; caveat
  38. emptor.)
  39.  
  40. If the session is controlled by xdm, then the new login prompt is
  41. automatic when the session ends.  The rule for this is similar to
  42. xinit, except that the initial process is the user's .xsession or
  43. /usr/lib/X11/xdm/Xsession.  Either of these should replace themselves
  44. with mwm by "exec mwm" just as suggested in .xinitrc above.  Then the
  45. f.quit_mwm menu entry will terminate the session and xdm will reissue
  46. a login prompt.
  47.  
  48. This second case is in fact how we do it.  Contact me if you have any
  49. questions.
  50.  
  51. Regards, Ed
  52. -- 
  53. Ed McGuire                   1603 LBJ Freeway, Suite 780
  54. Systems Administrator/       Dallas, Texas 75234
  55.  Member of Technical Staff   214/620-2100, FAX 214/484-8110
  56. Intellection, Inc.           <ed@intellection.com>
  57.