I “installed” (created a .desktop file for) Magicavoxel which I run using Wine. I changed the settings so that whenever I double-click on a *.VOX or *.vox file, it opens it in Magicavoxel.
Unfortunately, the system has for some reason decided that Magicavoxel is now the default application to use for any file types it doesn’t recognize. For example, BespokeSynth saves files with the .bsk extension, but because Dolphin doesn’t recognize .bsk files, it’ll try to open them in Magicavoxel.
I would prefer it open in a text editor (like KWrite), so I can at least see the file contents, even if it might be a binary file.
In the System Settings app, Magicavoxel only has the *.VOX and *.vox filetypes listed, but it’s been added to the app list for almost every single other file type. The only reason it doesn’t open every file in Magicavoxel is because some apps have higher priority (for example, both Blender and Magicavoxel are listed as apps for .blend files, but Blender has the higher priority).
What caused this (so I can prevent it in the future), and how do I fix this?
If you use “Apply To” on that screen, you could transfer the app association to another file type or group of types. However, to make it apply to literally everything, in the “Apply To” dialog you’d have to check the boxes for all the groups (application, audio, chemical etc etc) - which is hard to do by accident!
The .desktop file does not give any MimeType hints, so it might be that it is interpreted as “can open anything”. It might be any invalid .desktop file not complying with the specification. Registering MIME Types | Desktop Entry Specification
Add a Mimetype field to it for application/vox or application/x-vox whichever you added.
@ddnnacheta I removed the desktop file and added the executable, but it ignored it (once) and then when I tried adding the executable again, System Settings crashed.
@meven I also added the MimeType field, but that didn’t change anything.
I’m starting to think when I was setting it up, I must have just added the app to every file type without knowing what I was doing. Where is the data stored for each MIME type? Maybe I could edit the settings files in bulk so I don’t have to remove each Magicavoxel individually.
But that may not undo the situation by itself, the association was in place already.
That’s ~/.config/mimeapps.list, (ref) you can remove the file (or edit it) and then run kbuildsycoca6 (or kbuildsycoca) for applications to take into account the change.
I edited ~/.config/mimeapps.list to remove Magicavoxel from any mimetypes that it shouldn’t have been assigned to, restored the .desktop file, and ran kbuildsycoca6. It worked! My default applications are back to normal. Thanks for the help!
i imagine if you were to reinstall Magicavoxel that all the mimetype things you deleted would come back tho, or perhaps having the .desktop in your /home will prevent that from happening?
i just checked my ~/.config/mimeapps.list and behold 42 instances of dbeaver associations for an app i have already removed.
After more research, what caused the bug, was in dolphin when associating the *.vox to the app with “remember file association”, since *.vox wasn’t a known mime, it defaulted to application/octet-stream, then ending association to all “normal” file associations.