home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / windows / x / 20463 < prev    next >
Encoding:
Text File  |  1992-12-22  |  2.1 KB  |  53 lines

  1. Newsgroups: comp.windows.x
  2. Path: sparky!uunet!munnari.oz.au!bunyip.cc.uq.oz.au!griffin!kurango!anthony
  3. From: anthony@kurango.cit.gu.edu.au (Anthony Thyssen)
  4. Subject: Re: X client that just sits and waits?
  5. Message-ID: <Bzn1Gu.47t@kurango.cit.gu.edu.au>
  6. Organization: Griffith University.
  7. References: <1992Dec9.104532.24382@fwi.uva.nl>     <1992Dec12.032847.12529@aw2.fsl.ca.boeing.com> <RJC.92Dec16042118@daiches.cogsci.ed.ac.uk>
  8. Date: Tue, 22 Dec 1992 01:58:05 GMT
  9. Lines: 42
  10.  
  11. rjc@cogsci.ed.ac.uk (Richard Caley) writes:
  12. | wijkstra@fwi.uva.nl (Marcel Wijkstra (AIO)) writes:
  13. | mw> I am looking for a very simple (X) program: one that just waits
  14. | mw> forever (until it gets killed). [to put at the end of .xinitrc.
  15. |
  16. | Try xlogout. It just opens a window which is a button to push, when it
  17. | is pushed xlogout exits. You can then have a logout button somewhere
  18. | on your screen.
  19.  
  20. I tried xlogout for a while but wanted a confirmation of the logout.
  21. So I rolled my own using xmessage.
  22.  
  23. --------------8<-----------CUT HERE--------------8<---------------
  24. #!/bin/sh -
  25. #
  26. #  This uses the xmessage program to create a Xlogout type button
  27. #
  28. exit=
  29. while [ ! "$exit" ]; do
  30.   xmessage -name xlogout -title xlogout "$@" \
  31.         -buttons "" -xrm '*message.borderWidth: 0' \
  32.         -xrm '*Translations: #override <BtnDown>: exit(0)' \
  33.         -xrm '*Font: -*-new cent*-bold-r-normal--24-*' \
  34.         'Logout'
  35.   [ $? -ne 0 ] && exit=true
  36.   if [ "$exit" != 'Logout' ]; then
  37.     xmessage -name xlogout -title xlogout "$@" \
  38.         -buttons 'Cancel:0,Logout:1' -xrm '*message.borderWidth: 0' \
  39.         -xrm '*Font: -*-new cent*-bold-r-normal--18-*' \
  40.         'Are You Sure?'
  41.     [ $? -ne 0 ] && exit=true
  42.   fi
  43. done
  44.  
  45. --------------8<-----------CUT HERE--------------8<---------------
  46.  
  47.  
  48.   Anthony Thyssen - (SysProg @ Griffith University)     anthony@cit.gu.edu.au
  49. ------------------------------------------------------------------------------
  50.        "[A computer is] like an Old Testament god,
  51.             with a lot of rules and no mercy."   ---  Joseph Campbell
  52. ------------------------------------------------------------------------------
  53.