How to set default file association for .htm files?

Hello :slight_smile:

I usually change file association for “normal” files, like .php, .cpp, .txt, etc… and that work perfectly.
But I am trying to set the default program for .html to kwrite

I have changed it in file association, kwrite is the first of the list, but .html files still open with Firefox.

How can i change the default program association for .html/htm files?

Thank you very much in advance for any help :slight_smile:

PS: I think it is not necessary for this “noob” question, but:
OS: OpenSuse 13.1 with KDE
Basic hardware: Intel E6600 + 8GB ram
Resolution: 1920*1200

Maybe Configure Desktop->Default Applications->Web Browser?
(set it to “in an application based on the contents of the URL”)

Thanks you!

It seem a bit strange, because local files are not http/https URI, but it work anyway.

KDE Desktop Change File Association

  • Application Launcher -> Personal Settings/Configure Desktop -> File Associations
  • Type html in the top text box, expand the entry in the listbox “Known Types”. In my case, mimetypes “application/” and “text/” appear. Each of those can be expanded to show subtypes. Select text. Notice the changes on the right-hand side. There are buttons to Add, Remove, Move Up, Move Down, Edit. If KWrite is in the listbox, “Application Preference Order”, Move Up. If it is not, Add it. Double check the “Filename Patterns” and “Command” (under Edit).

A useful command is:


xdg-mime query filetype FILE.html

xdg-mime query default text/html