My pdfs keep opening in a non-default app help

not like ambulance help, more like slow burn help.
double-clicking a pdf opens my pdfs in ungoogled chromium (flatpak) and it’s pissing me off. It’s always been this way. I like PDF= pdf viewer!

I’m saddled with the stupid thunar pdf reader, reverse dep of thunar(!!), and my choice of Atril. That’s not the problem. Behold.
Chromium settings–nothing to see here:

behold default apps:


NO PDF! :frowning:

remember, double-click = chromium. How to change, man?

right click

open with:
rightclick2

  1. how to I stop double-click pdf’s from opening in Chromium (please don’t say “use context menu, instead, stupid”)?

  2. Is this just a sandboxed flatpak app thing and I’m helpless as long as I use flatpak ungoogled (aur one is wiggy)

  3. if I remove Chromium from context menu will it stop chromium from opening pdf’s automatically? if true, then how do I do that?

Thanks for any consideration.

1 Like

I wasn’t aware that thunar has a pdf reader.

Since you are using Thunar file manager, you should be able to see another item called “Set Default Application” in this context menu. On my system, it looks like this:

Clicking on that item should open up a pop-up window that looks similar to this:

You can also do this by clicking on the “Properties” item, which will bring up another menu like this:

Having said that, I prefer to just do this from the command line using xdg-mime. You can query the current default application for pdf files with this command:

$ xdg-mime query default application/pdf

This will return the name of a .desktop file of the current application that is set to open pdf files by default. If nothing is returned, then it means the default hasn’t been set yet. To set a default application for pdf files via xdg-mime, do the following:

First, you have to find out the name of the .desktop file of your application of choice (Atril, in this case). You can do this easily with the following command.

$ pacman -Ql atril | grep .desktop

This command will return a list of all desktop files owned by the atril package. You have to choose the correct one, but this isn’t too difficult to do. Common sense dictates that the .desktop file for atril would be either be atril.desktop or Atril.desktop.

After you have determined the name of the .desktop file, you can set the default using xdg-mime:

$ xdg-mime default atril.desktop application/pdf
3 Likes

ending my day in this neck of the woods, a big love heart to you for the path forward, I cannot wait to try this and report back. This was all above my linux knowledge level so I’m grateful to learn. Stay tuned. I appreciate this.

EDIT: home now. will try later.

it was too late when I rambled. I use nemo, there is no set default, the pdf viewer with the big A in the icon is evince. the other pdf reader is xreader which is Arch’s preferred? pacman -Si xreader showed no real connection to nemo…

…I had that wrong too

I think I will have this wrapped up with your great terminal commands.
I wish I knew what made unggogled default…but at least I can change it.

will report back. feel like I’m almos done,

pacman -Ql evince | grep .desktop
evince /usr/share/applications/org.gnome.Evince-previewer.desktop
evince /usr/share/applications/org.gnome.Evince.desktop

$ xdg-mime default Evince.desktop application/pdf NOPE
$ xdg-mime default org.gnome.Evince.desktop application/pdf YES WONDERFUL

thanks-- marking solved

When it comes to user applications, Arch does not impose any preference on its users. It is a DIY system after all. The user is free to pick and choose whatever application he or she intends to run.

My bad. You mentioned thunar in your first post, so I thought you were using thunar.

Is Chromium your default browser?

this is semantics as far as what we choose, we don’t choose all of what’s in a stock install, we just need the interface. If my budgie endeavour came with xreader then that was what endeavour budgie ships with. maybe not ‘preferred’ but it’s the house pdf reader.

I wish I knew why I had 2 pdfreaders.I only need one. Evince has deep dep tentacles (gsettings, shell) so I’m incllined not to mess with it…I should just dispatch it and be done with it:).

I did give you false information, no need to apologize. I was bouncing around in two DE’s late that night and mixed up my file manager.

and “why is ungoogled’ default?” I looked: it was set there in the budgie system defaults. used to be firefox so don’t know how that happened. thank you for that suggestion.

And thanks more for the xdg-mime tutorial. I know it sounds geeky to say I’m going to read the man page and see what else that tool can do, but I’m stoked :grinning:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.