Assign Icons to Files in Nautilus (per Filetype)

I’ve been trying to add a PNG icon for a GPX file in Nautilus for a few days.
This works with one file, but not with all GPX files - so I would have to click on each GPX file and assign this image with Alt-Return. With Fedora 36 it still worked wonderfully. Can someone help me there?
Thanks

If you want to assign a specific non default icon, it is indeed a one by one operation although you could automate that manual task a bit using “gio” on the terminal. Else, the icon is determined by the association of the file type to an application. These associations can be changed in Files using the “Open with…” right-click menu. The icon will then change for all files of that type, but also the default application by which the file is launched will have changed. The icons used for specific file types are defined by the icon theme in use.

“These associations can be changed in Files using the “Open with…” right-click menu. The icon will then change for all files of that type, but also the default application by which the file is launched will have changed”

Unfortunately that is exactly my problem. It worked exactly the same under Fedora 36, unfortunately it no longer works under Files in Fedora 37 :frowning:

In Fedora 36 (Nautilus 42 and earlier) permanent associations were set in the “Open with” tab of “Properties”. Now, it is all done from within the same dialog that you open with the “Open with” right-click menu option. You have to check “Always use for this file type” for the choice to be default in the future for that file type.

The “Open with…” dialog also works here to my satisfaction, only the assignment of the icon to the *.gpx extension does not work. It’s like when I right click on a GPX file and then change the icon, it just changes for that one file and not like in Fedora 36 (Files) for *.gpx

You may have a wrong memory about that. It always worked that you change the icon of the current file only using the file properties dialog.

You’re right. I guess I didn’t remember correctly. But now I remember how it was in Fedora 36. For example, I assigned the Viking app to open the GPX files, and then all GPX_Files were marked with the icon of the app (Viking). As is the case with Windows. But that doesn’t work anymore under Fedora 37 (Gnome 43) :frowning:
Or am I doing something wrong in my memory?

Yes, I can replicate that by changing applications for playing back audio files - that is, after turning off “Show thumbnails”. It seems indeed that changing the default application does not anymore change the icon of the file, which in a way makes sense, though.

So I think it would be practical if the icon of the default app were to be shown for the file type. But it looks like I have to live with it now, or take a look at the assignment via mimetype - unfortunately I’ve never done or had to do that :slight_smile: