I work with Xubuntu 12.04 and use Okular (version 0.14.3) to view pdf files. If I click a web link in a pdf file (created with "pdflatex" using the "hyperref" package), "Abiword" (It's a word-processing software, like Libreoffice writer) is opened instead of my default browser google-chrome. How can I change this behavior? The settings in Okular do not seem to provide a solution.

(Note that I set google-chrome as the preferred application for web browsing under Settings -> Preferred Applications, so that's not the problem).

  • Is this happening only with okular? Have you tried any other pdf viewer such as evince?
    – Anwar
    Commented Jul 13, 2012 at 6:30
  • Okular tries to open links with the script editor in RStudio on my Ubuntu 20.04 system. :/
    – Lexible
    Commented Jan 19, 2021 at 1:17

5 Answers 5


The answer by @Marius is correct. It helped me. Just a clarification.

  1. Run kcmshell4 filetypes or kcmshell5 filetypes in a console or by Alt+F2. File Associations - KDE Control Module will open.
  2. Search for html and select the file type text/html.
  3. Move the application name you want to be a default for html in the "Application Preference Order" to the top.
  • 1
    unfortunately, this doesn't do the trick for me... for html, Firefox is first option, but still not opened. Seems like the Firefox entry is somehow invalid, it is skipped. No idea how to "fix" it, though.
    – codeling
    Commented Mar 7, 2019 at 16:30
  • @codeling, the solution still works for me. I am on Linux Mint 19.
    – djhurio
    Commented Mar 17, 2019 at 14:20
  • 2
    On my recent version of ubuntu, it was kcmshell5 filetypes (v5 instead of v4) Commented Jun 23, 2021 at 13:27

For newer KDE versions you might need to run:

kcmshell4 componentchooser

and set the "Web Browser" to the command of your preferred browser.

This worked on Arch Linux, at least.

  • 1
    This worked for me too! (I'm on Openbox on ArchLinux)
    – Abhinav
    Commented Jan 15, 2016 at 19:58
  • This worked for me on Kubuntu 16.10, after adjusting filetype and default browser settings didn't, which makes me wonder what the point of those other two is. Is there some way, opaque to em, in which all these settings should be used to work and play nicely together, rather than contradict and override?
    – Mark
    Commented Mar 4, 2017 at 11:42
  • Works perfectly for Okular in Lubuntu 16.04, while the kcmshell4 filetypes way didn't.
    – dessert
    Commented Dec 4, 2017 at 11:01

The answer can be found in the okular devel list here

The important part is quoted here

Is it linking to an html file? If so you might want to also check which is the default application in kcmshell4 filetypes for html mimetype.

  • 3
    Though theoretically the answer may be correct. But it is preferable to include the necessary details here.
    – Anwar
    Commented Jul 13, 2012 at 6:32

I am using Ubuntu 18.04 and for me it finally worked:

  1. running: kcmshell4 filetypes
  2. selection the File type: inode/vnd.kde.service.http and adding the Firefox to Application Preference Order.

I think that addition of text/html (as suggested in the previous answer) was not enough because not all links in pdf files have the filename pattern *html

  • 1
    Ubuntu 20+ require: kcmshell5 filetypes
    – wmora2
    Commented Jul 24, 2022 at 16:55

I did the above -- moved my chosen browser to the top but it still opened in the browser I did NOT want. What solved it was to choose 'remove' to delete the browser that I did not want to use. That fixed it for me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .