[RndTbl] Public access machine

Glen Ditchfield GJDitchfield at acm.org
Tue Dec 8 20:45:06 CST 2009


On December 7, 2009 08:45:40 pm Glen Ditchfield wrote:
> Does this system have a login dialog?  Perhaps you could put a command in
>  the XDM or KDM Xstartup file to kill the session after 30 minutes. 
>  "shutdown r +30" would do, but killing all of the guest user ID's
>  processes ought to be enough.

On December 7, 2009 09:06:19 pm Adam Thompson wrote:
> Actually... That's an excellent suggestion.
> Except: the last command in a .xinitrc or .xsession file must stay
>  runningfor the duration of the X session.  Normally, that command is
>  "kdeinit" or "gnome-session", or historically, the window manager
>  executable i.e. "mwm" or "twm" or whatever.

I wasn't thinking of changing .xinitrc.  I was thinking of 
/etc/kde4/kdm/Xstartup and /etc/X11/xdm/Xstartup, which "man xdm" says run as 
root before the user logs in.  If you wanted to run "shutdown" from there, you 
wouldn't have to play any sudo games.

The next trick is to cancel the shutdown if the user logs out, which might 
take some work in the Xreset file.  Xstartup could create a flag file somewhere, 
and launch a killer script.  Xreset would remove the flag file.  The killer 
would check for the flag before killing anything.  If your window manager lets  
users start parallel sessions, the scripts will have to be more clever.

You'll want to wipe the home directory, too, and put in a few minutes of sleep 
to encourage the current user to move on.   


More information about the Roundtable mailing list