Results 1 to 4 of 4

Thread: How to set default file association for .htm files?

  1. #1

    Question How to set default file association for .htm files?

    Hello

    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


    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

  2. #2

    Default Re: How to set default file association for .htm files?

    Quote Originally Posted by Escain View Post
    How can i change the default program association for .html/htm files?
    Maybe Configure Desktop->Default Applications->Web Browser?
    (set it to "in an application based on the contents of the URL")

  3. #3

    Default Re: How to set default file association for .htm files?

    Thanks you!

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

  4. #4

    Default Re: How to set default file association for .htm files?

    Quote Originally Posted by Escain View Post
    ...
    How can i change the default program association for .html/htm files?
    ...
    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:
    Code:
    xdg-mime query filetype FILE.html
    
    xdg-mime query default text/html

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •