I knew this but I can neither remember or find where I used it last
I've an application that needs to be always active when run even if the system is otherwise inactive (i.e. no user attending it). It's not this
1 but imagine, if you will, a computer used as a "media player" which has to keep playing whether there is someone "at the controls" or not so that, for example, you can let it playing while you sit in your sofa and read some latest novel (or old classic
).
Problem is that when the system goes inactive (after, say, 15 min.) the screen shuts down, the session locks ... and your program stops running (and no music sounds)
2.
How can I prevent this? I don't mind if the screen shuts down or what not, but I've to prevent the session lock and/or corresponding pause in the "playing".
I kind of recall that there was some system wide or dbus event(s) to which one could react but I can't remember what those where (if indeed I'm recalling right) or how to intercept them in Pascal code.
Any help, kind folks?
ETA: Forgot to tell! This has to work at least on GNOME, KDE, Xfce and LXDE (or close cousins) but I'll admit any partial solution ...
1. I' sorry but I can't even remotely hint at what this program does
2. Curiously enough, a TTimer the program has keeps aparently running, so when the system is restored to "ready" state the count it keeps is badly out of synch with the time it's suppossed to track. To keep on our example, let's say it reports a four minute song playing its 25th minute ... Thank the gods this isn't very important, but it's ugly as sin.