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.


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
  • Please edit the question askubuntu.com/posts/1351607/edit to include type of desktop. Gnome? Or? ... And of course always Ubuntu version : cat etc/issue Jul 13, 2021 at 11:38
  • 1
    "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 :-)
    – Rinzwind
    Jul 13, 2021 at 13:15
  • @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. Jul 13, 2021 at 13:24
  • 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.
    – HippoMan
    Jan 19 at 23:23

3 Answers 3


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.

  • For me, while running ungoogled-chromium from inside an Arch Linux 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](bbs.archlinux.org/viewtopic.php?id=261143) may be of help to "clean-up" if you've accidentally made a mess of permissions... Nov 7 at 17:04

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.


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
  • Thank you. However, I have tried this, and it doesn't work. Can anyone think of any other possible ways to fix this?
    – HippoMan
    Jan 19 at 23:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.