Announcement

Collapse
No announcement yet.

Make Firefox stop opening PDFs in Gimp or Krita or other image editors

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Make Firefox stop opening PDFs in Gimp or Krita or other image editors

    This has been bugging me for a while. Sometimes, web pages with links to PDF files will give you the option of either downloading the file or opening the file in an application. Choosing the latter would result in launching Krita! Similarly, if I would open Firefox's download manager and try to open a PDF from there, the same thing would happen. PDFs should open in Okular, not image editors. Fixing this required an edit to a MIME definition file.

    1. In KDE, press Alt+F2 to open KRunner. Enter:
    Code:
    kdesu kate /usr/share/applications/mimeinfo.cache
    2. Find the line that begins with application/pdf. Remove all non-Okular entries. A proper Okular-only line looks like this. The semicolon at the end is required.
    Code:
    application/pdf=kde4-okularApplication_pdf.desktop;
    3. Save the file and close the editor.

    No reboots are necessary.

    #2
    I had a similar problem in Firefox recently where it was always downloading a PDF file whereas my preference was it to be previewed in Firefox (then I can save the PDF if I want to).

    I went to the Firefox preferences, Applications tab, searched for PDF and in the Action dialog chose "Preview in Firefox". The other options are: "Always ask", "Save File". Then below that there is: "Use Okular (default)" and "Use other". If you choose "Use other" you have the opportunity to choose the app you want to use as a preference and set it there.

    Maybe my solution was another way of doing it? Of course, this way only affects how Firefox would handle the PDF.
    Desktop PC: Intel Core-i5-4670 3.40Ghz, 16Gb Crucial ram, Asus H97-Plus MB, 128Gb Crucial SSD + 2Tb Seagate Barracuda 7200.14 HDD running Kubuntu 18.04 LTS and Kubuntu 14.04 LTS (on SSD).
    Laptop: HP EliteBook 8460p Core-i5-2540M, 4Gb ram, Transcend 120Gb SSD, currently running Deepin 15.8 and Manjaro KDE 18.

    Comment


      #3
      I tried that, and it didn't work.

      Comment


        #4
        After rebooting, PDF files are once again opened with Gimp.

        Edit: I've added ppa:moz-plasma/releases and now everything works fine!
        Well, Firefox keeps ignoring .Xmodmap no matter what, but that's another story...
        Last edited by geoaraujo; Mar 24, 2015, 05:34 PM.

        Comment


          #5
          Originally posted by geoaraujo View Post
          After rebooting, PDF files are once again opened with Gimp.
          Yeah, I noticed that, too.

          Think I found a workaround. Open System Settings -> File Associations. Enter pdf in the "Find..." box. Expand the resulting tree to find pdf. In the Application Preference Order box, delete entries for image editors.

          Mine had Krita and Karbon here. Despite their being at the bottom, they would reappear at the beginning of the application/pdf line in mimeinfo.cache. Just now I edited the file again, removed Krita and Karbon, and rebooted. Blissfully, they did not reappear in mimeinfo.cache. I suspect this will work for you, too.

          Comment


            #6
            I support quite a number of people who are new to Linux and I have encountered the problem outlined above and have used the solution suggested by Steve as well as other solutions. There is always a solution and usually they are quite simple........ if one knows where to look.

            I want to use this thread to get something off my chest about these sort of problems. I have installed exactly the same versions of various 'bunto systems with similar applications within days of one another and one would expect that they would all function the same way. Curiously not all of them do. Problems like this one will occur occasionally, yet several other systems that are pretty much identical except for hard ware will not have the problem. It is not just Mozilla apps that it happens with. There is always a solution but it is not always the same one. It is irritating that identical system installations sometimes do not produce identical results.

            The troubleshooting has made me a better support person but I sympathize with new Linux users who encounter these problems with something that should "just work". Thanks for letting me blow off steam. I don't blame anyone I am just venting.
            Volunteer OS Installer and Supporter for New Linux Users.
            So much to learn.... So little time!

            Comment


              #7
              Originally posted by MDuff View Post
              I want to use this thread to get something off my chest about these sort of problems. I have installed exactly the same versions of various 'bunto systems with similar applications within days of one another and one would expect that they would all function the same way. Curiously not all of them do. Problems like this one will occur occasionally, yet several other systems that are pretty much identical except for hard ware will not have the problem.
              The order in which packages are installed, and subsequent updates applied, is likely to be one of the causes of the phenomenon you're observing.

              Comment


                #8
                I wish to echo what SR just posted.

                I have ALWAYS run........"just a stock" distro..

                a) I ALWAYS............."just right click and........"........... then I choose the "option".

                b) What SR posted WILL HAPPEN......in any kind of distro that has "default options"........One of the reasons that I did not like a certain ..........'EVERYTHING LINUX OS" was because........not that it was "heavy" but because it had EVERY SINGLE THING INSTALLED.........down to the kind of handles were on the bathroom sink..........and then "when you clicked something".........it defaulted to that........

                There IS usually a "tick box" to when you "right click and........" yada , yada........that you can tick the box before you select.

                HOWEVER;...........not all software is so nice as to provide that........and that gets into ...........Konquieror.........Dolphin........your choices on startup..........the "exponential tree" can be.......well........exponential........

                whatever "method" is involved........if one does not "just start from stock".......then..........one has to deal with the truncations of the tree.........

                woodjustathoughtoflittleworthsmoke
                sigpic
                Love Thy Neighbor Baby!

                Comment

                Working...
                X