[Kde-kiosk] Idle Logout/Time Out
Peter
kde-kiosk@mail.kde.org
Sat, 14 Dec 2002 13:00:10 +0100
Hi,
Wout Mertens writes:
> 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.
>
have to correct myself, you have to kill kio_uiserver for the message
box to disappear, like `killall kio_uiserver' instead of `kill $!'.
> 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...
>
bye,
Peter
--
Peter Kruse <pk@q-leap.com>
Q-Leap Networks GmbH
+497071-703171