Subject: Re: [bug#48220] [PATCH] gnu: xfce4-session: Add xset to propagated-inputs.

From: Brendan Tildesley <[email-masked]>
Date: Thu, 6 May 2021 14:13:12 +0200 (CEST)

> On 05/06/2021 2:03 PM Efraim Flashner <[email-masked]> wrote:
> 
>  
> On Thu, May 06, 2021 at 04:38:58AM +0200, Brendan Tildesley wrote:
> > 
> > > On 05/05/2021 3:23 PM Ludovic Courtès <[email-masked]> wrote:
> > > 
> > >  
> > > Hi Brendan,
> > > 
> > > Brendan Tildesley <[email-masked]> skribis:
> > > 
> > > > * gnu/packages/xfce.scm (xfce4-session):[propagated-inputs]: Add xset so
> > > > that xflock4 can turn off the monitor.
> > > 
> > > Can’t we instead patch ‘scripts/xflock4’ so that it refers to ‘xset’ by
> > > its absolute file name?
> > > 
> > 
> > I can. It felt weird just patching one command and not others though.
> > 
> > > However, my understanding is that the xset code is already a fallback:
> > 
> > > 
> > > --8<---------------cut here---------------start------------->8---
> > > # else run another access locking utility, if installed
> > > for lock_cmd in \
> > >   "xlock -mode blank" \
> > >   "slock"
> > >   do
> > >     set -- $lock_cmd
> > >     if command -v -- $1 >/dev/null 2>&1; then
> > >         $lock_cmd >/dev/null 2>&1 &
> > > 	# turn off display backlight:
> > > 	xset dpms force off
> > >         exit
> > >     fi
> > > done
> > > --8<---------------cut here---------------end--------------->8---
[...]
> Are you using %desktop-services in your OS config? By default they come
> with a screen-locker-service for both slock and xlockmore.
> 

Yep, those ones work but they merely produce a black screen with the backlight on,
then the xset command in the above script actually turns off the screen to save power.
if any of xfce4-screensaver, gnome-screensaver, or xscreensaver are available, then it
will use those first.