Possible to lock screen instead of terminate session?

Asked by Diego Zamboni

First of all, thank you for your work on Timekpr-next - it works nicely and is very accurate. As an additional note, I was able to install and use it on Linux Deepin (based on Debian), and it works well.

My question is whether it is possible to take some other action instead of terminating the user session when the allocated time is over. Terminating the question is quite a harsh measure, as it kills the applications the user is running at the time and may lead to data loss. It would be nice to be able to specify some other action to execute. Allowing the specification of an arbitrary command would make it possible for the administrator to create custom actions.

Is this already possible? Otherwise please kindly consider it as a feature request.

Question information

Language:
English Edit question
Status:
Solved
For:
Timekpr-nExT Edit question
Assignee:
Eduards Bezverhijs Edit question
Solved by:
Diego Zamboni
Solved:
Last query:
Last reply:
Revision history for this message
Eduards Bezverhijs (mjasnik) said :
#1

Hi,

Currently there is no such feature and forcibly logging out user is the only way how to stop user from doing what he's doing... There are multiple warnings as well as time left in system notification area to warn him to avoid a little disaster :)

However, it's possible to add such a feature, but before that I would like to understand how this is going to be used...
Like example for locking the session - the time has ended, timekpr will lock the session, user will unlock the session, timekpr will lock it again, user unlocks it, and so on...

What is the real life scenario You have in mind?

Revision history for this message
Diego Zamboni (zzamboni) said :
#2

Hi Eduards,

Thanks for your message. The main use case for me is to allow the user (my daughter, in this case) to use the computer up to a pre-determined allowed time per day, and at the end of that time to *gently* prevent her from further using the machine. Part of the problem is that in Deepin Linux Timekpr seems to work (see more below), but the notifications apparently don't (I assume it's a session-manager specific mechanism), so when the time runs out, the log off comes as a complete surprise.

I think keeping the current behavior as default is good, but allowing the admin to customize the command that gets executed upon "time out" would allow a lot more flexibility. For example:

- Customize notifications (e.g. adapt to the notification mechanisms used by different WMs, session managers, or distros)
- Customize the lockout mechanism. For example, I would like to a) lock the user, b) temporarily disable the user using the "passwd -l" command. I am aware this may change the model substantially, as now it would be necessary to run a "reenable user" command when the user next becomes usable (e.g. the next day).

I'm aware I might be overthinking this :)

BTW, unfortunately I had to uninstall timekpr from my daughter's machine in the meantime, as it was seemingly affecting other accounts (e.g. mine) as well when the time ran out. I would appreciate any suggestions about where to look (e.g. log files) for what could have been causing the problem.

Thanks again for your work!

Revision history for this message
Eduards Bezverhijs (mjasnik) said :
#3

Hi,

First of all, Your situation is somewhat interesting. There are couple of things I would like to point out:
*) Timekpr uses standard DBUS notification mechanisms, so far there are no problems with them and every DE that I know of uses them and should display notifications properly (maybe client application has not been started for some reason, I'll check that)
*) Timekpr controls users separately, there should not be any influence from one user to other, multiple users can even be logged in simultaneously and there should be no problems (this has been verified) unless You configured it to limit every user's time (by default everything is allowed without disturbances)

I'll download Deepin 15.11 and try to install timekpr and see what happens.

Can You please describe Your problems in couple of sentences?
I understand that Your daughter is kicked out without a warning, but how Your account is affected? Are You kicked when her allowance ended or randomly or ...?
Did You make configuration for every user, including Yourself?
Do You see Timekpr icon in notification area?
Does none of Your users get any of the notifications?
What version of Timekpr-nExT are You using?
How did You install Timekpr-nExT?
Can You send me /var/log/timekpr.log file and every file found in these directories /var/lib/timekpr/work/ and /var/lib/timekpr/config/ ?
When Timekpr-nExT client app is running it should create log file /tmp/timekprc.<actual username).log , possibly that did not survive after uninstall, but if You try to reproduce the issue by installing it again, please send me that file as well.

If this is preferred, please e-mail me directly so I'll be able to answer promptly and don't forget to attach files I asked.

So far I see that Your question is all about how to workaround the situation You're in, however to me it seems that when we'll sort out the issue why You're not getting the intended experience, everything will be solved automagically :)

Revision history for this message
Eduards Bezverhijs (mjasnik) said :
#4

It turned out that Timekpr-nExT client was not started in Deepin, that's why notifications were not shown.
I have fixed a package and now it should start automatically in ever DE.

Revision history for this message
Diego Zamboni (zzamboni) said :
#5

Eduards: thanks for your support on this issue. Now things are working great! Thanks for your work on timekpr.