You are not logged in.
Pages: 1
Hi,
How can I configure a session to shutdown completely after a period inactivity? System Sleep Mode seems close to what I need - but it only supports Suspend and Hibernate, not shutdown. (well on my computer anyway).
Thanks!
Offline
What distro?
I wouldn't know how to do it from within Xfce's GUI, but this 2014 Ask Ubuntu thread mentions some options, using xscreensaver, xprintidle, or custom scripts.
PS: Ah, I just found Autopoweroff! Seems to be what you're looking for: https://github.com/deragon/autopoweroff
Autopoweroff is a daemon that is started at boot time, and which function is to run a command at a specific time, but only if some conditions are met. Originally, this application would only shutdown the computer, thus its name, but now it can suspend, hibernate, or run any custom command provided by the user.
This software is meant for the Linux operating system only. It should work on any modern Linux distribution. Deb and RPM packages are available.
The computer will execute the command (suspend by default) if all the above conditions are met:
Any hosts that the computer is dependent on is not answering ping anymore.
No keyboard or mouse activity has been detected on the computer for a while.
The user has not disabled Autopoweroff.
Welcome to the forum!
Offline
I'm using XUbuntu (18.04)
Thanks for the autopoweroff suggestion - it's a pretty good one! However there are a couple of (minor) issues. Firstly it uses 'gksu' which is deprecated. Secondly it powers off after a period of no user input (rather than following the xfce rules) which means that it will kick in even if you are watching a video (and conversely if a child / cat hammers on the lock screen it won't kick in).
I'll try the xscreensaver idea next, that has potential - though xscreensaver is pretty out of date these days too.
I noticed however that the KDE equivalent of xfce4-power-manager does support shutdown. Does anyone know if it's possible to add this as an option to the xfce version?
Last edited by Gaff (2018-06-05 08:53:33)
Offline
I've dug into this waaay too much now. Here's what I found:
* xfce4-power-manager has an internal eggtimer that uses the Xwindows IDLETIME counter to determine if it needs to take an action.
* With a little work the app could be extended to include options for power down on idle. Though I'm not sure I'm up for it right now.
* With systemd the app emits d-bus signals to hibernate / shutdown - which I guess other apps could listen for.
* The power app will also lock the screen via d-bus or via a script depending on the system - again I guess one could listen for this.
All that is rather complicated. The simple options are:
* xscreensaver should work, but it's pretty end-of-life. Nobody uses screensavers anymore.
* xautolock / xidle are simple tools that run a command after an idle timeout - and thus is a neat solution to the problem even if it's duplicating the work that xfce4-power-manager does.
Last edited by Gaff (2018-06-06 08:22:21)
Offline
* With a little work the app could be extended to include options for power down on idle. Though I'm not sure I'm up for it right now.
Thanks for the info. I passed by How does ubuntu determine inactivity before suspending? but the eggtime function was new to me, nice find!
I think there's a bit of a disconnect between the forum and the Xfce devs, but I'm sure that now that you have it straight, this merits a direct question in the mailing list or a feature request in Bugzilla.
If you make any of the solutions work, please tell us!
Offline
Pages: 1
[ Generated in 0.010 seconds, 8 queries executed - Memory usage: 534.84 KiB (Peak: 535.68 KiB) ]