Help needed to mass re-assign File type associations

First, running KDE,

ok I recently installed Cura 4.8 App image with appimageLauncher.

Cura is a 3D slicing program, for preparing 3D models to be printed on a 3D printer.

i’ve used the program for years, never had an issue before, usually installed it as mentioned above, the App-image, through AppimageLauncher. Never before had it do this

somehow though, this time, Cura became the default viewer for ALL image file types

I like Gwenview
I’m a fan of Gwenview
it handles my needs nicely

I would like to make Gwenview my default image viewer, for, well, everything
I’m not sure how to accomplish this without going to file associations, and click on each and every file type individually, which would be a tedious pain in the ass.
Do I have any other options here?

Moderation - Correct Topic Spelling

Just right click on the file and go open with other application and choose another program and select gwenview and set as default.

I realize I can right-click and select a file and re-assign that type.

Doing this for 200 some-odd file types is what I’m trying to avoid though.

I’m sorry… i thought it was for one file type.

Edit: You can do it in KDE by going to system settings, applications, file associations. I’m not sure how you can mass re-assign them?

Yeah, I saw that:
I CAN do them one at a time, but there’s a LOT of image file types, if I have to do it one at a time I will, but I figured it was worth asking.

Thank you for trying to help :slight_smile: love the quick responses in this community :slight_smile:

I don’t have this answer but what would be neat is to use the terminal and just type what file types you want to open with that program, then you could probably enter these in one go instead of clicking your way through.

That would be awesome. If someone knows the relevant command I’m all ears!!!

Try krunner
kcmshell5 filetypes
(you can also go into settings and find File Associations).

For a superb QUICK viewing app (with the option to , I’d suggest qimgv - with Gwenview being more of a ‘swiss army knife’ it usually comes in second.

I tried some -looking at JPEG I see

  1. qimgv
  2. Gwenview
  3. GIMP
  4. Darktable
  5. qView

qView lost out to qimgv. The main failings of these is that you can’t go straight to a context ‘open in GIMP’ or something like that (though you can open the folder).

I understand your point though, you cannot select the IMAGE category and assign the whole shebang in one go.

It might be worth looking back in timeshift snapshots to see what changed after you modified the settings.

https://userbase.kde.org/System_Settings/File_Associations/en

Try a search for mimeinfo.cache
/usr/share/applications/mimeinfo.cache
~/.local/share/applications/mimeinfo.cache
~/.config/mimeapps.list

The one under config shows me some of the changes I just made through settings: [example, I don’t use phatch now so I removed that]

[Added Associations]
application/pdf=qpdfview.desktop;okularApplication_pdf.desktop;wps-office-pdf.desktop;llpp.desktop;firefox.desktop;gimp.desktop;google-chrome.desktop;
application/x-bittorrent=org.qbittorrent.qBittorrent.desktop;
image/jpeg=qimgv.desktop;org.kde.gwenview.desktop;phatch-inspector.desktop;google-chrome.desktop;okularApplication_kimgio.desktop;qView.desktop;gimp.desktop;shotwell-viewer.desktop;darktable.desktop;phatch.desktop;org.kde.kphotoalbum.open-raw.desktop;org.kde.showfoto.desktop;
image/png=qimgv.desktop;org.kde.gwenview.desktop;google-chrome.desktop;shotwell-viewer.desktop;feh.desktop;org.kde.showfoto.desktop;gimp.desktop;qView.desktop;llpp.desktop;darktable.desktop;phatch.desktop;ida.desktop;okularApplication_kimgio.desktop;
image/svg+xml=qView.desktop;gimp.desktop;visual-studio-code.desktop;org.gnome.meld.desktop;org.kde.kate.desktop;okularApplication_txt.desktop;kfmclient_html.desktop;brave-browser.desktop;webapp-ManjaroForum4233.desktop;webapp-Facebook0708.desktop;google-chrome.desktop;firefox.desktop;gvim.desktop;vim.desktop;
inode/directory=org.kde.dolphin.desktop;audacious.desktop;org.kde.gwenview.desktop;visual-studio-code.desktop;org.kde.filelight.desktop;filebot.desktop;thunar.desktop;easytag.desktop;
text/plain=visual-studio-code.desktop;org.gnome.meld.desktop;org.kde.kate.desktop;okularApplication_txt.desktop;
video/mp4=mpv.desktop;Player.desktop;vlc.desktop;QMLPlayer.desktop;
video/x-matroska=mpv.desktop;QMLPlayer.desktop;Player.desktop;vlc.desktop;

[Default Applications]
application/pdf=qpdfview.desktop;
image/jpeg=qimgv.desktop;
image/png=qimgv.desktop;
image/svg+xml=qView.desktop;
inode/directory=org.kde.dolphin.desktop;
text/html=brave-browser.desktop
text/plain=visual-studio-code.desktop;
video/mp4=mpv.desktop;
video/x-matroska=mpv.desktop;
x-scheme-handler/mailspring=mailspring.desktop
x-scheme-handler/mailto=mailspring.desktop

[Removed Associations]
image/jpeg=ida.desktop;feh.desktop;llpp.desktop;
image/png=phatch-inspector.desktop;
inode/directory=kfmclient_dir.desktop;

So I’d look at that one first.
Maybe you can find and delete the line for Cura.

doing a regrexp replace in the miemapps.cache/list should allow one to mass remove references to an application

replacing \n(.*)myapp.desktop; with empty string should do the trick. where myapp is the desired app you want to erase from mimelist.

Ohh awesome thank you guys!!!

@nate
Is it miemapps.cache/list? Or is this a spelling error?

I was simply expanding on the previous answer in that regexp replace can clean up the default apps list.

my contribution was not aimed at identifying new files that need to be edited, but rather how these can be edited efficiently.