librsvg from Guix makes native GIMP unable to find icons

  • Open
  • quality assurance status badge
Details
2 participants
  • Josselin Poiret
  • Tirifto
Owner
unassigned
Submitted by
Tirifto
Severity
normal
T
T
Tirifto wrote on 30 Dec 2022 20:56
(address . bug-guix@gnu.org)
3500028.iIbC2pHGDl@localhost.localdomain
Hello! I use Guix as a supplementary package manager on OpenSUSE 15.4. I have
recently installed the package ‘librsvg’ in Guix, in order to fix a different
issue, where a different program (installed with Guix) wouldn’t show icons
without it [1]. But I noticed that doing so affects GIMP, a graphical program
installed natively in openSUSE, which can no longer show its own icons now.

The problem is solved by removing ‘librsvg’ from my Guix profile, logging out,
and logging back in. (But then, of course, the other program which needs
‘librsvg’ in my profile breaks again.)

Another solution is not to source my Guix profile in my login shell (thus
removing the appropriate line from my ‘~/.profile’ file), and to remove the
file ‘/etc/profile.d/guix.sh’, both of which seem to only define some
environment variables. (Of course, this breaks Guix’s whole integration with
the host system, so it’s not a good solution at all.) Removing only the
profile does not help.

I have observed the changes installing ‘librsvg’ made to the aforementioned
files, and to my environment:

‘guix.sh’ has not changed at all.

‘profile’ now defines the two following variables:
• XDG_DATA_DIRS
• GDK_PIXBUF_MODULE_FILE

These environment variables have been extended:
• XDG_DATA_DIRS was defined [2], now is prefixed with
‘/home/tirifto/.guix-profile/share’
• GDK_PIXBUF_MODULE_FILE was undefined, now is set to
‘/home/tirifto/.guix-profile/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache’

When I run GIMP from the command line, it prints the errors attached in ‘gimp-
errors.txt’.

When I try to unset the changed variables for GIMP, using the following
command, the icons are still absent, but it prints less errors, which are
attached in ‘gimp-errors-no-env.txt’:

XDG_DATA_DIRS='/usr/local/share:/usr/share' GDK_PIXBUF_MODULE_FILE='' gimp

When I try to unset the changed variables with ‘unset’ before I actually run
GIMP, it works as expected, with no errors printed, like so:

unset XDG_DATA_DIRS
unset GDK_PIXBUF_MODULE_FILE
gimp

I’m not sure what’s the difference between those procedures, since I don’t
understand Bash that well, but maybe it can help someone who does understand
the problem better.

Best of wishes
// Tirifto

[2] XDG_DATA_DIRS already had ‘/home/tirifto/.guix-profile/share’ in it before
it was added to the profile, presumably coming from the aforementioned
‘guix.sh’. This means I now have ‘/home/tirifto/.guix-profile/share’ twice
in my path. I assume that’s not a problem, but found it curious.
Attachment: gimp-errors.txt
WARNING: icon 'gimp-default-colors' failed to load. Check the files in your icon theme.
WARNING: icon 'gimp-swap-colors' failed to load. Check the files in your icon theme.
WARNING: icon 'gimp-image' failed to load. Check the files in your icon theme.
WARNING: icon 'gimp-image' failed to load. Check the files in your icon theme.
Attachment: gimp-no-icons.png
J
J
Josselin Poiret wrote on 5 Jan 2023 21:54
87h6x4aeia.fsf@jpoiret.xyz
Hi,

Tirifto <tirifto@posteo.cz> writes:

Toggle quote (6 lines)
> Hello! I use Guix as a supplementary package manager on OpenSUSE 15.4. I have
> recently installed the package ‘librsvg’ in Guix, in order to fix a different
> issue, where a different program (installed with Guix) wouldn’t show icons
> without it [1]. But I noticed that doing so affects GIMP, a graphical program
> installed natively in openSUSE, which can no longer show its own icons now.

I assume the problem comes from the fact that the host's gdk-pixbuf uses
the GDK_PIXBUF_MODULE_FILE variable that is set by Guix, and so tries to
refer to Guix's loaders rather than the host's, which don't use the same
glibc version. I don't see an easy fix for this: we could rename it to
GUIX_GDK_PIXBUF_MODULE_FILE, but that's likely a world rebuild. In the
meantime, you could consider only using Guix "explicitely", by only
entering the profile manually in a shell when you want to use the apps
it installed.

Best,
--
Josselin Poiret
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 60434@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 60434
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch