GNU bug report logs - #78537
GIMP startup crash on minimal xorg/wm unless gtk+ in profile

Previous Next

Package: guix;

Reported by: Runciter <runciter <at> whispers-vpn.org>

Date: Wed, 21 May 2025 15:36:03 UTC

Severity: normal

Merged with 78667

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 78537 in the body.
You can then email your comments to 78537 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 bug-guix <at> gnu.org:
bug#78537; Package guix. (Wed, 21 May 2025 15:36:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Runciter <runciter <at> whispers-vpn.org>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Wed, 21 May 2025 15:36:04 GMT) Full text and rfc822 format available.

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

From: Runciter <runciter <at> whispers-vpn.org>
To: bug-guix <at> gnu.org
Subject: GIMP startup crash on minimal xorg/wm unless gtk+ in profile
Date: Wed, 21 May 2025 15:34:39 +0000
Hello Guix,

I've noticed that the new Gimp version 3.0.0 crashed on startup for me.
The error message is:

(gimp:5025): GLib-GIO-ERROR **: 22:39:28.588: Settings schema 'org.gtk.Settings.FileChooser' is not installed
/gnu/store/vk8xddd7cr2dcsqjwvvyrhidg1brdsaq-gimp-3.0.0/lib/gimp/3.0/plug-ins/script-fu/script-fu: fatal error: GIMP crashed
Trace/breakpoint trap

Or a variant thereof.

This probably happens because my GUI is a relatively minimal Xorg + dwm.
If I install the package gtk+ onto my home profile, then Gimp 3.0.0
starts, and its file chooser apparently works.

Anyway, I don't want to have dbus in my profile anymore, and although
I've seen on the news that Gimp is now a full-blown Gtk app, it *still*
does not seem to want to play completely nice with my window
manager. Well, that is to say, its main window doesn't tile. So, I put
my foot down, no Gimp for Runciter in the near future.

Still, it occurs to me that gtk+ should probably be a propagated
input of gimp-3. Some Package(s) which probably have a similar run-time
dependency situation seem to proceed like this; such as zathura having a
propagated input to girara having a propagated input to gtk+.

I'm going to submit a patch, in case it is helpful.

Regards,
Runciter





Information forwarded to bug-guix <at> gnu.org:
bug#78537; Package guix. (Wed, 21 May 2025 15:59:01 GMT) Full text and rfc822 format available.

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

From: Runciter <runciter <at> whispers-vpn.org>
To: 78537 <at> debbugs.gnu.org
Cc: Runciter <runciter <at> whispers-vpn.org>
Subject: [PATCH v1] gnu: gimp-3: make gtk+ a propagated input.
Date: Wed, 21 May 2025 15:57:37 +0000
*  gnu/packages/gimp.scm (gimp-3) [inputs]: Remove gtk+.
   [propagated-inputs]: Add gtk+.

Signed-off-by: Runciter <runciter <at> whispers-vpn.org>
---
 gnu/packages/gimp.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/gimp.scm b/gnu/packages/gimp.scm
