Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is there any way to find the icon for a specific file type? I'd like to write a shell script that returns the location of the image file, or icon, for a specific file type.

share|improve this question
add comment

1 Answer

In python, you could can get the icon with something like:

>>> from gi.repository import Gio
>>> Gio.content_type_get_icon('text/python')
<ThemedIcon object at 0xb5d61324 (GThemedIcon at 0xa372590)>
share|improve this answer
    
How can I find the name and location of the icon image's file? I don't see any file names being printed here. –  Anderson Green Nov 25 '12 at 3:43
add comment

Your Answer

 
discard

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.