PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > comp.unix.shell > last mouse move or key hit
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.unix.shell Using and programming the Unix shell.

last mouse move or key hit

Réponse
 
LinkBack Outils de la discussion
Vieux 26/03/2008, 04h38   #1
Ron Eggler
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut last mouse move or key hit

Hi,

I would like to get the time of the most recent human activity like a cursor
movement or a key hit.
Does anyone know how I can get this back to start some action after there
has been no activity for X minutes/seconds?
Thank you!

--
chEErs roN
  Réponse avec citation
Vieux 26/03/2008, 13h38   #2
Stephane CHAZELAS
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: last mouse move or key hit

2008-03-26, 03:38(+00), Ron Eggler:
[...]
> I would like to get the time of the most recent human activity like a cursor
> movement or a key hit.
> Does anyone know how I can get this back to start some action after there
> has been no activity for X minutes/seconds?

[...]

For X11, google for the xprintidle utility or the
XScreenSaverQueryInfo(3) API.

--
Stéphane
  Réponse avec citation
Vieux 26/03/2008, 15h26   #3
Ron Eggler
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: last mouse move or key hit

Stephane CHAZELAS wrote:

> 2008-03-26, 03:38(+00), Ron Eggler:
> [...]
>> I would like to get the time of the most recent human activity like a
>> cursor movement or a key hit.
>> Does anyone know how I can get this back to start some action after there
>> has been no activity for X minutes/seconds?

> [...]
>
> For X11, google for the xprintidle utility or the
> XScreenSaverQueryInfo(3) API.
>

Well for X11, not sure what would be about the others without X11... :?
--
chEErs roN
  Réponse avec citation
Vieux 26/03/2008, 16h33   #4
Maxwell Lol
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: last mouse move or key hit

Ron Eggler <ron@example.com> writes:

> Well for X11, not sure what would be about the others without X11... :?


Well, perhaps you can monitor the access time of /dev/tty, /dev/mouse...

  Réponse avec citation
Vieux 26/03/2008, 17h21   #5
Stephane CHAZELAS
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: last mouse move or key hit

2008-03-26, 14:26(+00), Ron Eggler:
[...]
> Well for X11, not sure what would be about the others without X11... :?


Then that would be system dependant. On Linux, you could watch
/proc/interrupts for instance, there might be more specific
APIs.

On a terminal, you can look at the modification time of $(tty).

--
Stéphane
  Réponse avec citation
Vieux 27/03/2008, 06h01   #6
Ron Eggler
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: last mouse move or key hit

Maxwell Lol wrote:

> Ron Eggler <ron@example.com> writes:
>
>> Well for X11, not sure what would be about the others without X11... :?

>
> Well, perhaps you can monitor the access time of /dev/tty, /dev/mouse...


I don't have a /dev/mouse but the access time on /dev/input/mice doesn't
mirror the time of the last mouse movment. I just checked with an "la -la"
would you have thought about any other possibilities?

Thank you!

--
chEErs roN
  Réponse avec citation
Vieux 27/03/2008, 09h31   #7
Luuk
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: last mouse move or key hit

Ron Eggler schreef:
> Hi,
>
> I would like to get the time of the most recent human activity like a cursor
> movement or a key hit.
> Does anyone know how I can get this back to start some action after there
> has been no activity for X minutes/seconds?
> Thank you!
>


$ man screen

....

blanker
Activate the screen blanker. First the screen is cleared. If no lanker
program is defined, the cursor is turned off, otherwise, the program is
started and it's output is written to the screen. The screen blanker is
killed with the first keypress, the read key is discarded.
This command is normally used together with the "idle" command.

blankerprg [program args]
Defines a blanker program. Disables the blanker program if no arguments
are given.


--
Luuk
  Réponse avec citation
Vieux 29/03/2008, 03h14   #8
Ron Eggler
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: last mouse move or key hit

Luuk wrote:

> Ron Eggler schreef:
>> Hi,
>>
>> I would like to get the time of the most recent human activity like a
>> cursor movement or a key hit.
>> Does anyone know how I can get this back to start some action after there
>> has been no activity for X minutes/seconds?
>> Thank you!
>>

>
> $ man screen
>
> ...
>
> blanker
> Activate the screen blanker. First the screen is cleared. If no lanker
> program is defined, the cursor is turned off, otherwise, the program is
> started and it's output is written to the screen. The screen blanker is
> killed with the first keypress, the read key is discarded.
> This command is normally used together with the "idle" command.
>
> blankerprg [program args]
> Defines a blanker program. Disables the blanker program if no arguments
> are given.


And where would i find these applications? i googled but didn't find
anything...
Thanks!

--
chEErs roN
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 17h48.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,16355 seconds with 16 queries