index 08f71b9b1f..d059b2ac86 100644
--- a/gnu/packages/gimp.scm
+++ b/gnu/packages/gimp.scm
@@ -471,14 +471,15 @@ (define-public gimp-3
                                 (lambda (_ stat)
                                   (eq? 'regular (stat:type stat))))))))))
     (inputs (modify-inputs (package-inputs gimp-2)
-              (replace "gtk+" gtk+)
+              (delete "gtk+")
               (prepend libxmu libxt)
               (prepend python python-pygobject gjs)
               (prepend libxslt)))
     (native-inputs (modify-inputs (package-native-inputs gimp-2)
                      (prepend appstream-glib
                               gi-docgen
-                              libarchive)))))
+                              libarchive)))
+    (propagated-inputs (list gtk+))))
 
 (define-public gimp gimp-3)
 (define-public gimp-next

base-commit: 646fef769d995122cca8f2aa2c82fa4cd32fb609
-- 
2.49.0






Information forwarded to bug-guix <at> gnu.org:
bug#78537; Package guix. (Tue, 03 Jun 2025 10:56:06 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Runciter via Bug reports for GNU Guix <bug-guix <at> gnu.org>
Cc: Runciter <runciter <at> whispers-vpn.org>, 78537 <at> debbugs.gnu.org
Subject: Re: bug#78537: GIMP startup crash on minimal xorg/wm unless gtk+ in
 profile
Date: Tue, 03 Jun 2025 19:54:53 +0900
Hi,

Runciter via Bug reports for GNU Guix <bug-guix <at> gnu.org> writes:

> Hello Guix,
>
> I've noticed that the new Gimp version 3.0.0 crashed on startup for me.
> The error message is:
>
> (gimp:5025): GLib-GIO-ERROR **: 22:39:28.588: Settings schema
> 'org.gtk.Settings.FileChooser' is not installed
> /gnu/store/vk8xddd7cr2dcsqjwvvyrhidg1brdsaq-gimp-3.0.0/lib/gimp/3.0/plug-ins/script-fu/script-fu:
> fatal error: GIMP crashed
> Trace/breakpoint trap

[...]

> Still, it occurs to me that gtk+ should probably be a propagated
> input of gimp-3. Some Package(s) which probably have a similar run-time
> dependency situation seem to proceed like this; such as zathura having a
> propagated input to girara having a propagated input to gtk+.
>
> I'm going to submit a patch, in case it is helpful.

Wrapping the gimp binary should be preferred.  I think it already is but
maybe something is missing?

-- 
Thanks,
Maxim




Information forwarded to bug-guix <at> gnu.org:
bug#78537; Package guix. (Tue, 03 Jun 2025 10:56:08 GMT) Full text and rfc822 format available.

Merged 78537 78667. Request was from Maxim Cournoyer <maxim.cournoyer <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 03 Jun 2025 10:56:09 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#78537; Package guix. (Wed, 18 Jun 2025 22:26:02 GMT) Full text and rfc822 format available.

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

From: Runciter <runciter <at> whispers-vpn.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 78537 <at> debbugs.gnu.org
Subject: Re: bug#78537: GIMP startup crash on minimal xorg/wm unless gtk+ in
 profile
Date: Wed, 18 Jun 2025 22:25:12 +0000
Hi,

"Maxim Cournoyer" <maxim.cournoyer <at> gmail.com> writes:

> Wrapping the gimp binary should be preferred.  I think it already is but
> maybe something is missing?

I've been looking at the package for nyxt which also has gtk-esque
inputs, I think maybe (just maybe), gimp needs to be started with
LD_LIBRARY_PATH pointing to the lib directory of the
gsettings-desktop-schema package in its environment.

I'll see when I have time to try this, if someone wants to have a go
don't hesitate.

Maxim, you marked #78667 as a duplicate of this bug. It's possible also
#78667 and this bug are duplicates of #78075.

Regards,

-- 
Runciter





Information forwarded to bug-guix <at> gnu.org:
bug#78537; Package guix. (Fri, 20 Jun 2025 23:29:02 GMT) Full text and rfc822 format available.

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

From: Runciter <runciter <at> whispers-vpn.org>
To: 78537 <at> debbugs.gnu.org
Cc: maxim.cournoyer <at> gmail.com, Runciter <runciter <at> whispers-vpn.org>
Subject: [PATCH v2] gnu: gimp-3: fix missing wrapping for gtk+ data files.
Date: Fri, 20 Jun 2025 23:27:42 +0000
* gnu/packages/gimp.scm (gimp-3)[arguments]<phases>:
  Add wrapping for gtk+ data files in prefix to XDG_DATA_DIRS.

Signed-off-by: Runciter <runciter <at> whispers-vpn.org>
---
 gnu/packages/gimp.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gimp.scm b/gnu/packages/gimp.scm
index c602d3083a..e885e89784 100644
--- a/gnu/packages/gimp.scm
+++ b/gnu/packages/gimp.scm
@@ -466,7 +466,9 @@ (define-public gimp-3
                         `("GI_TYPELIB_PATH" =
                           (,(getenv "GI_TYPELIB_PATH")))
                         `("GUIX_PYTHONPATH" suffix
-                          (,(getenv "GUIX_PYTHONPATH")))))
+                          (,(getenv "GUIX_PYTHONPATH")))
+                        `("XDG_DATA_DIRS" prefix
+                          (,(string-append #$gtk+ "/share")))))
                     (find-files (string-append #$output "/bin")
                                 (lambda (_ stat)
                                   (eq? 'regular (stat:type stat))))))))))

base-commit: a5768ec09332a625c709a20f76f0227aab2a9e5f
-- 
2.49.0






Information forwarded to bug-guix <at> gnu.org:
bug#78537; Package guix. (Fri, 20 Jun 2025 23:43:02 GMT) Full text and rfc822 format available.

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

From: Runciter <runciter <at> whispers-vpn.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 78537 <at> debbugs.gnu.org
Subject: Re: bug#78537: GIMP startup crash on minimal xorg/wm unless gtk+ in
 profile
Date: Fri, 20 Jun 2025 23:42:36 +0000
Hi Guix!

It wasn't LD_LIBRARY_PATH that needed wrapping finally, it was
XDG_DATA_DIRS.

I just submitted a revised patch.

When I think about this, after this patch, considering the case of
people who have both gtk+ and gimp in their profile, the variable
XDG_DATA_DIRS in the environment of a running gimp should be clobbered
or quasi-clobbered, however you want to call it. Although this should
generally not result in failures, it seems it has in the case of another
variable, bug#77921. I don't think it should be always preferred to use
'=' instead of 'prefix' for wrapping, though. If there's a cleaner way
to do this, let me know.

Regards,

-- 
Runciter





Information forwarded to bug-guix <at> gnu.org:
bug#78537; Package guix. (Sat, 21 Jun 2025 06:13:04 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Runciter <runciter <at> whispers-vpn.org>
Cc: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>, 78537 <at> debbugs.gnu.org
Subject: Re: bug#78537: GIMP startup crash on minimal xorg/wm unless gtk+ in
 profile
Date: Sat, 21 Jun 2025 15:12:21 +0900
Hi,

Runciter <runciter <at> whispers-vpn.org> writes:

> Hi Guix!
>
> It wasn't LD_LIBRARY_PATH that needed wrapping finally, it was
> XDG_DATA_DIRS.
>
> I just submitted a revised patch.
>
> When I think about this, after this patch, considering the case of
> people who have both gtk+ and gimp in their profile, the variable
> XDG_DATA_DIRS in the environment of a running gimp should be clobbered
> or quasi-clobbered, however you want to call it. Although this should
> generally not result in failures, it seems it has in the case of another
> variable, bug#77921. I don't think it should be always preferred to use
> '=' instead of 'prefix' for wrapping, though. If there's a cleaner way
> to do this, let me know.

I think prefix should work, even for the case referenced in #77921. I
had used = to be extra careful, but prefix is probably better if it
works.

If you are able to test it, you may want to standardize all wrapping in
gimp to use prefix.

-- 
Thanks,
Maxim




Information forwarded to bug-guix <at> gnu.org:
bug#78537; Package guix. (Mon, 23 Jun 2025 04:56:01 GMT) Full text and rfc822 format available.

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

From: Runciter <runciter <at> whispers-vpn.org>
To: 78537 <at> debbugs.gnu.org
Cc: maxim.cournoyer <at> gmail.com, Runciter <runciter <at> whispers-vpn.org>
Subject: [PATCH v3] gnu: gimp-3: fix missing wrapping for gtk+ data files.
Date: Mon, 23 Jun 2025 04:55:42 +0000
* gnu/packages/gimp.scm (gimp-3)[arguments]<phases>:
  Add wrapping for gtk+ data files in prefix to XDG_DATA_DIRS.
  Change wrapping of GI_TYPELIB_PATH and GUIX_PYTHONPATH to prefix.

Change-Id: Ib6290bf5fbbf6268a03f75c89e0bb29c907fdf33
Signed-off-by: Runciter <runciter <at> whispers-vpn.org>
---
 gnu/packages/gimp.scm | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/gimp.scm b/gnu/packages/gimp.scm
index c602d3083a..65acc70a28 100644
--- a/gnu/packages/gimp.scm
+++ b/gnu/packages/gimp.scm
@@ -460,13 +460,15 @@ (define-public gimp-3
                    (for-each
                     (lambda (prog)
                       (wrap-program prog
-                        ;; Ensure GI_TYPELIB_PATH is not extended from the
+                        ;; Ensure GI_TYPELIB_PATH is not suffixed to the
                         ;; environment, as it could cause Gimp to crash (see
                         ;; bug#77921).
-                        `("GI_TYPELIB_PATH" =
+                        `("GI_TYPELIB_PATH" prefix
                           (,(getenv "GI_TYPELIB_PATH")))
-                        `("GUIX_PYTHONPATH" suffix
-                          (,(getenv "GUIX_PYTHONPATH")))))
+                        `("GUIX_PYTHONPATH" prefix
+                          (,(getenv "GUIX_PYTHONPATH")))
+                        `("XDG_DATA_DIRS" prefix
+                          (,(string-append #$gtk+ "/share")))))
                     (find-files (string-append #$output "/bin")
                                 (lambda (_ stat)
                                   (eq? 'regular (stat:type stat))))))))))

base-commit: a5768ec09332a625c709a20f76f0227aab2a9e5f
-- 
2.49.0






Information forwarded to bug-guix <at> gnu.org:
bug#78537; Package guix. (Mon, 23 Jun 2025 05:13:02 GMT) Full text and rfc822 format available.

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

From: Runciter <runciter <at> whispers-vpn.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>, 78537 <at> debbugs.gnu.org
Subject: Re: bug#78537: GIMP startup crash on minimal xorg/wm unless gtk+ in
 profile
Date: Mon, 23 Jun 2025 05:12:24 +0000
Hi,

"Maxim Cournoyer" <maxim.cournoyer <at> gmail.com> writes:

> I think prefix should work, even for the case referenced in #77921. I
> had used = to be extra careful, but prefix is probably better if it
> works.
>
> If you are able to test it, you may want to standardize all wrapping in
> gimp to use prefix.

It's done, all wrappings now use prefix. I just submitted a revised
patch v3.

I have tested that gimp starts successfully with and without gtk+ in the
user profile.

While this is v3 of the patch, I have just realized that my global git
configuration was preventing the Change-Id from showing up at the end of
commit messages. As a result the first and v2 patches did not have a
Change-Id.

-- 
Runciter





Information forwarded to bug-guix <at> gnu.org:
bug#78537; Package guix. (Tue, 24 Jun 2025 12:40:02 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Runciter <runciter <at> whispers-vpn.org>
Cc: 78537 <at> debbugs.gnu.org
Subject: Re: bug#78537: GIMP startup crash on minimal xorg/wm unless gtk+ in
 profile
Date: Tue, 24 Jun 2025 21:39:12 +0900
Hi,

Runciter <runciter <at> whispers-vpn.org> writes:

> Hi,
>
> "Maxim Cournoyer" <maxim.cournoyer <at> gmail.com> writes:
>
>> I think prefix should work, even for the case referenced in #77921. I
>> had used = to be extra careful, but prefix is probably better if it
>> works.
>>
>> If you are able to test it, you may want to standardize all wrapping in
>> gimp to use prefix.
>
> It's done, all wrappings now use prefix. I just submitted a revised
> patch v3.
>
> I have tested that gimp starts successfully with and without gtk+ in the
> user profile.
>
> While this is v3 of the patch, I have just realized that my global git
> configuration was preventing the Change-Id from showing up at the end of
> commit messages. As a result the first and v2 patches did not have a
> Change-Id.

Are you able to run it this way?

--8<---------------cut here---------------start------------->8---
./pre-inst-env guix shell --pure gimp -- gimp
--8<---------------cut here---------------end--------------->8---

For me it still fails to run, apparently it fails to load its PNG icons.
Maybe it also needs to be wrapped with GDK_PIXBUF_MODULE_FILE ?

-- 
Thanks,
Maxim




Information forwarded to bug-guix <at> gnu.org:
bug#78537; Package guix. (Tue, 24 Jun 2025 23:37:01 GMT) Full text and rfc822 format available.

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

From: Runciter <runciter <at> whispers-vpn.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 78537 <at> debbugs.gnu.org
Subject: Re: bug#78537: GIMP startup crash on minimal xorg/wm unless gtk+ in
 profile
Date: Tue, 24 Jun 2025 23:36:41 +0000
"Maxim Cournoyer" <maxim.cournoyer <at> gmail.com> writes:

> Are you able to run it this way?
>
> --8<---------------cut here---------------start------------->8---
> ./pre-inst-env guix shell --pure gimp -- gimp
> --8<---------------cut here---------------end--------------->8---
>
> For me it still fails to run, apparently it fails to load its PNG icons.
> Maybe it also needs to be wrapped with GDK_PIXBUF_MODULE_FILE ?

I hadn't tried and yes, it still fails to run in the pure environment.

I tried the obvious way of wrapping with GDK_PIXBUF_MODULE_FILE, gimp
was still unable to load its icons. I probably did it correctly because
I saw the value as expected in the wrapper script.

There's still something in my user profile that's helping gimp to start,
now it's not gtk+ anymore; this can be investigated. If that devolves
into a slow process of elimination, I'll be able to do that next week.

Regards,

-- 
Runciter





Information forwarded to bug-guix <at> gnu.org:
bug#78537; Package guix. (Wed, 25 Jun 2025 23:40:04 GMT) Full text and rfc822 format available.

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

From: Runciter <runciter <at> whispers-vpn.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 78537 <at> debbugs.gnu.org
Subject: Re: bug#78537: GIMP startup crash on minimal xorg/wm unless gtk+ in
 profile
Date: Wed, 25 Jun 2025 23:39:28 +0000
Hi Maxim and Guixers,

"Maxim Cournoyer" <maxim.cournoyer <at> gmail.com> writes:

> Are you able to run it this way?
>
> --8<---------------cut here---------------start------------->8---
> ./pre-inst-env guix shell --pure gimp -- gimp
> --8<---------------cut here---------------end--------------->8---
>
> For me it still fails to run, apparently it fails to load its PNG icons.
> Maybe it also needs to be wrapped with GDK_PIXBUF_MODULE_FILE ?

Some progress!

I found that it currently needs the package gegl in the profile
understand the png format.

./pre-inst-env guix shell --pure gimp gegl -- gimp

This successfully showed the splash screen before crashing.

I'm on business trip and there's no hope that that my X60 will compile
guix, so I'm stuck testing the gimp package using 'ssh -Y' to back home,
until Sunday. So it will be helpful if someone can just confirm that
GIMP does crash after showing its splash screen with my latest patch +
gegl in the pure profile.

With gegl in the pure profile, it understands the png format, but it
still fails to recognize the svg format of at least one picture; this
probably relates to the package dependency structure, gimp depends on
libpng through its gegl input.

Regards,

-- 
Runciter





Information forwarded to bug-guix <at> gnu.org:
bug#78537; Package guix. (Sun, 29 Jun 2025 15:27:04 GMT) Full text and rfc822 format available.

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

From: Runciter <runciter <at> whispers-vpn.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 78537 <at> debbugs.gnu.org
Subject: Re: bug#78537: GIMP startup crash on minimal xorg/wm unless gtk+ in
 profile
Date: Sun, 29 Jun 2025 15:26:14 +0000
Hi,

"Maxim Cournoyer" <maxim.cournoyer <at> gmail.com> writes:

> Are you able to run it this way?
>
> --8<---------------cut here---------------start------------->8---
> ./pre-inst-env guix shell --pure gimp -- gimp
> --8<---------------cut here---------------end--------------->8---
>
> For me it still fails to run, apparently it fails to load its PNG icons.
> Maybe it also needs to be wrapped with GDK_PIXBUF_MODULE_FILE ?
>
> --
> Thanks,
> Maxim

So... No revised patch and I guess I won't be able to make progress in
the near future. I'm kind of at the end of my wits with this, and
definitely lacking knowledge about gtk. Here's where I'm at:

After applying my patch V3, that is to say wrapping the data files
directory of the gtk+ package into XDG_DATA_DIRS, you can get GIMP to
complete startup in a more minimal profile; most minimally, it can be
obtained with the following command:

./pre-inst-env guix shell --pure gimp gdk-pixbuf -- gimp

gdk-pixbuf pulls glib in its propagated inputs. Trials showed that gimp
needs glib in the profile in order to load PNG icons, and it also needs
gdk-pixbuf in the profile in order to load SVG icons.

Yet, trying your suggestion of wrapping GDK_PIBUF_MODULE_FILE has been
unsuccessful, both for SVG and PNG icons.

Creating a propagated input or a chain of propagated inputs from gimp to
gdk-pixbuf while applying the path V3 and leaving gtk+ out of the
propagated inputs of gimp should work, if that's acceptable.

Regards,

-- 
Runciter





Information forwarded to bug-guix <at> gnu.org:
bug#78537; Package guix. (Fri, 04 Jul 2025 03:13:02 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Runciter <runciter <at> whispers-vpn.org>
Cc: 78537 <at> debbugs.gnu.org
Subject: Re: bug#78537: GIMP startup crash on minimal xorg/wm unless gtk+ in
 profile
Date: Fri, 04 Jul 2025 12:12:41 +0900
Hi,

Runciter <runciter <at> whispers-vpn.org> writes:

> Hi,
>
> "Maxim Cournoyer" <maxim.cournoyer <at> gmail.com> writes:
>
>> Are you able to run it this way?
>>
>> --8<---------------cut here---------------start------------->8---
>> ./pre-inst-env guix shell --pure gimp -- gimp
>> --8<---------------cut here---------------end--------------->8---
>>
>> For me it still fails to run, apparently it fails to load its PNG icons.
>> Maybe it also needs to be wrapped with GDK_PIXBUF_MODULE_FILE ?

[...]

> So... No revised patch and I guess I won't be able to make progress in
> the near future. I'm kind of at the end of my wits with this, and
> definitely lacking knowledge about gtk. Here's where I'm at:
>
> After applying my patch V3, that is to say wrapping the data files
> directory of the gtk+ package into XDG_DATA_DIRS, you can get GIMP to
> complete startup in a more minimal profile; most minimally, it can be
> obtained with the following command:
>
> ./pre-inst-env guix shell --pure gimp gdk-pixbuf -- gimp

Interesting!  As perhaps one last thing to check, you could compare the
environment variables set in that profile, or compare the output of
'strace -e file -f -s200 gimp' when it works and doesn't.

-- 
Thanks,
Maxim




Information forwarded to bug-guix <at> gnu.org:
bug#78537; Package guix. (Sun, 06 Jul 2025 19:33:02 GMT) Full text and rfc822 format available.

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

From: Runciter <runciter <at> whispers-vpn.org>
To: 78537 <at> debbugs.gnu.org
Cc: maxim.cournoyer <at> gmail.com, Runciter <runciter <at> whispers-vpn.org>
Subject: [PATCH v4] gnu: gimp-3: add wrappings to enable gimp startup in pure
 profile.
Date: Sun, 06 Jul 2025 19:31:48 +0000
* gnu/packages/gimp.scm (gimp-3)[arguments]<phases>:
  Wrap value of GDK_PIXBUF_MODULE_FILE in wrapper script.
  Add wrapping for gtk+ data files in prefix to XDG_DATA_DIRS.
  Add wrapping for ahared-mime-info data files in prefix to XDG_DATA_DIRS.
  Change wrapping of GI_TYPELIB_PATH and GUIX_PYTHONPATH to prefix.

Change-Id: I2cae7408f373bd46fbc3941ed2a8e2eee40633ec
---
 gnu/packages/gimp.scm | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/gimp.scm b/gnu/packages/gimp.scm
index c602d3083a..66c57c0e36 100644
--- a/gnu/packages/gimp.scm
+++ b/gnu/packages/gimp.scm
@@ -9,6 +9,7 @@
 ;;; Copyright © 2020 Michael Rohleder <mike <at> rohleder.de>
 ;;; Copyright © 2021, 2022, 2025 Vinicius Monego <monego <at> posteo.net>
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
+;;; Copyright © 2025 Runciter <runciter <at> whispers-vpn.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -460,13 +461,19 @@ (define-public gimp-3
                    (for-each
                     (lambda (prog)
                       (wrap-program prog
-                        ;; Ensure GI_TYPELIB_PATH is not extended from the
+                        ;; Ensure GI_TYPELIB_PATH is not suffixed to the
                         ;; environment, as it could cause Gimp to crash (see
                         ;; bug#77921).
-                        `("GI_TYPELIB_PATH" =
+                        `("GI_TYPELIB_PATH" prefix
                           (,(getenv "GI_TYPELIB_PATH")))
-                        `("GUIX_PYTHONPATH" suffix
-                          (,(getenv "GUIX_PYTHONPATH")))))
+                        `("GUIX_PYTHONPATH" prefix
+                          (,(getenv "GUIX_PYTHONPATH")))
+                        `("GDK_PIXBUF_MODULE_FILE" =
+                          (,(getenv "GDK_PIXBUF_MODULE_FILE")))
+                        `("XDG_DATA_DIRS" prefix
+                          (,(string-append #$gtk+ "/share")))
+                        `("XDG_DATA_DIRS" prefix
+                          (,(string-append #$shared-mime-info "/share")))))
                     (find-files (string-append #$output "/bin")
                                 (lambda (_ stat)
                                   (eq? 'regular (stat:type stat))))))))))

base-commit: a5768ec09332a625c709a20f76f0227aab2a9e5f
-- 
2.50.0






Information forwarded to bug-guix <at> gnu.org:
bug#78537; Package guix. (Sun, 06 Jul 2025 19:33:03 GMT) Full text and rfc822 format available.

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

From: Runciter <runciter <at> whispers-vpn.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 78537 <at> debbugs.gnu.org
Subject: Re: bug#78537: GIMP startup crash on minimal xorg/wm unless gtk+ in
 profile
Date: Sun, 06 Jul 2025 19:32:40 +0000
Hi,

"Maxim Cournoyer" <maxim.cournoyer <at> gmail.com> writes:

> Hi,
>
> Runciter <runciter <at> whispers-vpn.org> writes:
>
>> Hi,
>>
>> "Maxim Cournoyer" <maxim.cournoyer <at> gmail.com> writes:
>>
>>> Are you able to run it this way?
>>>
>>> --8<---------------cut here---------------start------------->8---
>>> ./pre-inst-env guix shell --pure gimp -- gimp
>>> --8<---------------cut here---------------end--------------->8---
>>>
>>> For me it still fails to run, apparently it fails to load its PNG icons.
>>> Maybe it also needs to be wrapped with GDK_PIXBUF_MODULE_FILE ?
>
> [...]
>
>> So... No revised patch and I guess I won't be able to make progress in
>> the near future. I'm kind of at the end of my wits with this, and
>> definitely lacking knowledge about gtk. Here's where I'm at:
>>
>> After applying my patch V3, that is to say wrapping the data files
>> directory of the gtk+ package into XDG_DATA_DIRS, you can get GIMP to
>> complete startup in a more minimal profile; most minimally, it can be
>> obtained with the following command:
>>
>> ./pre-inst-env guix shell --pure gimp gdk-pixbuf -- gimp
>
> Interesting!  As perhaps one last thing to check, you could compare the
> environment variables set in that profile, or compare the output of
> 'strace -e file -f -s200 gimp' when it works and doesn't.

Thanks for the advice Maxim, that did open new pathways for trial and
error.

I just submitted a patch version 4 which has gimp succeed at starting
without crashing in a pure shell.

Finally, it is very much necessary to export GDK_PIXBUF_MODULE_FILE from
the wrapper script, as you suggested. I must have missed it originally
because it is also imperative that gimp sees the data files of the
shared-mime-info package.

-- 
Runciter





Information forwarded to bug-guix <at> gnu.org:
bug#78537; Package guix. (Mon, 07 Jul 2025 06:48:03 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Runciter <runciter <at> whispers-vpn.org>
Cc: 78537 <at> debbugs.gnu.org
Subject: Re: bug#78537: GIMP startup crash on minimal xorg/wm unless gtk+ in
 profile
Date: Mon, 07 Jul 2025 15:46:59 +0900
Hello,

Runciter <runciter <at> whispers-vpn.org> writes:

[...]

> Thanks for the advice Maxim, that did open new pathways for trial and
> error.
>
> I just submitted a patch version 4 which has gimp succeed at starting
> without crashing in a pure shell.
>
> Finally, it is very much necessary to export GDK_PIXBUF_MODULE_FILE from
> the wrapper script, as you suggested. I must have missed it originally
> because it is also imperative that gimp sees the data files of the
> shared-mime-info package.

Yay! Very good that you persevered on that one, that's a happy
resolution!

I'll look into trying and pushing your patch when I have a chance.

Well done!

-- 
Maxim




Information forwarded to bug-guix <at> gnu.org:
bug#78537; Package guix. (Tue, 08 Jul 2025 16:38:03 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Runciter <runciter <at> whispers-vpn.org>
Cc: 78537-done <at> debbugs.gnu.org, nomike <at> nomike.com, 78667-done <at> debbugs.gnu.org
Subject: Re: bug#78667: gimp crashes on startup on Ubuntu 25.10 foreign distro
Date: Tue, 08 Jul 2025 22:09:56 +0900
Hi,

Runciter <runciter <at> whispers-vpn.org> writes:

> * gnu/packages/gimp.scm (gimp-3)[arguments]<phases>:
>   Wrap value of GDK_PIXBUF_MODULE_FILE in wrapper script.
>   Add wrapping for gtk+ data files in prefix to XDG_DATA_DIRS.
>   Add wrapping for ahared-mime-info data files in prefix to XDG_DATA_DIRS.
>   Change wrapping of GI_TYPELIB_PATH and GUIX_PYTHONPATH to prefix.

Pushed as 6f9e15b913853762707f31974156069708b06e3b with some
modifications. The commit message now reads:

--8<---------------cut here---------------start------------->8---
gnu: gimp-3: Fix execution outside of a profile.

* gnu/packages/gimp.scm (gimp-3) [arguments]
<phases> {wrap}: Adjust to wrap in prefix mode. Also wrap
GDK_PIXBUF_MODULE_FILE, and XDG_DATA_DIRS.
[native-inputs]: Add shared-mime-info.
--8<---------------cut here---------------end--------------->8---

[...]

>                        (wrap-program prog
> -                        ;; Ensure GI_TYPELIB_PATH is not extended from the
> +                        ;; Ensure GI_TYPELIB_PATH is not suffixed to the
>                          ;; environment, as it could cause Gimp to crash (see
>                          ;; bug#77921).
> -                        `("GI_TYPELIB_PATH" =
> +                        `("GI_TYPELIB_PATH" prefix
>                            (,(getenv "GI_TYPELIB_PATH")))
> -                        `("GUIX_PYTHONPATH" suffix
> -                          (,(getenv "GUIX_PYTHONPATH")))))
> +                        `("GUIX_PYTHONPATH" prefix
> +                          (,(getenv "GUIX_PYTHONPATH")))
> +                        `("GDK_PIXBUF_MODULE_FILE" =
> +                          (,(getenv "GDK_PIXBUF_MODULE_FILE")))
> +                        `("XDG_DATA_DIRS" prefix
> +                          (,(string-append #$gtk+ "/share")))
> +                        `("XDG_DATA_DIRS" prefix
> +                          (,(string-append #$shared-mime-info "/share")))))
>                      (find-files (string-append #$output "/bin")
>                                  (lambda (_ stat)
>                                    (eq? 'regular (stat:type stat))))))))))

XDG_DATA_DIRS need not be duplicated, and references to packages should
be done via this-package-input/this-package-native-input or
search-input-file rather than ungexp directly, as this would make
rewriting inputs impossible:

--8<---------------cut here---------------start------------->8---
@@ -460,13 +461,21 @@ (define-public gimp-3
                    (for-each
                     (lambda (prog)
                       (wrap-program prog
-                        ;; Ensure GI_TYPELIB_PATH is not extended from the
+                        ;; Ensure GI_TYPELIB_PATH is not suffixed to the
                         ;; environment, as it could cause Gimp to crash (see
                         ;; bug#77921).
-                        `("GI_TYPELIB_PATH" =
+                        `("GI_TYPELIB_PATH" prefix
                           (,(getenv "GI_TYPELIB_PATH")))
-                        `("GUIX_PYTHONPATH" suffix
-                          (,(getenv "GUIX_PYTHONPATH")))))
+                        `("GUIX_PYTHONPATH" prefix
+                          (,(getenv "GUIX_PYTHONPATH")))
+                        `("GDK_PIXBUF_MODULE_FILE" =
+                          (,(getenv "GDK_PIXBUF_MODULE_FILE")))
+                        `("XDG_DATA_DIRS" prefix
+                          (,(string-append #$(this-package-input "gtk+")
+                                           "/share")
+                           ,(string-append #$(this-package-native-input
+                                              "shared-mime-info")
+                                           "/share")))))
                     (find-files (string-append #$output "/bin")
                                 (lambda (_ stat)
                                   (eq? 'regular (stat:type stat))))))))))
@@ -478,7 +487,8 @@ (define-public gimp-3
     (native-inputs (modify-inputs (package-native-inputs gimp-2)
                      (prepend appstream-glib
                               gi-docgen
-                              libarchive)))))
+                              libarchive
+                              shared-mime-info)))))
--8<---------------cut here---------------end--------------->8---

I've followed-up with a couple additions, such as libjxl support.

Closing!

-- 
Thanks,
Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 06 Aug 2025 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 10 days ago.

Previous Next


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