Timekpr-NEXT is here
Written for Timekpr-nExT by Eduards Bezverhijs on 2019-04-08
Timekpr-nExT is here. It was a long road for me to get to this point. In this announcement I’ll explain a little how Timekpr-nExT works, what it does and what it does not.
Announcement is somewhat technical, the TL;DR is start it up and use, maybe read how hour intervals work but that’s it :)
-------
How Timekpr-nExT works.
Basically Timekpr-nExT is using login1 (systemd’s login manager) to get information on logged in users and their sessions via D-BUS, in fact everything Timekpr-nExT does to user or it’s sessions is going through login1.
Timekpr-nExT daemon is running in the background and constantly monitoring user sessions, the interval at which it does its thing, is 3 seconds by default. It’s not recommended to change the query interval to less than 3 secs, 3 secs is about to be right.
The time is accounted as a difference between previous check time and the time in moment of current check, it’s accounted in memory and is saved on disk every 30 secs by default, it’s possible to configure the save at different intervals, but default should suffice vast majority of users.
Timekpr-nExT lists all the users that are logged in, then for every user Timekpr-nExT lists all the sessions. If someone wonders what’s the difference, well, user might have more than one session, he can be logged in via graphical interface as well as TTY.
Timekpr-nExT has configuration for users which will be not tracked at all, that means Timekpr-nExT won’t process anything about them. This option was meant to list all users which are not exactly normal users - login managers and the like. Please do not specify Your normal user here, Timekpr-nExT client application won’t receive anything for this user, so it will stay in “unconnected” state forever. If one wants to give user unrestricted time, please don’t limit the user in any way.
Sessions have their types, for instance x11 / wayland / tty / etc., Timekpr-nExT have configuration to specify which of them are actually tracked. By default all graphical sessions are tracked, which means that if user is logged in using GUI, time spent is accounted. TTY sessions are not tracked by default, which means that if user is logged in through console, Timekpr-nExT will not account time spent there. It’s possible to change session types to be tracked and excluded, but please be careful, one has to know exact sessions types to be entered.
After sessions are gathered, Timekpr-nExT will check whether user has allowance to be logged in and how much time he has left. Every option and limit influences how much time user has left, they are all taken into account at the same time.
The day configuration is rather simple, one has to check whether user can use the computer in particular day and what is the time limit for this day.
Hour intervals determine the times user is allowed to log in and use the computer. There can be more than one interval, say from 15:00 – 17:30 and 19:30 – 22:15. Since Timekpr-nExT is not about micromanaging the user, so there can be just one interval that starts or ends in the same hour. Previous examples shows how one can configure the user, this one will show not one can NOT configure it: one can not enter intervals 15:00 – 17:30 and 17:45 – 22:15. This is a design decision. Lets hope it’s fine for most users, if not, please register enhancement request and let’s see how many of You need to micromanage the user :)
One little thing – time is in 24h intervals, AM/PM was not even planned, I hope everyone can live with this :)
Hour intervals basically are meant to limit user not to use computer when they need to be at school or when they have to do homework or something else.
Please note that there is a possibility to allow user to use computer across midnight without being kicked out. The end of the interval should be 24th hour and start interval for the next day must start at 0. I use this on Fridays and Saturdays because next day is not “working” day for my user.
Here’s the example of Friday / Saturday for my user: Friday 13:00 – 24:00, Saturday: 00:00 – 1:00, 13:00 – 24:00 (sometimes my user plays with friends after midnight, however this might not suit every parent).
There are week and month limit as well, they are meant to limit user how much time can be spent per week or month. Combining this with hour intervals one can configure rather flexible time for its users, specify max per day, if needed – it’s absolutely optional, then hour intervals and week or month limit and let user decide how they want to spend the time during the week or month.
-------
When time ends or user is not allowed to log in at particular time of the day, Timekpr-nExT will give a final warning to the user 15 seconds before the forced logout, it will count time from 10 – 0 in real-time and after that user sessions are terminated.
Timekpr-nExT is not using Linux PAM or integration with login managers via config files as it was the case with timekpr and timekpr-revived. This solves frustration about locked accounts and wrong error messages from login managers when account is locked.
Timekpr-nExT changes icon color depending on hard-coded configuration, when there is plenty of time the icon is green, when there is less than half an hour, icon is yellow and when there is not much time left, icon is red. The same applies to the icon of notification, they depend on how much time is left to the user.
Notifications show very precise information about how much time is left, information comes from the Timekpr-nExT server where it’s accounted every 3 seconds.
I tried to program Timekpr-nExT as much user friendly as possible, so there are more warnings and error messages, if they happen. Icon in the systems notification area shows as much as possible for certain DE, for example, Unity shows all the info, KDE5 shows just the icon, it has time left in the tooltip and if You happen to use Gnome Shell, please install “TopIcons” or similar extension to see the icon, if You don’t do this, only notifications will be shown.
-------
Translations from BETA testers are coming in, there will be a small additional releases with new translations.
So please use it, if one finds a bug, please register it, if one finds a useful feature to be implemented, please register the enhancement request, I’ll try to answer it promptly as my time allows me.
-------
Updated .