Make Firefox use xdg-open for opening files

5,978

Open the Firefox menu (Click 3 horizontal bars in the Firefox menu), then click the Preferences icon. In the sidebar that appears on the left, select Applications.

If the file you are trying to open is listed there, select Always ask from the drop-down to the right of the file type. The next time you try to open the file you will be prompted for how you want the file handled. Select the correct application to use, then select Always use this program to force it in the future. If you accidentally select an application that doesn't work for the file, repeat these steps until you select a program that works with your file.

Remember, Linux uses magic numbers to determine the file type while Windows uses the file's extension. If the extension or magic number can not be used to determine the file type, you will be asked each time you attempt to open the file since Firefox will be unable to determine the correct file type.

Share:
5,978

Related videos on Youtube

marmistrz
Author by

marmistrz

Updated on September 18, 2022

Comments

  • marmistrz
    marmistrz almost 2 years

    Is there any way to force Firefox to use system-wide defaults, i.e. xdg-open for opening all types of files?

    • Konrad Höffner
      Konrad Höffner over 7 years
      Still not the case with Firefox 50.0.2.
  • r_hribar
    r_hribar about 6 years
    Linux actually uses all three methods. XDG-compliant desktop environments associate files with MIME types and use XDG configuration to associate MIME types with how to treat them. Most file managers also use extensions to present files to the user. Magic numbers are used as last resort.
  • RdGreenlaw
    RdGreenlaw about 6 years
    Thanks for the clarification - I wasn't specific about the sequence of file checking.
  • r_hribar
    r_hribar about 6 years
    The sequence itself for xdg-open and DE stuff is extension (assuming related MIME) -> MIME -> maybe magic number. I assume it's because it's faster to check the name than to request some MIME metadata, they do that only when extension is unknown or non-existent. And of course when a program designed to work on some format (like GIMP) loads a file it doesn't bother parsing the name or requesting MIME type, it checks the magic number straight away.
  • Muhammad Gelbana
    Muhammad Gelbana almost 6 years
    What if the application isn't in the Applications list ?