GNU bug report logs - #52065
[PATCH core-updates-frozen] gnu: gdm: Pass GDK_PIXBUF_MODULE_FILE to sessions.

Previous Next

Package: guix-patches;

Reported by: Josselin Poiret <dev <at> jpoiret.xyz>

Date: Tue, 23 Nov 2021 20:26:02 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 52065 in the body.
You can then email your comments to 52065 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#52065; Package guix-patches. (Tue, 23 Nov 2021 20:26:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Josselin Poiret <dev <at> jpoiret.xyz>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 23 Nov 2021 20:26:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: guix-patches <at> gnu.org
Cc: Josselin Poiret <dev <at> jpoiret.xyz>
Subject: [PATCH core-updates-frozen] gnu: gdm: Pass GDK_PIXBUF_MODULE_FILE to
 sessions.
Date: Tue, 23 Nov 2021 20:25:10 +0000
Hello,

This patch should fix GDM not showing svg icons, most notably the peek
password one on the login prompt.

Best,
Josselin

-- >8 --
* gnu/packages/patches/gdm-pass-gdk-pixbuf-loader-env.patch: Add
patch.
* gnu/local.mk (dist_patch_DATA): List it.
* gnu/packages/gnome.scm (gdm): Use it.
* gnu/services/xorg.scm (gdm-shepherd-service): Pass
GDK_PIXBUF_MODULE_FILE.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/gnome.scm                        |  3 ++-
 .../gdm-pass-gdk-pixbuf-loader-env.patch      | 24 +++++++++++++++++++
 gnu/services/xorg.scm                         |  4 ++++
 4 files changed, 31 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/gdm-pass-gdk-pixbuf-loader-env.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 351c81bb3a..fe86c635c1 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1114,6 +1114,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/gdm-elogind-support.patch		\
   %D%/packages/patches/gdm-remove-hardcoded-xwayland-path.patch	\
   %D%/packages/patches/gdm-wayland-session-wrapper-from-env.patch	\
