App thumbnail and icon

Fedora 43 WS, Gnome 49

In Gnome, I can choose to display thumbnails for files or not. If I disable thumbnails, all image files (PNG, SVG, and others) are displayed with the same icon. This is very inconvenient. I would like the SVG icons to display the Inkscape icon. That’s how it works in Windows. How can I do this in Fedora? Why doesn’t Linux have such a simple feature in the system settings? It would look more harmonious.

Possibly not worth digging into since f42 will soon become EOL with the scheduled release of f44 in April.

Possibly consider upgrading to f43 first then work on this issue if it still remains there.

You can start with this and then customize the generated config if necessary:

tee custom-mime.xml << EOF > /dev/null
<?xml version="1.0" encoding="utf-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
$(for MIME_FILE in /usr/share/mime/*/*.xml /usr/local/share/mime/*/*.xml
do MIME_TYPE="${MIME_FILE#/*/*/*/}"; MIME_TYPE="${MIME_TYPE%.*}"
MIME_APP="$(xdg-mime query default "${MIME_TYPE}")"
if [ -z "${MIME_APP}" ]; then continue; fi
cat /usr/share/applications/"${MIME_APP}" \
| while IFS="=" read -r APP_KEY APP_VALUE
do if [ "${APP_KEY}" != "Icon" ]; then continue; fi
MIME_ICON="${APP_VALUE}"
tee << EOI
<mime-type type="${MIME_TYPE}">
<generic-icon name="${MIME_ICON}"/>
</mime-type>
EOI
done
done)
</mime-info>
EOF
xdg-mime uninstall custom-mime.xml
xdg-mime install custom-mime.xml

I’m sorry. I have Fedora 43, on versions 42 and 41 icons were also displayed.

Thank you! I’ll try to follow your advice