This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Energy management: script starts after x minutes. Possible?

Tags: None
(comma "," separated)
User avatar
Arran
Registered Member
Posts
229
Karma
0
OS
Hello
Is it possible to use the KDE energy management to start a script if x minutes nothing happened?
There is obviously a test if the mouse or keyboard gets no more impulses. After a certain time the screen is switched off.
However, I would like a script running after this time instead of switching the sceen off.

Thank for any help.


Best greetings from Scotland's nicest holiday island.
Kubuntu 18.04, 64 bits, Nvidia 4800GS, 8MB Ram, 4 core, HP Monitor 2550 x 1600 pixels.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
From what I can tell, it is not possible to do this at this time.
However, KDE Power Management should be extendable to do this if you altered the code.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Minio
Registered Member
Posts
177
Karma
1
OS
It depends on how you define "nothing happend". If you only want to check user input (mouse and keyboard), there is little utility called "xprintidle" which will tell you how long X did not get any input. You may run it in cron or infinite loop and run your script in certain conditions are met.

Of course there might be user logged in through SSH or working on TTY. Few simultaneous X sessions are also possible. These are circumstances you must take into account.


Best regards
Mirosław Zalewski
User avatar
Arran
Registered Member
Posts
229
Karma
0
OS
OK, Thanks a lot, your responses helped me. So all is well and running smoothly.


Best greetings from Scotland's nicest holiday island.
Kubuntu 18.04, 64 bits, Nvidia 4800GS, 8MB Ram, 4 core, HP Monitor 2550 x 1600 pixels.


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell