Hi there, I’ve had this problem every time I reinstall OpenSUSE (For whatever reasons) where I prefer having VLC as my default video player, for every media type (.wmv, .mkv, .avi, .mpg).
I realize that I can go into Configure Desktop > Advanced > File Associations, but then I have to individually select each (quite cryptic) media type, and manually change my preference.
This should be way easier than it is (I’m computer literate, but can you imagine a new user trying to change these settings?) Am I missing the obvious fix here?
Why this works the way I’m going to explain you is complex. There is no easy solution. Apps should be improved to ask the user at the first start if they want the app to be the default for the supported formats. But notice I said “supported formats”, that should be an exhaustive list… there is no way to say “all video formats”, I think this is the same in all major operating systems.
If you are in KDE:
Copy the .desktop file of vlc to your personal config dir
Open the file from ~/.local/share/applications and add a line saying
InitialPreference=500
(or any high number, anything over 4 should do the trick)
Run this command
update-desktop-database
This will make vlc the default app for any file type specified in the “MimeType=…” line from the vlc.desktop file. But if an updated vlc package changes that line to add new file types, the changes will have no effect in your user if you don’t update the copy at ~/.local/share/applications.
@RedDwarf, i just tried your recipe on my KDE in 11.4 and get:
linux:/home/denverd/.local/share/applications # update-desktop-database
Error in file "/usr/share/applications/kde4/bluedevil-sendfile.desktop": "virtual/bluedevil-sendfile" is an invalid MIME type ("virtual" is an unregistered media type)
Error in file "/usr/share/applications/kde4/bluedevil-audio.desktop": "virtual/bluedevil-audio" is an invalid MIME type ("virtual" is an unregistered media type)
Error in file "/usr/share/applications/kde4/bluedevil-input.desktop": "virtual/bluedevil-input" is an invalid MIME type ("virtual" is an unregistered media type)
and, when i click on (for example) and oog file it open in Amarok (and, i note while (say) mp3 is mentioned in ~/.local/share/applications .oog is not…so, it seems this work around helps VLC become default for only some supported formats…