Which desktop enviroment are you running? I beleive both KDE and Gnome have a way built in.
A more generic way (should work for any X windows based system) would be to use xautolock.
running the command when you start your session should do it:
Code:
xautolock -time 60 -locker poweroff
This has all the problems above it is only based on keyboared/mouse activity. So it may cut out if you watching TV or doing somthing that takes more than an hour. Check out the man pages for xautolock for more details. Alternative would be to hibernate or suspend (pm-hibernate or pm-suspend instead of poweroff) it will still break the flow but at least you will be able to resume and not lose work.
You could also just meassage users if this would be an issue, xautolock supports this to.
Code:
xautolock -time 50 -locker "xmessage "system will shutdown in 10 mins unless you do something"" -killtime 10 -killer poweroff
Warning: I can not test this now (I am just reading man pages, so take with a pinch of salt. and please test before actually using it).