On Wed, Apr 26, 2017 at 4:52 PM, Kent West <we...@acu.edu> wrote:

> I'm trying to work on a home-grown kiosk using Jessie.
>
> I've got 90% of it done, but I need it to logout after a certain time of
> inactivity, but only after the computer has been used at least once since
> the last start of X (otherwise it'll just be in a slow loop of restarting
> X).
>
> In other words, something like:
>
> - boot into X
> - sit idly for 20 minutes, 2 hours, 3 days, whatever, screensaver running,
> until a guest comes up and uses the kiosk
> - The guest walks away from the kiosk
> - 2 minutes later the screensaver kicks in, and X restarts
>
> (It might also be nice to have a 15-second delay when the guest can awaken
> the screensaver, aborting the restart.)
>
> I'm having a really hard time figuring out how to do this. Any ideas?
>
> Thanks!
>
>
>
I think I've got the basic logic worked out, but I need some help with the
syntax.

In my .xinitrc, I have

export FRESH_X=TRUE

Then I want to have a script that sits and waits for a keypress or a mouse
activity; this is where I need the syntax help.

When that script sees keyboard or mouse activity, it will export
FRESH_X=FALSE

I'll configure the xscreensaver-command --watch to watch for the screen
saver to go BLANK, and when it does to check the status of FRESH_X ; if
FRESH_X is FALSE, and the screensaver activates, I can set a 10-second
time, check again to make sure the screensaver is still active, and then
run my logout.

But I need help with the syntax of checking for a keypress or mouse
activity. I've looked at xinput and xev and another tool something like
xenv, but I can't figure out the syntax in a bash if/then statement.

Any help would be appreciated.

Thanks!




-- 
Kent West                    <")))><
Westing Peacefully - http://kentwest.blogspot.com

Reply via email to