Is it possible to set up lightdm to hibernate after, for example, 5 minutes without human activity? Only in LightDM without this behaviour after login? I whant to be able just logout to lightdm by pressing Ctrl+Alt+Del and it would hibernate after timeout automatically instead of power off or hibernate my computer.
You could do this, but it won't be simple. First you can setup a script that runs when lightdm starts the display. Since it restarts the display when you logout, you'd write a small script that has a 5 minute timer in it that hibernates after a 5 minute delay. You'd set lightdm.conf to run this script by editing the config file like so:
You could then have a second script that lightdm runs when starting a user session that would cancel the timer. You set that in lightdm.conf as follows:
As for the contents of those scripts, they could be simple. hibernate_delay.sh would be something like this, although you'd need to do the parts after the "touch" line in a second script that ran in the background:
The cancel_hibernate.sh script would simply remove the hibernate_timer file so that it doesn't hibernate:
Now the theory here in my answer is sound, but I've not tried those scripts and like I mention above, the hibernate_delay.sh script needs to fork off a second script so that the sleep doesn't block. I'm sure there's also a better way to do this (using the command at is worth a look), but the hook-up points to lightdm would be the same.