Score:2

Gtk-WARNING **: Could not load a pixbuf from icon theme

pt flag

Whenever I start firefox, steam, and some other gui programs from the terminal, I see this error.

I have searched for possible solutions to this problem, the most common one I found was sudo update-mime-database /usr/share/mime, which runs without printing any errors (or anything at all) for me, but does not change anything.

I tried changing permissions, as suggested here: How to repair broken permissions on files in /usr/share/mime?, however, this also changed nothing.

https://bbs.archlinux.org/viewtopic.php?id=245985

I have very similar issues (it occurs much more often when launched from the command line) to what is described in this arch forum post, however XDG_DATA_DIRS is not set in my .zshrc, nor does it have the flatpak path (it is /home/user/snap/alacritty/46/.local/share:/home/user/snap/alacritty/46:/snap/alacritty/46/usr/share:/usr/share/awesome:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop.

If there is any information about my installation that I should provide, please tell me. Thank you.

I am using Ubuntu 20.04.2 LTS, with the awesome window manager, and gnome as my desktop.

The full output of running gnome-calculator is as follows:

(gnome-calculator:4038): Gtk-WARNING **: 06:23:42.942: Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.
**
Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Yaru/16x16/status/image-missing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3)
Bail out! Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Yaru/16x16/status/image-missing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3)
[1]    4038 abort (core dumped)  gnome-calculator
Knud Larsen avatar
by flag
Please edit the question https://askubuntu.com/posts/1351607/edit to include type of desktop. Gnome? Or? ... And of course always Ubuntu version : `cat etc/issue`
cn flag
"I see this error" What is the error? You only list a "warning" (and those are not errors). "warnings" are intended for developers, not for us users. I would assume this is from a theme that is broken or not intended for your manager. Switch icon theme to a default one and if that solves it you could file a bug report against the theme :-)
johnson4393 avatar
pt flag
@Rinzwind I wasn't sure how much of the output was relevant, so I only posted that part. I will edit the post with the example output of a program.
HippoMan avatar
us flag
You are one of several people who reported this error over the past several months, and now I am starting to get this error also under XUbuntu 20.04 (XFCE). The fixes suggested here and elsewhere to not work for me. Does anyone have any info about how to fix this, other than what is reported here? Thank you.
Score:0
us flag

I recently started having this same problem, and none of these suggestions mentioned here worked for me. However, I now discovered the cause of my problem:

I had accidentally set the XDG_DATA_DIRS environment variable to point to a non-existent directory. Once I fixed this and ran the following, this Gtk problem went away ...

export XDG_DATA_DIRS=/path/to/a/real/and/accessible/directory

I also think that completely unsetting XDG_DATA_DIRS could fix the problem, as well.

Android Control avatar
fr flag
For me, while running `ungoogled-chromium` from inside an Arch Linux [`distrobox`](https://github.com/89luca89/distrobox) container the `XDG_DATA_DIRS` variable was set but it was empty - quitting `chromium` then issuing `unset XDG_DATA_DIRS` then re-running `chromium` prevented the errors. I guess there was/is a fallback - thanks for the pointer @HippoMan :-) btw, this post [**[Solved] Could not load pixbuf from icon theme. gdk error crash**](https://bbs.archlinux.org/viewtopic.php?id=261143) may be of help to "clean-up" if you've accidentally made a mess of permissions...
Score:0
sd flag

I dont know what the error means tbh. But I just got the error from an Icon theme failure and I just moved the icon theme out of '/usr/share/icons' into another folder(somewhere like Downloads('~/Downloads/...' or Documents'~/Documents/...'). After that your icon theme should revert to the default and you will be able to use calculator. Hope this is relevant to your problem gl.

Score:-1
jp flag

I was having the same error as well on my Arch machine. My firefox would crash if I tried open a file from my system in firefox. I found a site which describes a similar issue which fixed my problem: https://namespaceit.com/blog/could-not-find-mime-type-database-in-the-following-locations-usr-local-share-mime-packages-freedesktop.org.xml

Here's the Ubuntu equivalent of what I did:

sudo update-mime-database /usr/share/mime
sudo apt-get install shared-mime-info
HippoMan avatar
us flag
Thank you. However, I have tried this, and it doesn't work. Can anyone think of any other possible ways to fix this?
mx flag
xpt
Yep, same here, tried it and still getting the problem :(
mmortal03 avatar
ls flag
I had a similar issue on Linux Mint, and had to track down the location of gdk-pixbuf-query-loaders on my machine. (it might be in your /usr/bin, but it wasn't for me). Then I ran: sudo /lib/x86_64-linux-gnu/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders --update-cache That fixed my problem.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.