[PATCH] gnu: xfce4-session: Add xset to propagated-inputs.

DoneSubmitted by Brendan Tildesley.
Details
3 participants
  • Efraim Flashner
  • Ludovic Courtès
  • Brendan Tildesley
Owner
unassigned
Severity
normal
B
B
Brendan Tildesley wrote on 4 May 11:20 +0200
(address . guix-patches@gnu.org)
20210504092051.24383-1-mail@brendan.scot
* gnu/packages/xfce.scm (xfce4-session):[propagated-inputs]: Add xset sothat xflock4 can turn off the monitor.--- gnu/packages/xfce.scm | 2 ++ 1 file changed, 2 insertions(+)
Toggle diff (15 lines)diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scmindex 9655d8ccf7..f1e40a94b8 100644--- a/gnu/packages/xfce.scm+++ b/gnu/packages/xfce.scm@@ -718,6 +718,8 @@ your system in categories, so you can quickly find and launch them.") ("libsm" ,libsm) ("libwnck" ,libwnck) ("libxfce4ui" ,libxfce4ui)))+ (propagated-inputs+ `(("xset" ,xset))) (home-page "https://www.xfce.org/") (synopsis "Xfce session manager") (description-- 2.31.1
L
L
Ludovic Courtès wrote on 5 May 15:23 +0200
(name . Brendan Tildesley)(address . mail@brendan.scot)(address . 48220@debbugs.gnu.org)
87v97xjoux.fsf@gnu.org
Hi Brendan,
Brendan Tildesley <mail@brendan.scot> skribis:
Toggle quote (3 lines)> * 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’ byits absolute file name?
However, my understanding is that the xset code is already a fallback:
Toggle snippet (15 lines)# else run another access locking utility, if installedfor 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 fidone
Probably we should ensure the first ‘for’ loop works as expected.Perhaps we need to replace ‘xfce4-screensaver-command’ by its absolutefile name there.
WDYT?
Thanks,Ludo’.
B
B
Brendan Tildesley wrote on 6 May 04:38 +0200
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 48220@debbugs.gnu.org)
615974577.179836.1620268738791@office.mailbox.org
Toggle quote (14 lines)> On 05/05/2021 3:23 PM Ludovic Courtès <ludo@gnu.org> wrote:> > > Hi Brendan,> > Brendan Tildesley <mail@brendan.scot> 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.
Toggle quote (24 lines)> 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---> > Probably we should ensure the first ‘for’ loop works as expected.> Perhaps we need to replace ‘xfce4-screensaver-command’ by its absolute> file name there.>
Currently xfce4-screensaver is not installed in the xfce package at all by default,so it isn't used. I could add it, but for me it was glitchy/flickering and I would keep clearing the password as I was entering it so I couldn't log back in. It even does itin a VM. I do have a recent amd graphics card with proprietary linux though, my computercan't boot otherwise :(.
If you run guix environment --ad-hoc xfce4-screensaverthen xfce4-screensaver &; xfce4-screensaver-command --lockdoes it work for you?
I'm not sure what is best, should we be maximal and include xfce4-screensaver in the xfcepackage, or be minimal and make people have to install it manually?
Toggle quote (4 lines)> WDYT?> > Thanks,> Ludo’.
From e1e968f21374b2c125d1fc1348a531f16fac6b4d Mon Sep 17 00:00:00 2001From: Brendan Tildesley <mail@brendan.scot>Date: Tue, 27 Apr 2021 15:34:50 +1000Subject: [PATCH] gnu: xfce4-session: Add xset to propagated-inputs.
* gnu/packages/xfce.scm (xfce4-session):[propagated-inputs]: Add xset sothat xflock4 can turn off the monitor.--- gnu/packages/xfce.scm | 2 ++ 1 file changed, 2 insertions(+)
Toggle diff (15 lines)diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scmindex 9655d8ccf7..f1e40a94b8 100644--- a/gnu/packages/xfce.scm+++ b/gnu/packages/xfce.scm@@ -718,6 +718,8 @@ your system in categories, so you can quickly find and launch them.") ("libsm" ,libsm) ("libwnck" ,libwnck) ("libxfce4ui" ,libxfce4ui)))+ (propagated-inputs+ `(("xset" ,xset))) (home-page "https://www.xfce.org/") (synopsis "Xfce session manager") (description-- 2.31.1
From ed66cf50a3b9294effc8bbae04b0f2564bd55c10 Mon Sep 17 00:00:00 2001From: Brendan Tildesley <mail@brendan.scot>Date: Thu, 6 May 2021 12:34:55 +1000Subject: [PATCH] gnu: xfce4-session: Allow xflock4 to use xset.
* gnu/packages/xfce.scm (xfce4-session):[inputs]: Add xset.[arguments]: Add a phase to use exact store path to xset in xflock4.--- gnu/packages/xfce.scm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
Toggle diff (31 lines)diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scmindex 8aa2770ee8..164631cf4d 100644--- a/gnu/packages/xfce.scm+++ b/gnu/packages/xfce.scm@@ -707,7 +707,13 @@ your system in categories, so you can quickly find and launch them.") (list (string-append "--with-xsession-prefix=" %output)) ;; Disable icon cache update. #:make-flags- '("gtk_update_icon_cache=true")))+ '("gtk_update_icon_cache=true")+ #:phases+ (modify-phases %standard-phases+ (add-after 'unpack 'patch-xflock+ (lambda _+ (substitute* "scripts/xflock4"+ (("xset") (which "xset")))))))) (native-inputs `(("pkg-config" ,pkg-config) ("intltool" ,intltool)))@@ -717,7 +723,8 @@ your system in categories, so you can quickly find and launch them.") ("polkit" ,polkit) ("libsm" ,libsm) ("libwnck" ,libwnck)- ("libxfce4ui" ,libxfce4ui)))+ ("libxfce4ui" ,libxfce4ui)+ ("xset" ,xset))) (home-page "https://www.xfce.org/") (synopsis "Xfce session manager") (description-- 2.31.1
E
E
Efraim Flashner wrote on 6 May 14:03 +0200
Re: [bug#48220] [PATCH] gnu: xfce4-session: Add xset to propagated-inputs.
(name . Brendan Tildesley)(address . mail@brendan.scot)
YJPa+nUbNcv9VM72@3900XT
On Thu, May 06, 2021 at 04:38:58AM +0200, Brendan Tildesley wrote:
Toggle quote (59 lines)> > > On 05/05/2021 3:23 PM Ludovic Courtès <ludo@gnu.org> wrote:> > > > > > Hi Brendan,> > > > Brendan Tildesley <mail@brendan.scot> 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---> > > > Probably we should ensure the first ‘for’ loop works as expected.> > Perhaps we need to replace ‘xfce4-screensaver-command’ by its absolute> > file name there.> > > > Currently xfce4-screensaver is not installed in the xfce package at all by default,> so it isn't used. I could add it, but for me it was glitchy/flickering and I would keep > clearing the password as I was entering it so I couldn't log back in. It even does it> in a VM. I do have a recent amd graphics card with proprietary linux though, my computer> can't boot otherwise :(.> > If you run guix environment --ad-hoc xfce4-screensaver> then> xfce4-screensaver &; xfce4-screensaver-command --lock> does it work for you?> > I'm not sure what is best, should we be maximal and include xfce4-screensaver in the xfce> package, or be minimal and make people have to install it manually?> > WDYT?> > > > Thanks,> > Ludo’.
Are you using %desktop-services in your OS config? By default they comewith a screen-locker-service for both slock and xlockmore.
-- Efraim Flashner <efraim@flashner.co.il> אפרים פלשנרGPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmCT2vcACgkQQarn3Mo9g1G0MA//fDullq0+dDvHEEfueeo3oZyxdnRNPmEwBk80d9L4+2bfY6wX45hmr8mJ21+rjqdxGF/x6wzig2g4jBg2uSxNq8Nh/gvTHt0XbfIBdO9LSyc0WJqyJQf/dMkuTaU5/s0sqD6izRmUFOH76Qp0PgWOm7vM/AE1FkF+R79Bg6mrW7mVFmffqS8yCVNvChMbuQSYs6bFadCMhHkyrAQs1zqgI7FHxgkqSZU3Ib0Cw20b9L+IWrPg+hCuXBup8RNedFl1cTxgIO0EtaShKf58rNWBC61vmXtjhBaG+g2N2p1y2t/8aP7hUYujmaZ/Jc+FtbE8HDXvptvbAvMraMTi7q2DppXnluIqgZAvOD7dT7jVRJgtCQdLlTGzI4NUvg4YRW5hIkWPEWK783xYVYMpxRSwcXWRQha21oFRw1pU+uhwGcxzipLumX2jVJvWv3kyPk8DGxjY57+LDA2KMjOeMmvkJSZNQvlGiU1LXUu7WMEyuoKemtYytN0H0rucpLHOAoT/BXOeCZFilpj4ciDEshkQyHjgJqJYc9lm3Ko29PV05/Zj8d7VwGGl7PtGnTrawiD0kEKrPrda7pI0u6PLbYrUTuiI4H6cOZiwyR14rAUIDeuqgKYEJ6AddZxjFuBools/ytRe4KebmCSo9sg45zpuTCTp8u4Eies2Uag9x5G/4uc==/BB+-----END PGP SIGNATURE-----

B
B
Brendan Tildesley wrote on 6 May 14:13 +0200
(name . Efraim Flashner)(address . efraim@flashner.co.il)
658388374.187505.1620303193042@office.mailbox.org
Toggle quote (39 lines)> On 05/06/2021 2:03 PM Efraim Flashner <efraim@flashner.co.il> wrote:> > > On Thu, May 06, 2021 at 04:38:58AM +0200, Brendan Tildesley wrote:> > > > > On 05/05/2021 3:23 PM Ludovic Courtès <ludo@gnu.org> wrote:> > > > > > > > > Hi Brendan,> > > > > > Brendan Tildesley <mail@brendan.scot> 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---
[...]
Toggle quote (4 lines)> 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 itwill use those first.
L
L
Ludovic Courtès wrote 5 days ago
Re: bug#48220: [PATCH] gnu: xfce4-session: Add xset to propagated-inputs.
(name . Brendan Tildesley)(address . mail@brendan.scot)(address . 48220-done@debbugs.gnu.org)
87zgx58qxy.fsf@gnu.org
Hi!
Brendan Tildesley <mail@brendan.scot> skribis:
[...]
Toggle quote (30 lines)>> 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--->> >> Probably we should ensure the first ‘for’ loop works as expected.>> Perhaps we need to replace ‘xfce4-screensaver-command’ by its absolute>> file name there.>> >> Currently xfce4-screensaver is not installed in the xfce package at all by default,> so it isn't used. I could add it, but for me it was glitchy/flickering and I would keep > clearing the password as I was entering it so I couldn't log back in. It even does it> in a VM. I do have a recent amd graphics card with proprietary linux though, my computer> can't boot otherwise :(.
Hmm OK. We should address this in a separate issue.
Toggle quote (5 lines)> If you run guix environment --ad-hoc xfce4-screensaver> then> xfce4-screensaver &; xfce4-screensaver-command --lock> does it work for you?
I get:
Toggle snippet (5 lines)$ xfce4-screensaver & xfce4-screensaver-command --lock[1] 19108** Message: 12:20:44.361: Screensaver is not running! Start xfce4-screensaver first
… but I’m not running Xfce. I should prolly try in a VM.
Toggle quote (3 lines)> I'm not sure what is best, should we be maximal and include xfce4-screensaver in the xfce> package, or be minimal and make people have to install it manually?
I’d lean towards including xfce4-screensaver, since that’s the intendeduse of Xfce, but only once it actually works.
Toggle quote (9 lines)> From ed66cf50a3b9294effc8bbae04b0f2564bd55c10 Mon Sep 17 00:00:00 2001> From: Brendan Tildesley <mail@brendan.scot>> Date: Thu, 6 May 2021 12:34:55 +1000> Subject: [PATCH] gnu: xfce4-session: Allow xflock4 to use xset.>> * gnu/packages/xfce.scm (xfce4-session):> [inputs]: Add xset.> [arguments]: Add a phase to use exact store path to xset in xflock4.
[...]
Toggle quote (5 lines)> + (add-after 'unpack 'patch-xflock> + (lambda _> + (substitute* "scripts/xflock4"> + (("xset") (which "xset"))))))))
Applied after changing ‘which’ to refer to the “xset” input so that itworks correctly when cross-compiling.
Closing, and let’s discuss xfce4-screensaver separately!
Thanks,Ludo’.
Closed
?