Ubuntu – How to change the default application for unknown file types

geditnautilus

Ever since installing Bless Hex Editor, all unknown files and text files automatically open with Bless instead of gedit. How do I change it back? I don't want to have to manually associate files with gedit, I just want gedit to be the default if there's no other application set up to open the file.

Solution:
modify ~/.local/share/applications/mimeapps.list

[Default Applications] 
- text/plain=bless.desktop
- application/octet-stream=bless.desktop
+ application/octet-stream=gedit.desktop

Best Answer

modify ~/.local/share/applications/mimeapps.list

[Default Applications] 
- text/plain=bless.desktop
- application/octet-stream=bless.desktop
+ application/octet-stream=gedit.desktop

This reverts the text/plain app to using the system default in /usr/share/applications/defaults.list, and changes the default application/octet-stream. It seems that Firefox labels this mime-type as "Unknown".

Related Question