home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x
- Path: sparky!uunet!munnari.oz.au!bunyip.cc.uq.oz.au!griffin!kurango!anthony
- From: anthony@kurango.cit.gu.edu.au (Anthony Thyssen)
- Subject: Re: X client that just sits and waits?
- Message-ID: <Bzn1Gu.47t@kurango.cit.gu.edu.au>
- Organization: Griffith University.
- References: <1992Dec9.104532.24382@fwi.uva.nl> <1992Dec12.032847.12529@aw2.fsl.ca.boeing.com> <RJC.92Dec16042118@daiches.cogsci.ed.ac.uk>
- Date: Tue, 22 Dec 1992 01:58:05 GMT
- Lines: 42
-
- 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
- ------------------------------------------------------------------------------
-