[Kde-kiosk] Idle Logout/Time Out

Wout Mertens kde-kiosk@mail.kde.org
Thu, 12 Dec 2002 10:24:30 +0100 (CET)


On Wed, 11 Dec 2002, Peter wrote:
> Chris Howells writes:
>  > On Wednesday 11 December 2002 13:50, Peter wrote:
>  > > #!/bin/bash
>  > > sleep 900
>  > > xmessage -center -timeout 5 "15 min remaining"
>  >
>  > IIRC there's a way using dcop to construct an slightly more friendly KDE
>  > information dialog which could say the same thing. I can't remember how to do
>  > this though :(
>  >
>
> well, yes, thats right, but without the timeout option, though...
>
> anyways it would go like this (or at least did in kde 3.0):
>
> --------------------------------------8<--------------------------------------
>
> #!/bin/bash
> kio_uiserver
> jobid=`dcop kio_uiserver UIServer newJob myApp false`
> dcop kio_uiserver UIServer messageBox $jobid 5 "my message" myApp yes no
> dcop kio_uiserver UIServer jobFinished $jobid
>
> --------------------------------------8<--------------------------------------

Well, it also works in KDE 2.2.1. But it also pops up the IO transfer
window until the jobFinished message, which seems silly to me.

Another way would be to use artsmessage, which has a very high probability
of being installed together with KDE. It also doesn't have a timeout, but
you could use this construct:

#!/bin/bash
artsmessage -w "Are you there?" &
sleep 30
kill $! 2>/dev/null

Which kills the message after 30 seconds...

Wout.