unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Brendan Tildesley <mail@brendan.scot>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 48220@debbugs.gnu.org
Subject: [bug#48220] [PATCH] gnu: xfce4-session: Add xset to propagated-inputs.
Date: Thu, 6 May 2021 04:38:58 +0200 (CEST)	[thread overview]
Message-ID: <615974577.179836.1620268738791@office.mailbox.org> (raw)
In-Reply-To: <87v97xjoux.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1913 bytes --]


> 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’.

[-- Attachment #2: 0001-gnu-xfce4-session-Add-xset-to-propagated-inputs.patch --]
[-- Type: text/x-patch, Size: 893 bytes --]

From e1e968f21374b2c125d1fc1348a531f16fac6b4d Mon Sep 17 00:00:00 2001
From: Brendan Tildesley <mail@brendan.scot>
Date: Tue, 27 Apr 2021 15:34:50 +1000
Subject: [PATCH] gnu: xfce4-session: Add xset to propagated-inputs.

* gnu/packages/xfce.scm (xfce4-session):[propagated-inputs]: Add xset so
that xflock4 can turn off the monitor.
---
 gnu/packages/xfce.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scm
index 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


[-- Attachment #3: 0001-gnu-xfce4-session-Allow-xflock4-to-use-xset.patch --]
[-- Type: text/x-patch, Size: 1570 bytes --]

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.
---
 gnu/packages/xfce.scm | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scm
index 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


  reply	other threads:[~2021-05-06  2:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-04  9:20 [bug#48220] [PATCH] gnu: xfce4-session: Add xset to propagated-inputs Brendan Tildesley
2021-05-05 13:23 ` Ludovic Courtès
2021-05-06  2:38   ` Brendan Tildesley [this message]
2021-05-06 12:03     ` Efraim Flashner
2021-05-06 12:13       ` Brendan Tildesley
2021-05-08 10:23     ` bug#48220: " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=615974577.179836.1620268738791@office.mailbox.org \
    --to=mail@brendan.scot \
    --cc=48220@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).