You are not logged in.

#1 2008-05-05 18:34:14

detox332
Member
From: University of Pittsburgh
Registered: 2007-06-12
Posts: 63

timed logout

I have a computer set up to run linux in my classroom.  I would like to have it so that when the student logs in they have 20 minutes to use the computer.  After the time is up the computer automatically logs out.  I only have one user set up, only I know the password, so I would need something that would work each time you logged in rather than limiting the user to 20 mins in a 24 hour time span.  I know my way around the computer I just lack in the programming part so if anyone could get that part out of the way I could get the rest taken care of.

Thanks for any suggestions/help,
Matt


Arch64
KDE4 user

Offline

#2 2008-05-05 18:46:33

bavardage
Member
Registered: 2008-02-17
Posts: 160

Re: timed logout

Could you just set something like the following to run on login.
I don't know what WM you are using, but e.g. for openbox I would do something like the following

logoutstudent.sh

#!/bin/sh
sleep 1200
logout

and stick
logoutstudent.sh & in .config/openbox/autostart.sh
or replace logout with whatever command is appropriate for your DE/WM.

Offline

#3 2008-05-05 22:48:33

detox332
Member
From: University of Pittsburgh
Registered: 2007-06-12
Posts: 63

Re: timed logout

its edubuntu so its running gnome (no internet hookup else i would install kde on it), i run kdemod at home so i dont have much experience with gnome.

is there a login script that gdm runs at login that i could edit to include that?

or perhaps set a cron job at login, would that work?


Arch64
KDE4 user

Offline

Board footer

Powered by FluxBB