[Kde-kiosk] Idle Logout/Time Out
Wout Mertens
kde-kiosk@mail.kde.org
Fri, 13 Dec 2002 18:14:16 +0100 (CET)
On Thu, 12 Dec 2002, Peter wrote:
> Wout Mertens writes:
> > On Wed, 11 Dec 2002, Peter wrote:
> > > Chris Howells writes:
> > > 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.
>
> no, it doesn't, thats what the `false' argument is for.
Ah, I guess that's the difference between KDE2 and KDE3 :) Fair enough...
On KDE2, it also shows a box with only a "close" button. I think you mean
to have Yes and No buttons?
> > 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
>
> yes, this construct would work, and could also be used with the dcop
> UIserver thing above.
yup, you're right. And something I most recently learned: you can do it
like this:
command & sleep 30; kill $! 2>/dev/null
By the time the shell evaluates the $!, it will already contain the PID of
the backgrounded process...
Cheers,
Wout.