Questions about light-locker

The environment is a desktop (no lid, no suspend) with multiple monitors. I just want the screen to blank if idle for X-minutes and the monitors to power down after X-minutes. When the mouse is moved I’m positioned on the lightdm gtk+ greeter and the monitors are on. I may or may not be logged in, but there is no activity, and I want the monitors to power down. I’ve removed tlp in the past and power-management.

When I look at light-locker at git, I see build options. I am thinking these are the options that make sense for a desktop:

–with-systemd: This adds the support for systemd logind. This option requires the development files to be installed.

–with-dpms-ext: This adds the support for DPMS. This is used to turn on the display on screen saver deactivation.

Arch compiles with just:

–with-upower: This adds the support for UPower.

But when I execute light-locker-command -l it appears to do what I need, even without those additional options (unless I missed something).

But where does a user set the light-locker options? Looking at the man page, I don’t see any mention of a config file. Do I modify the .desktop file via:

cd ~/.config/autostart
cp -a /etc/xdg/autostart/light-locker.desktop .
# Lock the screen S seconds after the screensaver started. ? = unknown at this time.
sed -i 's/Exec=light-locker/Exec=light-locker --lock-after-screensaver=?/' light-locker.desktop

HHHHmmm, I’m missing something here. Where is the screensaver settings to control the inactive time?

I’ve been googling and reading about loginctl, flock, dm-tool… and all this. Your input and experience is appreciated.

Interesting question.

I have never used automatic locking applications - if I must leave my system on - I lock it using a custom script and i3lock and the keypress sequence CtrlAltDeleteEnter

I have never used screensavers either - they keep the computer active and thus uses more power than fi the screen is just blanked.

The defaults of modern monitors has a default of powering off when idle for longer periods - usually defined in the monitors internal control panel - but they can also be triggered by applications like light-locker

The light locker service seems to need working in conjunction with some kind of screen application which activates on specific events since you can control if before or after certain events and inhibit action or disregard certain events.

Because of your topic I looked at light-locker and your question on setting the options - I think you are on track with the .desktop file - setting options using autostart but since you specifically target XFCE - I was thinking the power management applet would be able to set all this.

Although I assume that XFCE desktop would ensure the xfsettingsd is running - in case you cannot get the components to work may be caused by the xfsettingsd is not running.

all those settings are already in xfce power manager, why use something else?

1 Like