Firefox Opening Pdfs in Gedit

Please comment (add #) or remove

# application/octet-stream=gedit.desktop; 

in your

~/.local/share/applications/mimeapps.list

That's works for me.