There is a setting under Security & Privacy -> Advanced, to "Log out after X minutes of inactivity". However, this is a system wide setting. I just want to have my kids account log out after a period of inactivity, but leave my account logged in. Is that possible?
The MacEnterprise list has discussed this topic recently, Forcing Log-Off For Idle Users.
John NcNair suggested the following
defaults write /Library/Preferences/.GlobalPreferences com.apple.autologout.AutoLogOutDelay -int 900 defaults write /Library/Preferences/.GlobalPreferences com.apple.securitypref.logoutvalue -int 900
Bruce Carter mentioned...
Note that nothing using Apple's internal mechanism for this will work if the user has unsaved files open. It will simply stop at the dialog box and time out.
See the related question How can I automatically log out the guest account after a period of inactivity? for other approaches and tools.