So I installed firefox in /opt/ and I'm using it normally but I want it to also be the default pdf viewer.
I did
gvfs-mime --set application/pdf firefox.desktop
and now firefox is the default viewer but only if I open a pdf in it from the terminal using xdg-open.
When I open a pdf from pantheon-files it gives an error:
Unable to open files or uris with this app
How do I fix this? In my quest I ended up finding MimeActions.vala in the pantheon-files source code but I can't figure out what in the world the arguments to those functions are (what is GOF.File? - I can't find anything on it). I even tried looking up a few methods like get_default_handler(), but literally couldn't find anything-
which brings me back to the problem, how do I add a Firefox entry into that pantheon-files list of apps?
I know there might have been a way easier method, but I don't regret anything.