Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to get the icon for a MIME type?
I don't want to use g_file_info_get_icon() because its input parameter is a file, not a MIME type.

My use case:

I have a wrapper file which embeds a media object, I can get the MIME type of the media object and want to find the icon of the MIME type. And I don't want to dump the media object to a separate file to use g_file_info_get_icon().

share|improve this question

Did you try g_content_type_get_icon ()?

You might need to call g_content_type_from_mime_type () first.

GContentType docs

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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