Mike, you already guessed how to make it impervious to user modification, make it owned by root. That's not 100% foolproof either, but close. The files can just be created, they're never there by default (and on the two distros in particular that *did* provide them default, they still *should* not have been there).
Bigger problem I realized with my own solution: the user *can't* logout before 30 min are up! Or, more precisely the sleep(1) will keep running after the X session has apparently ended - they'll probably get the blank grey X background with no clients, until the 30min is up.
No, there's an elegant solution to this problem I just don't know what it is yet. -Adam
No, there's an elegant solution to this problem I just don't know what it is yet. -Adam
How about [up to] 45 Neoware thin-client machines you could run off an Ubuntu server? Would that be another way to solve your problem? (Er... is there any way I could wrangle a tax receipt out of this if I donate some hardware?)
-Adam
Adam Thompson wrote:
No, there's an elegant solution to this problem I just don't know what it is yet. -Adam
If a shell script (or Peters idea of a Python script) can be executed at run time as root (no sudo required) a number of init scripts can be run at that time. The first one can run a notify after 25 minutes. The second could shut down after 30. A third could clean out the users home directory. Maybe in reverse order...
How about [up to] 45 Neoware thin-client machines you could run off an Ubuntu server?
Wishful thinking on the part of the guys in the lab. Myself included. Then we could also use a thin client server and get rid of XP (directly) from the class rooms.
Would that be another way to solve your problem?
Maybe. I'll have to think about it. We'd have to increase the number of public access machines to a number greater than two though... That means another room and a supervisor.
(Er... is there any way I could wrangle a tax receipt out of this if I donate some hardware?)
I don't know. I'll have to ask. Best answer I can give you now is probably not but the possibility is there. Roy should be at tonights meeting. He is one of three people who would know. He talks with Alvin (the guy in charge) every couple of days. The CLL may run the public access program but they aren't the ones in charge of it. One layer on top of another and all that...
-Adam
Later Mike
On 12/07/2009 10:50 PM, Adam Thompson wrote:
No, there's an elegant solution to this problem I just don't know what it is yet.
Seems like, instead of execing gnome-session in .xinitrc, it could exec something else, perhaps a python script, that spins off a thread which forks and execs gnome-session, and uses another thread to track the time, killing the child thread if necessary after 30 minutes and exiting. Said script could also use libnotify to popup warnings if necessary.
Peter