+  %D%/packages/patches/gdm-pass-gdk-pixbuf-loader-env.patch	\
   %D%/packages/patches/genimage-mke2fs-test.patch		\
   %D%/packages/patches/geoclue-config.patch			\
   %D%/packages/patches/ghc-8.0-fall-back-to-madv_dontneed.patch	\
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 40f49a44db..6d56d04915 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -8367,7 +8367,8 @@ (define-public gdm
                 "gdm-default-session.patch"
                 "gdm-elogind-support.patch"
                 "gdm-remove-hardcoded-xwayland-path.patch"
-                "gdm-wayland-session-wrapper-from-env.patch"))))
+                "gdm-wayland-session-wrapper-from-env.patch"
+                "gdm-pass-gdk-pixbuf-loader-env.patch"))))
     (build-system meson-build-system)
     (arguments
      `(#:glib-or-gtk? #t
diff --git a/gnu/packages/patches/gdm-pass-gdk-pixbuf-loader-env.patch b/gnu/packages/patches/gdm-pass-gdk-pixbuf-loader-env.patch
new file mode 100644
index 0000000000..4341e3fc30
--- /dev/null
+++ b/gnu/packages/patches/gdm-pass-gdk-pixbuf-loader-env.patch
@@ -0,0 +1,24 @@
+From 444250fce55f916af993bc855930c6809686e4bd Mon Sep 17 00:00:00 2001
+From: Josselin Poiret <dev <at> jpoiret.xyz>
+Date: Tue, 23 Nov 2021 18:39:39 +0000
+Subject: [PATCH] Make GDM pass GDK_PIXBUF_MODULE_FILE to sessions
+
+---
+ daemon/gdm-launch-environment.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/daemon/gdm-launch-environment.c b/daemon/gdm-launch-environment.c
+index 14ecfac2..3e618321 100644
+--- a/daemon/gdm-launch-environment.c
++++ b/daemon/gdm-launch-environment.c
+@@ -158,6 +158,7 @@ build_launch_environment (GdmLaunchEnvironment *launch_environment,
+                 "WINDOWPATH",
+                 "XCURSOR_PATH",
+                 "XDG_CONFIG_DIRS",
++                "GDK_PIXBUF_MODULE_FILE",
+                 NULL
+         };
+         char *system_data_dirs;
+-- 
+2.33.1
+
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 0735d777bd..3abee8694a 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -1004,6 +1004,10 @@ (define (gdm-shepherd-service config)
                            ;; cursors.  gdm doesn't login so doesn't source
                            ;; the corresponding line in /etc/profile.
                            "XCURSOR_PATH=/run/current-system/profile/share/icons"
+                           (string-append
+                            "GDK_PIXBUF_MODULE_FILE="
+                            #$gnome-shell
+                            "/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache")
                            (string-append
                             "GDM_WAYLAND_SESSION="
                             #$(gdm-configuration-wayland-session config))))))
-- 
2.33.1





Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Wed, 24 Nov 2021 06:07:01 GMT) Full text and rfc822 format available.

Notification sent to Josselin Poiret <dev <at> jpoiret.xyz>:
bug acknowledged by developer. (Wed, 24 Nov 2021 06:07:02 GMT) Full text and rfc822 format available.

Message #10 received at 52065-done <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Josselin Poiret <dev <at> jpoiret.xyz>
Cc: 52065-done <at> debbugs.gnu.org
Subject: Re: bug#52065: [PATCH core-updates-frozen] gnu: gdm: Pass
 GDK_PIXBUF_MODULE_FILE to sessions.
Date: Wed, 24 Nov 2021 01:06:28 -0500
Hello Josselin,

Josselin Poiret <dev <at> jpoiret.xyz> writes:

> Hello,
>
> This patch should fix GDM not showing svg icons, most notably the peek
> password one on the login prompt.
>
> Best,
> Josselin
>
> -- >8 --
> * gnu/packages/patches/gdm-pass-gdk-pixbuf-loader-env.patch: Add
> patch.
> * gnu/local.mk (dist_patch_DATA): List it.
> * gnu/packages/gnome.scm (gdm): Use it.
> * gnu/services/xorg.scm (gdm-shepherd-service): Pass
> GDK_PIXBUF_MODULE_FILE.

Thank you so much for tackling this!

[...]

> diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
> index 0735d777bd..3abee8694a 100644
> --- a/gnu/services/xorg.scm
> +++ b/gnu/services/xorg.scm
> @@ -1004,6 +1004,10 @@ (define (gdm-shepherd-service config)
>                             ;; cursors.  gdm doesn't login so doesn't source
>                             ;; the corresponding line in /etc/profile.
>                             "XCURSOR_PATH=/run/current-system/profile/share/icons"
> +                           (string-append
> +                            "GDK_PIXBUF_MODULE_FILE="
> +                            #$gnome-shell
> +                            "/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache")
>                             (string-append
>                              "GDM_WAYLAND_SESSION="
>                              #$(gdm-configuration-wayland-session config))))))

I've modified the above slightly like so:

--8<---------------cut here---------------start------------->8---
@@ -49,6 +49,7 @@ (define-module (gnu services xorg)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages bash)
   #:use-module (gnu system shadow)
+  #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system trivial)
   #:use-module (guix gexp)
   #:use-module (guix store)
@@ -1004,6 +1005,9 @@ (define (gdm-shepherd-service config)
                            ;; cursors.  gdm doesn't login so doesn't source
                            ;; the corresponding line in /etc/profile.
                            "XCURSOR_PATH=/run/current-system/profile/share/icons"
+                           (string-append
+                            "GDK_PIXBUF_MODULE_FILE="
+                            #$gnome-shell "/" #$%gdk-pixbuf-loaders-cache-file)
                            (string-append
                             "GDM_WAYLAND_SESSION="
                             #$(gdm-configuration-wayland-session config))))))
--8<---------------cut here---------------end--------------->8---

To avoid hard coding the path.

I tested it in a VM with

--8<---------------cut here---------------start------------->8---
./pre-inst-env guix system vm gnu/system/examples/desktop.tmpl
--8<---------------cut here---------------end--------------->8---

It all looked good, so I push as commit
c3fd310d8f9ab0b5ae0b23bf6a6c67e5e25cc135.

Thank you!

Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 22 Dec 2021 12:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 87 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.