14

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

2

2 Answers 2

1

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.

4
  • 2
    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.
    – Deuxis
    Jun 22, 2018 at 11:20
  • Thanks for the clarification - I wasn't specific about the sequence of file checking.
    – RdGreenlaw
    Jun 23, 2018 at 23:42
  • 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.
    – Deuxis
    Jun 25, 2018 at 19:33
  • 2
    What if the application isn't in the Applications list ? Jul 25, 2018 at 9:46
0

I'm not sure if this is a case of X/Y Problem, but to give you an alternative solution, here it is.

I came across this question when researching for a way to make Firefox open Dolphin instead of Thunar.

The solution:

Edit the file ~/.config/mimeapps.list and find all lines with inode/directory= and let there be only Dolphin, removing Thunar from de list.

I hope this help more people dropping here from a similar search.

You must log in to answer this question.

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