home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!stanford.edu!sun-barr!sh.wide!wnoc-tyo-news!scslwide!wsgw!wsservra!onoe
- From: anthony@kurango.cit.gu.edu.au (Anthony Thyssen)
- Newsgroups: fj.mail-lists.x-window
- Subject: Re: X client that just sits and waits?
- Message-ID: <1992Dec22.040929.6025@sm.sony.co.jp>
- Date: 22 Dec 92 04:09:29 GMT
- Sender: onoe@sm.sony.co.jp (Atsushi Onoe)
- Distribution: fj
- Organization: Griffith University.
- Lines: 48
- Approved: michael@sm.sony.co.jp
-
- Date: Tue, 22 Dec 1992 01:58:05 GMT
- Message-Id: <Bzn1Gu.47t@kurango.cit.gu.edu.au>
- Newsgroups: comp.windows.x
- References: <1992Dec9.104532.24382@fwi.uva.nl>, <1992Dec12.032847.12529@aw2.fsl.ca.boeing.com>, <RJC.92Dec16042118@daiches.cogsci.ed.ac.uk>
- Sender: xpert-request@expo.lcs.mit.edu
-
- rjc@cogsci.ed.ac.uk (Richard Caley) writes:
- | wijkstra@fwi.uva.nl (Marcel Wijkstra (AIO)) writes:
- | mw> I am looking for a very simple (X) program: one that just waits
- | mw> forever (until it gets killed). [to put at the end of .xinitrc.
- |
- | Try xlogout. It just opens a window which is a button to push, when it
- | is pushed xlogout exits. You can then have a logout button somewhere
- | on your screen.
-
- I tried xlogout for a while but wanted a confirmation of the logout.
- So I rolled my own using xmessage.
-
- --------------8<-----------CUT HERE--------------8<---------------
- #!/bin/sh -
- #
- # This uses the xmessage program to create a Xlogout type button
- #
- exit=
- while [ ! "$exit" ]; do
- xmessage -name xlogout -title xlogout "$@" \
- -buttons "" -xrm '*message.borderWidth: 0' \
- -xrm '*Translations: #override <BtnDown>: exit(0)' \
- -xrm '*Font: -*-new cent*-bold-r-normal--24-*' \
- 'Logout'
- [ $? -ne 0 ] && exit=true
- if [ "$exit" != 'Logout' ]; then
- xmessage -name xlogout -title xlogout "$@" \
- -buttons 'Cancel:0,Logout:1' -xrm '*message.borderWidth: 0' \
- -xrm '*Font: -*-new cent*-bold-r-normal--18-*' \
- 'Are You Sure?'
- [ $? -ne 0 ] && exit=true
- fi
- done
-
- --------------8<-----------CUT HERE--------------8<---------------
-
-
- Anthony Thyssen - (SysProg @ Griffith University) anthony@cit.gu.edu.au
- ------------------------------------------------------------------------------
- "[A computer is] like an Old Testament god,
- with a lot of rules and no mercy." --- Joseph Campbell
- ------------------------------------------------------------------------------
-