Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Your query piqued my interest even though I no longer require such a script or software - about 15 years ago I found a wonderful windows program that allowed me to set time controls for my kids, but its name escapes me....
However, I found these links which may help you, or point you in the right direction, or provide you with keywords for further searching:
No idea whether such a software exists on Linux, bu I know such a one exists on Windows. I have eye problems but keep on working, so my manager keeps me advicing on getting such a software and seting a 2-hour timeout or so, after which it can not be unlocked. I have been avoiding the suggestion so far, but maybe it is time for me to get to it. If I do find such a software (from my manager or whosoever), I shall try to see whether there is a Linux version of it and let know if the answer I find is positive.
__________________________ Far Infrared Sauna
Well, a lowball way to do it would be to write a simple AT job, to be run whenever one of the kids logs in, to shut the box down after a preset time.
Shove something in the default system profile (usually /etc/profile), to check on who is running it. If it's one of the kids, shove an AT job out there to perform a "shutdown -t 120", which will give them two minutes warning, before powering off. The man page for AT will give you syntax, but it's fairly simple. Something like:
if [ $(whoami) = "kid1" ]
at now+2hour -f <filename where the shutdown command/script is>
in your /etc/profile. When anyone logs in, it'll look at the user ID. If it matches, it'll give them two hours of time, then run the shutdown script. Edit as needed, of course, to add more users/commands/etc....