> Session managers already do something similar for screen savers (though
> that's in user's session scope, not global). Also desktop environment
> developers have introduced lots of new odd daemons recently, I'm surprised
> they haven't came up with a suspend policy framework yet.
The inhibit api of gnome-session lets you do just that: