0

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.

1

At the bottom of the list, click on "Other applications". In the dialog that appears click on "View all applications". Make sure the "set as default" box is ticked then double click on the "Firefox Browser" entry.

  • there's no "firefox browser" entry in that menu. that's what I'm tyring to fix – mbz Dec 11 '17 at 1:32
  • How many entries are there? If there are only a few, make sure your have clicked the "View all Applications" button. By default only the "Recommended applications" are shown and Firefox will not normally be amongst those. After clicking that button you should get another section containing a long list of applications (mostly unsuitable) but containing Firefox (assuming it was installed normally and has an entry in \usr\share\applications). – Jeremy Wootten Dec 11 '17 at 15:19
  • never mind I actually fixed it, I deleted everything and installed firefox from the app center. It's a huge application with it's stuff spread all around the system so I guess this is the best solution. – mbz Dec 12 '17 at 20:24
1

I solved this -for Ardour files in my case- adding a %U to the Exec element in ~/.local/share/applications/ardour.desktop. As soon as I added the option to the command the application showed up in the Pantheon Files applications list.

I don't know if this file is here because I installed Ardour from source or if this is where the shortcut is placed, but I'm sure this also works for shortcuts in /usr/share/applications.

Cheers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.