Arbitrary app set to the default for all unknown files

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?

Could you show the content of the .desktop file?

[Desktop Entry]
Categories=Development;Graphics;Multimedia
Comment=A free lightweight GPU-based voxel art editor and interactive path tracing renderer.
Exec=/home/user/.local/bin/magicavoxel
Icon=/home/user/.local/share/MagicaVoxel/icon.png
Name=MagicaVoxel
NoDisplay=false
Path=/home/user/.local/share/MagicaVoxel/
PrefersNonDefaultGPU=false
StartupNotify=true
StartupWMClass=magicavoxel.exe
Terminal=false
TerminalOptions=
Type=Application
X-KDE-SubstituteUID=false
X-KDE-Username=

Ah, sorry, I misinterpreted. When you said:

I changed the settings so that whenever I double-click on a *.VOX or *.vox file, it opens it in Magicavoxel.

I thought you meant changing something in the .desktop file (which looks fine), rather than changing it in the system settings.

Maybe show what you configured in the settings?

Here’s what I have for Magicavoxel in System Settings:

Here is a recording showing Magicavoxel listed for a ton of file types:

screencast

I see, I’m not sure how it gets this way.

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!

Yeah… I’m not sure how I did it. I might just need to reinstall Magicavoxel.

Maybe the .desktop file is the issue. What happens if you remove it from the equation and link directly to the executable instead?

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.

i had this happen for dbeaver once and ended up uninstalling it because it took over a slew of mimetypes

never thought to check the .desktop file for a mimetype callout

@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.

This was reported https://bugs.kde.org/show_bug.cgi?id=425154

It sent me into a rabbit hole, I have made three MRs to have this fixed fully (in KF and Qt):

Ahh, that makes sense. The Magicalvoxel-associated MIME types I removed from ~/.config/mimeapps.list were indeed application/octet-stream.