Curfew Enforcement: An (apparently) unwritten program

Over the past several years, I’ve discovered that I work best when I rise early in the morning after a full night’s sleep, but that, left to myself, I tend to “work” long into the night (usually without getting much done). So getting to bed at a reasonable hour takes a large amount of willpower, at a time when my supply of willpower is most depleted. You can imagine the problems this combination causes.

A couple of years ago, I had the strange problem that my laptop’s connection to the local wireless network would (more or less reliably) disconnect at about ten o’clock each evening and refuse to reconnect until about nine the following morning. This grew annoying, but until I discovered and worked around the cause (and then bought a new laptop), I was (for me) tremendously productive—if not quite as productive as I was back before I had a regular Internet connection.

And many years ago, back when I was first starting to use Linux, I remember seeing a program that claimed to force a user to take regular breaks (to prevent repetitive strain injuries) by locking the console, then temporarily changing his password to a random new one, and only reverting that when the mandatory break was over.

As I was hoping to make keeping a better schedule a goal for this new year, I hoped to adapt that break-reminder program to enforce a curfew on myself, while not damaging any background tasks I might want to leave running—but then I couldn’t find it, and the program I thought it was didn’t use such harsh measures.

So: Here’s a program that should exist, but apparently doesn’t yet: a curfew enforcer. It would lock all of a user’s sessions (and the console entirely if the user is logged in at a virtual terminal) at a specified time, then save the user’s password (hash) and change it to a new, random password until a specified duration has elapsed. (For safety reasons, I’d want it to restore the user’s password on the next boot even if the specified time hasn’t finished.) It should run on modern Linux systems (of course), but a cross-platform application would be still better.

Do you know of such a program? Or do you have any ideas for how I might go about writing one?

Advertisements

One thought on “Curfew Enforcement: An (apparently) unwritten program

  1. Very interesting. I find that will-power and discipline works very well for me. It does not take much to turn the monitor off and walk away from the computer. Try it!

    Thanks for sharing. God bless.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s