

Now, whenever there is an update to your system, the mimeapps.

Here’s what you would add to the file if you want Okular to be your default PDF reader: Īpplication/pdf=okularApplication_pdf.desktop You can override the mimeinfo.cache list by creating a file in the /usr/share/applications directory called “mimeapps.list” that overrides mimeinfo.cache. In order to make this a permanent fix, there is another option. The next time you update your software or change something, gimp, again, gets set as the default for PDF files.

UPDATE:įor those who have used this workaround in the past, they may have realized that this fix is temporary. Once you change it, save your changes and then restart Firefox. All you need to do to fix this is to change the order so Okular is first, like this: application/pdf=kde4-okularApplication_pdf.desktop sktop The order of the applications after the “=” indicates the order in which they will be used to load PDFs. Once you have edit permissions for that file, search for this line: application/pdf=sktop okularApplication_pdf.desktop NOTE: As of Kubuntu 18.04, you now have to use the following command to edit protected files with Kate: SUDO_EDITOR=kate sudoedit /usr/share/applications/mimeinfo.cache Here’s the command I use in Kubuntu: sudo kate /usr/share/applications/mimeinfo.cache Open a terminal and gain root privilege to edit the following file: / usr/share/applications/mimeinfo.cache. It turns out, the solution is to edit a different file, changing the order of default applications for opening PDFs. The second logical solution would be to change the default applications in Firefox, but that doesn’t do anything. First, by simply setting your system-wide preference for what program opens PDFs, that should do it, but mine was already set to Okular (you can change the default for most programs by right-clicking a PDF file, selecting Properties, then File Type Options and setting the program you want to be the default). It would make sense to be able to change this in one of two ways. It’s doubly annoying since you can’t solve it inside Firefox. This didn’t used to happen, but it’s really annoying. I’m not exactly sure why, but with the latest Firefox updates, every time I download a PDF using Firefox or try to open one using Zotero integrated with Firefox, the PDF opens in GIMP.
